mirror of https://github.com/mpv-player/mpv
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:
parent
a949e58362
commit
d9072fef2a
|
@ -684,8 +684,8 @@ static int init(struct ao *ao)
|
||||||
AudioManager.STREAM_MUSIC
|
AudioManager.STREAM_MUSIC
|
||||||
);
|
);
|
||||||
if (MP_JNI_EXCEPTION_LOG(ao) == 0) {
|
if (MP_JNI_EXCEPTION_LOG(ao) == 0) {
|
||||||
ao->samplerate = samplerate;
|
|
||||||
MP_VERBOSE(ao, "AudioTrack.nativeOutputSampleRate = %d\n", samplerate);
|
MP_VERBOSE(ao, "AudioTrack.nativeOutputSampleRate = %d\n", samplerate);
|
||||||
|
ao->samplerate = MPMIN(samplerate, ao->samplerate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
p->samplerate = ao->samplerate;
|
p->samplerate = ao->samplerate;
|
||||||
|
|
Loading…
Reference in New Issue