summaryrefslogtreecommitdiffstats
path: root/audio/out
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2013-07-02 08:07:15 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2013-07-22 21:53:18 +0200
commit6d2f9a2804d1f1be1e8c3c4cc1a9654217b6d0b2 (patch)
tree4ce0265a25b819661bc6f79168c46bf737a01b83 /audio/out
parenta2d106cb3152be82ecef02ebf77b00f00341295d (diff)
downloadmpv-6d2f9a2804d1f1be1e8c3c4cc1a9654217b6d0b2.tar.bz2
mpv-6d2f9a2804d1f1be1e8c3c4cc1a9654217b6d0b2.tar.xz
ao_coreaudio: remove volume multiplication by 4
kHALOutputParam_Volume is the linear gain so it should be at maximum 1 to keep the audio quality good. No idea why it was more than that.
Diffstat (limited to 'audio/out')
-rw-r--r--audio/out/ao_coreaudio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/out/ao_coreaudio.c b/audio/out/ao_coreaudio.c
index 9206d31bf9..15dc2c9c69 100644
--- a/audio/out/ao_coreaudio.c
+++ b/audio/out/ao_coreaudio.c
@@ -152,7 +152,7 @@ static int control(struct ao *ao, enum aocontrol cmd, void *arg)
kAudioUnitScope_Global, 0, &vol);
CHECK_CA_ERROR("could not get HAL output volume");
- control_vol->left = control_vol->right = vol * 100.0 / 4.0;
+ control_vol->left = control_vol->right = vol * 100.0;
return CONTROL_TRUE;
case AOCONTROL_SET_VOLUME:
@@ -174,7 +174,7 @@ static int control(struct ao *ao, enum aocontrol cmd, void *arg)
return CONTROL_TRUE;
}
- vol = (control_vol->left + control_vol->right) * 4.0 / 200.0;
+ vol = (control_vol->left + control_vol->right) / 200.0;
err = AudioUnitSetParameter(p->audio_unit, kHALOutputParam_Volume,
kAudioUnitScope_Global, 0, vol, 0);