[Audio Output] Remove renderer from synchronizer
Remove the renderer from the synchronizer on stop, before releasing the objects, if possible. Signed-off-by: Christopher Snowhill <kode54@gmail.com>xcode15
parent
3f212f0cfb
commit
b5f6e0ec20
|
@ -1219,6 +1219,13 @@ current_device_listener(AudioObjectID inObjectID, UInt32 inNumberAddresses, cons
|
||||||
}
|
}
|
||||||
[self removeSynchronizerBlock];
|
[self removeSynchronizerBlock];
|
||||||
[renderSynchronizer setRate:0];
|
[renderSynchronizer setRate:0];
|
||||||
|
if(audioRenderer) {
|
||||||
|
[renderSynchronizer removeRenderer:audioRenderer atTime:kCMTimeZero completionHandler:^(BOOL didRemoveRenderer) {
|
||||||
|
if(!didRemoveRenderer) {
|
||||||
|
DLog(@"Error removing renderer!");
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(audioRenderer) {
|
if(audioRenderer) {
|
||||||
[audioRenderer stopRequestingMediaData];
|
[audioRenderer stopRequestingMediaData];
|
||||||
|
|
Loading…
Reference in New Issue