mirror of
https://github.com/danog/libtgvoip.git
synced 2025-01-22 13:01:21 +01:00
probably fix crash on os x
This commit is contained in:
parent
60d40e4ee4
commit
41d16426fd
@ -115,10 +115,6 @@ AudioUnitIO::AudioUnitIO(){
|
||||
}
|
||||
|
||||
AudioUnitIO::~AudioUnitIO(){
|
||||
AudioOutputUnitStop(unit);
|
||||
AudioUnitUninitialize(unit);
|
||||
AudioComponentInstanceDispose(unit);
|
||||
free(inBufferList.mBuffers[0].mData);
|
||||
#if TARGET_OS_OSX
|
||||
AudioObjectPropertyAddress propertyAddress;
|
||||
propertyAddress.mSelector = kAudioHardwarePropertyDefaultOutputDevice;
|
||||
@ -128,6 +124,10 @@ AudioUnitIO::~AudioUnitIO(){
|
||||
propertyAddress.mSelector = kAudioHardwarePropertyDefaultInputDevice;
|
||||
AudioObjectRemovePropertyListener(kAudioObjectSystemObject, &propertyAddress, AudioUnitIO::DefaultDeviceChangedCallback, this);
|
||||
#endif
|
||||
AudioOutputUnitStop(unit);
|
||||
AudioUnitUninitialize(unit);
|
||||
AudioComponentInstanceDispose(unit);
|
||||
free(inBufferList.mBuffers[0].mData);
|
||||
}
|
||||
|
||||
AudioUnitIO* AudioUnitIO::Get(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user