1
0
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:
Grishka 2018-03-02 14:49:37 +04:00
parent 60d40e4ee4
commit 41d16426fd

View File

@ -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(){