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.
This commit is contained in:
sfan5 2023-08-06 16:09:13 +02:00
parent a949e58362
commit d9072fef2a
1 changed files with 1 additions and 1 deletions

View File

@ -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;