Commit b7ce1152 authored by Felix Paul Kühne's avatar Felix Paul Kühne

auhal: fix a few compilation warnings

parent 5e59f5f4
...@@ -594,11 +594,12 @@ static int OpenAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt) ...@@ -594,11 +594,12 @@ static int OpenAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt)
/* Set volume for output unit */ /* Set volume for output unit */
float volume = var_InheritInteger(p_aout, "auhal-volume") / (float)AOUT_VOLUME_DEFAULT; float volume = var_InheritInteger(p_aout, "auhal-volume") / (float)AOUT_VOLUME_DEFAULT;
volume = volume * volume * volume;
verify_noerr(AudioUnitSetParameter(p_sys->au_unit, verify_noerr(AudioUnitSetParameter(p_sys->au_unit,
kHALOutputParam_Volume, kHALOutputParam_Volume,
kAudioUnitScope_Global, kAudioUnitScope_Global,
0, 0,
volume * volume * volume, volume,
0)); 0));
p_aout->time_get = TimeGetAnalog; p_aout->time_get = TimeGetAnalog;
...@@ -1048,11 +1049,13 @@ error: ...@@ -1048,11 +1049,13 @@ error:
*****************************************************************************/ *****************************************************************************/
static int AudioDeviceHasOutput(AudioDeviceID i_dev_id) static int AudioDeviceHasOutput(AudioDeviceID i_dev_id)
{ {
UInt32 dataSize; UInt32 dataSize = 0;
OSStatus status;
AudioObjectPropertyAddress streamsAddress = { kAudioDevicePropertyStreams, kAudioDevicePropertyScopeOutput, kAudioObjectPropertyElementMaster }; AudioObjectPropertyAddress streamsAddress = { kAudioDevicePropertyStreams, kAudioDevicePropertyScopeOutput, kAudioObjectPropertyElementMaster };
verify_noerr(AudioObjectGetPropertyDataSize(i_dev_id, &streamsAddress, 0, NULL, &dataSize)); status = AudioObjectGetPropertyDataSize(i_dev_id, &streamsAddress, 0, NULL, &dataSize);
if (dataSize == 0)
if (dataSize == 0 || status != noErr)
return FALSE; return FALSE;
return TRUE; return TRUE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment