- fixes for builds without resip/rutil integration
This commit is contained in:
parent
018ddf81df
commit
76a0d93ef3
|
|
@ -80,7 +80,7 @@ CoreAudioUnit::CoreAudioUnit()
|
|||
|
||||
void CoreAudioUnit::open(bool voice)
|
||||
{
|
||||
OSStatus ostatus;
|
||||
OSStatus osstatus = 0;
|
||||
#ifdef TARGET_IOS
|
||||
UInt32 audioCategory = kAudioSessionCategory_PlayAndRecord;
|
||||
/* We want to be able to open playback and recording streams */
|
||||
|
|
@ -95,7 +95,7 @@ void CoreAudioUnit::open(bool voice)
|
|||
#endif
|
||||
|
||||
// Locate audio component
|
||||
mUnit = NULL;
|
||||
mUnit = nullptr;
|
||||
AudioComponentDescription desc;
|
||||
desc.componentType = kAudioUnitType_Output;
|
||||
#ifdef TARGET_IOS
|
||||
|
|
@ -107,19 +107,19 @@ void CoreAudioUnit::open(bool voice)
|
|||
desc.componentFlags = 0;
|
||||
desc.componentFlagsMask = 0;
|
||||
|
||||
AudioComponent component = AudioComponentFindNext(NULL, &desc);
|
||||
if (component == NULL)
|
||||
AudioComponent component = AudioComponentFindNext(nullptr, &desc);
|
||||
if (component == nullptr)
|
||||
{
|
||||
ICELogError(<< "Cannot find audio component, error " << int(ostatus));
|
||||
throw AudioException(ERR_COREAUDIO, ostatus);
|
||||
ICELogError(<< "Cannot find audio component (null is returned)");
|
||||
throw AudioException(ERR_COREAUDIO, osstatus);
|
||||
}
|
||||
|
||||
// Create audio unit
|
||||
ostatus = AudioComponentInstanceNew(component, &mUnit);
|
||||
if (ostatus != noErr)
|
||||
osstatus = AudioComponentInstanceNew(component, &mUnit);
|
||||
if (osstatus != noErr)
|
||||
{
|
||||
ICELogError(<< "Cannot create audio component, error " << int(ostatus));
|
||||
throw AudioException(ERR_COREAUDIO, ostatus);
|
||||
ICELogError(<< "Cannot create audio component, error " << int(osstatus));
|
||||
throw AudioException(ERR_COREAUDIO, osstatus);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -129,7 +129,7 @@ void CoreAudioUnit::close()
|
|||
{
|
||||
AudioUnitUninitialize(mUnit);
|
||||
AudioComponentInstanceDispose(mUnit);
|
||||
mUnit = NULL;
|
||||
mUnit = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
#include "../helper/HL_ByteBuffer.h"
|
||||
#include "../helper/HL_Exception.h"
|
||||
#include <AudioToolbox/AudioQueue.h>
|
||||
#include <memory>
|
||||
|
||||
// Define CoreAudio buffer time length in milliseconds
|
||||
#define COREAUDIO_BUFFER_TIME 20
|
||||
|
|
@ -152,7 +153,7 @@ protected:
|
|||
|
||||
};
|
||||
|
||||
typedef SharedPtr<MacDevice> PMacDevice;
|
||||
typedef std::shared_ptr<MacDevice> PMacDevice;
|
||||
|
||||
class MacInputDevice: public InputDevice
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue