Cog Audio: Fix potential hang on stop
The ChunkList wasn't clearing the remover entered flag when the chain was empty. Now it does, so it will shut down correctly. Signed-off-by: Christopher Snowhill <kode54@gmail.com>CQTexperiment
parent
418d03ae23
commit
91da112e35
|
@ -74,8 +74,10 @@
|
||||||
|
|
||||||
@synchronized(chunkList) {
|
@synchronized(chunkList) {
|
||||||
inRemover = YES;
|
inRemover = YES;
|
||||||
if(![chunkList count])
|
if(![chunkList count]) {
|
||||||
|
inRemover = NO;
|
||||||
return [[AudioChunk alloc] init];
|
return [[AudioChunk alloc] init];
|
||||||
|
}
|
||||||
AudioChunk *chunk = [chunkList objectAtIndex:0];
|
AudioChunk *chunk = [chunkList objectAtIndex:0];
|
||||||
if([chunk frameCount] <= maxFrameCount) {
|
if([chunk frameCount] <= maxFrameCount) {
|
||||||
[chunkList removeObjectAtIndex:0];
|
[chunkList removeObjectAtIndex:0];
|
||||||
|
|
Loading…
Reference in New Issue