Reset time_ratio on preferences change. Use 4 fragments on OSS.

This commit is contained in:
Brandon Wright 2017-11-27 12:39:58 -06:00
parent 7931400b44
commit c26abbc2bc
2 changed files with 3 additions and 2 deletions

View File

@ -754,7 +754,8 @@ Snes9xPreferences::get_settings_from_dialog (void)
(config->sound_playback_rate !=
(7 - (get_combo ("playback_combo")))) ||
(config->sound_input_rate != get_slider ("sound_input_rate")) ||
(Settings.SoundSync != get_check ("sync_sound"))
(Settings.SoundSync != get_check ("sync_sound")) ||
(Settings.DynamicRateControl != get_check ("dynamic_rate_control"))
)
{
sound_needs_restart = 1;

View File

@ -136,7 +136,7 @@ S9xOSSSoundDriver::open_device (void)
/* OSS requires a power-of-two buffer size, first 16 bits are the number
* of fragments to generate, second 16 are the respective power-of-two. */
temp = (8 << 16) | (S9xSoundBase2log (output_buffer_size / 8));
temp = (4 << 16) | (S9xSoundBase2log (output_buffer_size / 4));
if (ioctl (filedes, SNDCTL_DSP_SETFRAGMENT, &temp) < 0)
goto close_fail;