Add RARCH_CMD_AUDIO_SET_BLOCKING_STATE/RARCH_CMD_AUDIO_SET_NONBLOCKING_STATE

This commit is contained in:
twinaphex 2014-08-16 18:56:56 +02:00
parent c706644c05
commit ba6d353498
3 changed files with 10 additions and 2 deletions

View File

@ -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;
}

View File

@ -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,

View File

@ -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;
}
}