Cog Audio: Change for recursive lock, fixing a deadlock on buffer resets

CQTexperiment
Christopher Snowhill 2022-01-23 19:50:01 -08:00
parent 494ad84ea7
commit d364d48944
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@
atomic_int writePointer;
atomic_int bufferFilled;
NSLock *accessLock;
NSRecursiveLock *accessLock;
}
- (id)initWithLength:(UInt32)length;

View File

@ -47,7 +47,7 @@ static void deallocateVirtualBuffer(void *buffer, UInt32 bufferLength);
atomic_init(&writePointer, 0);
atomic_init(&bufferFilled, 0);
accessLock = [[NSLock alloc] init];
accessLock = [[NSRecursiveLock alloc] init];
return self;
}