Merge pull request #5213 from danieljg/master

Increase maximum sample rate in tinyalsa and implement check for upper and lower bounds
This commit is contained in:
Twinaphex 2017-07-27 06:21:26 +02:00 committed by GitHub
commit 99aed1723f

View File

@ -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 >= 48000)
rate = 48000;
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)