Cog Audio: Change for recursive lock, fixing a deadlock on buffer resets
parent
494ad84ea7
commit
d364d48944
|
@ -58,7 +58,7 @@
|
||||||
atomic_int writePointer;
|
atomic_int writePointer;
|
||||||
atomic_int bufferFilled;
|
atomic_int bufferFilled;
|
||||||
|
|
||||||
NSLock *accessLock;
|
NSRecursiveLock *accessLock;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id)initWithLength:(UInt32)length;
|
- (id)initWithLength:(UInt32)length;
|
||||||
|
|
|
@ -47,7 +47,7 @@ static void deallocateVirtualBuffer(void *buffer, UInt32 bufferLength);
|
||||||
atomic_init(&writePointer, 0);
|
atomic_init(&writePointer, 0);
|
||||||
atomic_init(&bufferFilled, 0);
|
atomic_init(&bufferFilled, 0);
|
||||||
|
|
||||||
accessLock = [[NSLock alloc] init];
|
accessLock = [[NSRecursiveLock alloc] init];
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue