mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-19 00:41:53 +00:00
Add RARCH_CMD_AUDIO_SET_BLOCKING_STATE/RARCH_CMD_AUDIO_SET_NONBLOCKING_STATE
This commit is contained in:
parent
c706644c05
commit
ba6d353498
2
driver.c
2
driver.c
@ -1140,7 +1140,7 @@ void init_audio(void)
|
||||
|
||||
if (!g_settings.audio.sync && g_extern.audio_active)
|
||||
{
|
||||
driver.audio->set_nonblock_state(driver.audio_data, true);
|
||||
rarch_main_command(RARCH_CMD_AUDIO_SET_NONBLOCKING_STATE);
|
||||
g_extern.audio_data.chunk_size = g_extern.audio_data.nonblock_chunk_size;
|
||||
}
|
||||
|
||||
|
@ -115,6 +115,8 @@ enum basic_event
|
||||
RARCH_CMD_HISTORY_DEINIT,
|
||||
RARCH_CMD_HISTORY_INIT,
|
||||
RARCH_CMD_CORE_INFO_INIT,
|
||||
RARCH_CMD_AUDIO_SET_BLOCKING_STATE,
|
||||
RARCH_CMD_AUDIO_SET_NONBLOCKING_STATE,
|
||||
RARCH_CMD_VIDEO_APPLY_STATE_CHANGES,
|
||||
RARCH_CMD_VIDEO_SET_BLOCKING_STATE,
|
||||
RARCH_CMD_VIDEO_SET_NONBLOCKING_STATE,
|
||||
|
@ -3237,7 +3237,7 @@ void rarch_main_command(unsigned action)
|
||||
driver.video_poke->apply_state_changes(driver.video_data);
|
||||
break;
|
||||
case RARCH_CMD_VIDEO_SET_NONBLOCKING_STATE:
|
||||
boolean = true; //fall-through
|
||||
boolean = true; /* fall-through */
|
||||
case RARCH_CMD_VIDEO_SET_BLOCKING_STATE:
|
||||
if (driver.video && driver.video->set_nonblock_state)
|
||||
driver.video->set_nonblock_state(driver.video_data, boolean);
|
||||
@ -3246,6 +3246,12 @@ void rarch_main_command(unsigned action)
|
||||
if (driver.video_data && driver.video_poke && driver.video_poke->set_aspect_ratio)
|
||||
driver.video_poke->set_aspect_ratio(driver.video_data, g_settings.video.aspect_ratio_idx);
|
||||
break;
|
||||
case RARCH_CMD_AUDIO_SET_NONBLOCKING_STATE:
|
||||
boolean = true; /* fall-through */
|
||||
case RARCH_CMD_AUDIO_SET_BLOCKING_STATE:
|
||||
if (driver.audio && driver.audio->set_nonblock_state)
|
||||
driver.audio->set_nonblock_state(driver.audio_data, boolean);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user