[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>main
parent
76d612faf4
commit
72ed975d56
|
@ -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