diff options
author | sfan5 <sfan5@live.de> | 2023-08-06 16:09:13 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-08-08 20:15:20 +0200 |
commit | d9072fef2ab40816f6439f0c94a8229be7016de1 (patch) | |
tree | 74e55f9316ed7cbf4147b73c361098e299b1b1e4 /audio/out | |
parent | a949e5836260f7407166265498e066bb846419f4 (diff) | |
download | mpv-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.c | 2 |
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; |