summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--audio/out/ao_opensles.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/audio/out/ao_opensles.c b/audio/out/ao_opensles.c
index 40ab5324b5..1348cebffb 100644
--- a/audio/out/ao_opensles.c
+++ b/audio/out/ao_opensles.c
@@ -111,6 +111,8 @@ static int init(struct ao *ao)
// This AO only supports two channels at the moment
mp_chmap_from_channels(&ao->channels, 2);
+ // Upstream "Wilhelm" supports only 8000 <= rate <= 192000
+ ao->samplerate = MPCLAMP(ao->samplerate, 8000, 192000);
CHK(slCreateEngine(&p->sl, 0, NULL, 0, NULL, NULL));
CHK((*p->sl)->Realize(p->sl, SL_BOOLEAN_FALSE));