diff options
Diffstat (limited to 'libao2/ao_coreaudio.c')
-rw-r--r-- | libao2/ao_coreaudio.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libao2/ao_coreaudio.c b/libao2/ao_coreaudio.c index 34374f4c9c..d1a93c85e2 100644 --- a/libao2/ao_coreaudio.c +++ b/libao2/ao_coreaudio.c @@ -169,7 +169,11 @@ Float32 vol; control_vol = (ao_control_vol_t*)arg; if (ao->b_digital) { // Digital output has no volume adjust. - return CONTROL_FALSE; + int vol = ao->b_muted ? 0 : 100; + *control_vol = (ao_control_vol_t) { + .left = vol, .right = vol, + }; + return CONTROL_TRUE; } err = AudioUnitGetParameter(ao->theOutputUnit, kHALOutputParam_Volume, kAudioUnitScope_Global, 0, &vol); @@ -450,6 +454,8 @@ int device_id, display_help = 0; ao->b_revert = 0; ao->b_changed_mixing = 0; + global_ao->no_persistent_volume = true; + if (device_id == 0) { /* Find the ID of the default Device. */ err = GetAudioProperty(kAudioObjectSystemObject, |