Commit ae871faa authored by David Fuhrmann's avatar David Fuhrmann

auhal: fill size variables correctly for AudioObjectGetPropertyData

parent 9534914d
...@@ -330,7 +330,7 @@ static int Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt) ...@@ -330,7 +330,7 @@ static int Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
p_sys->b_selected_dev_is_default = true; p_sys->b_selected_dev_is_default = true;
AudioObjectID defaultDeviceID = 0; AudioObjectID defaultDeviceID = 0;
UInt32 propertySize = 0; UInt32 propertySize = sizeof(AudioObjectID);
AudioObjectPropertyAddress defaultDeviceAddress = { kAudioHardwarePropertyDefaultOutputDevice, kAudioDevicePropertyScopeOutput, kAudioObjectPropertyElementMaster }; AudioObjectPropertyAddress defaultDeviceAddress = { kAudioHardwarePropertyDefaultOutputDevice, kAudioDevicePropertyScopeOutput, kAudioObjectPropertyElementMaster };
propertySize = sizeof(AudioObjectID); propertySize = sizeof(AudioObjectID);
err = AudioObjectGetPropertyData(kAudioObjectSystemObject, &defaultDeviceAddress, 0, NULL, &propertySize, &defaultDeviceID); err = AudioObjectGetPropertyData(kAudioObjectSystemObject, &defaultDeviceAddress, 0, NULL, &propertySize, &defaultDeviceID);
...@@ -1062,6 +1062,7 @@ static void Stop(audio_output_t *p_aout) ...@@ -1062,6 +1062,7 @@ static void Stop(audio_output_t *p_aout)
if (p_sys->b_changed_mixing && p_sys->sfmt_revert.mFormatID != kAudioFormat60958AC3) { if (p_sys->b_changed_mixing && p_sys->sfmt_revert.mFormatID != kAudioFormat60958AC3) {
int b_mix; int b_mix;
Boolean b_writeable = false; Boolean b_writeable = false;
i_param_size = sizeof(int);
/* Revert mixable to true if we are allowed to */ /* Revert mixable to true if we are allowed to */
AudioObjectPropertyAddress audioDeviceSupportsMixingAddress = { kAudioDevicePropertySupportsMixing , kAudioDevicePropertyScopeOutput, kAudioObjectPropertyElementMaster }; AudioObjectPropertyAddress audioDeviceSupportsMixingAddress = { kAudioDevicePropertySupportsMixing , kAudioDevicePropertyScopeOutput, kAudioObjectPropertyElementMaster };
err = AudioObjectIsPropertySettable(p_sys->i_selected_dev, &audioDeviceSupportsMixingAddress, &b_writeable); err = AudioObjectIsPropertySettable(p_sys->i_selected_dev, &audioDeviceSupportsMixingAddress, &b_writeable);
......
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