mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-19 01:12:33 +00:00
If samplerate is not supported, do not fail.
This commit is contained in:
parent
4acf66edfd
commit
341baf6918
@ -86,13 +86,20 @@ static void *oss_init(const char *device, unsigned rate, unsigned latency)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (ioctl(*fd, SNDCTL_DSP_SPEED, &rate) < 0)
|
||||
int new_rate = rate;
|
||||
if (ioctl(*fd, SNDCTL_DSP_SPEED, &new_rate) < 0)
|
||||
{
|
||||
close(*fd);
|
||||
free(fd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (new_rate != (int)rate)
|
||||
{
|
||||
SSNES_WARN("Requested sample rate not supported. Adjusting output rate to %d Hz.\n", new_rate);
|
||||
g_settings.audio.out_rate = new_rate;
|
||||
}
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user