summaryrefslogtreecommitdiffstats
path: root/audio/out
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2023-08-06 16:09:13 +0200
committersfan5 <sfan5@live.de>2023-08-08 20:15:20 +0200
commitd9072fef2ab40816f6439f0c94a8229be7016de1 (patch)
tree74e55f9316ed7cbf4147b73c361098e299b1b1e4 /audio/out
parenta949e5836260f7407166265498e066bb846419f4 (diff)
downloadmpv-d9072fef2ab40816f6439f0c94a8229be7016de1.tar.bz2
mpv-d9072fef2ab40816f6439f0c94a8229be7016de1.tar.xz
ao_audiotrack: do not needlessly resample
Resampling when the driver says it isn't outputting more than a certain rate anyway makes sense, the inverse does not.
Diffstat (limited to 'audio/out')
-rw-r--r--audio/out/ao_audiotrack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/out/ao_audiotrack.c b/audio/out/ao_audiotrack.c
index b2e0ba6c02..dd4678011a 100644
--- a/audio/out/ao_audiotrack.c
+++ b/audio/out/ao_audiotrack.c
@@ -684,8 +684,8 @@ static int init(struct ao *ao)
AudioManager.STREAM_MUSIC
);
if (MP_JNI_EXCEPTION_LOG(ao) == 0) {
- ao->samplerate = samplerate;
MP_VERBOSE(ao, "AudioTrack.nativeOutputSampleRate = %d\n", samplerate);
+ ao->samplerate = MPMIN(samplerate, ao->samplerate);
}
}
p->samplerate = ao->samplerate;