[Audio Output] Only unregister listener if used
Only unregister the listener if it actually has been registered, and clear the handle upon doing so. Signed-off-by: Christopher Snowhill <kode54@gmail.com>xcode15
parent
804e7652a8
commit
3f212f0cfb
|
@ -1126,7 +1126,10 @@ current_device_listener(AudioObjectID inObjectID, UInt32 inNumberAddresses, cons
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)removeSynchronizerBlock {
|
- (void)removeSynchronizerBlock {
|
||||||
|
if(renderSynchronizer && currentPtsObserver) {
|
||||||
[renderSynchronizer removeTimeObserver:currentPtsObserver];
|
[renderSynchronizer removeTimeObserver:currentPtsObserver];
|
||||||
|
currentPtsObserver = nil;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setVolume:(double)v {
|
- (void)setVolume:(double)v {
|
||||||
|
|
Loading…
Reference in New Issue