mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 16:09:47 +00:00
Test upper & lower sample-rate bounds in tinyalsa
This commit is contained in:
parent
1b4d622bb4
commit
ad542822ed
@ -2203,12 +2203,12 @@ static void * tinyalsa_init(const char *devicestr, unsigned rate,
|
||||
{
|
||||
RARCH_WARN("[TINYALSA]: Sample rate cannot be larger than %uHz "\
|
||||
"or smaller than %uHz.\n", max_rate, min_rate);
|
||||
RARCH_WARN("[TINYALSA]: Trying the default rate or else max rate.\n");
|
||||
|
||||
if (max_rate >= 192000)
|
||||
rate = 192000;
|
||||
else
|
||||
RARCH_WARN("[TINYALSA]: Trying to set a valid sample rate.\n");
|
||||
|
||||
if (rate > max_rate)
|
||||
rate = max_rate;
|
||||
else if (rate < min_rate)
|
||||
rate = min_rate;
|
||||
}
|
||||
|
||||
if (orig_rate != rate)
|
||||
|
Loading…
Reference in New Issue
Block a user