mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-31 16:52:45 +00:00
Merge branch 'master' of github.com:Themaister/SSNES
This commit is contained in:
commit
678269039b
@ -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