mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-14 06:18:34 +00:00
Refactor away another function
This commit is contained in:
parent
4ad4254107
commit
08c6382c51
@ -482,24 +482,14 @@ static void audio_driver_readjust_input_rate(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void audio_driver_set_nonblock_state(bool toggle)
|
||||
{
|
||||
driver_t *driver = driver_get_ptr();
|
||||
const audio_driver_t *audio = audio_get_ptr(driver);
|
||||
|
||||
audio->set_nonblock_state(driver->audio_data, toggle);
|
||||
}
|
||||
|
||||
void audio_driver_set_nonblocking_state(bool enable)
|
||||
{
|
||||
driver_t *driver = driver_get_ptr();
|
||||
const audio_driver_t *audio = audio_get_ptr(driver);
|
||||
settings_t *settings = config_get_ptr();
|
||||
if (driver->audio_active && driver->audio_data)
|
||||
audio_driver_set_nonblock_state(settings->audio.sync ? enable : true);
|
||||
audio->set_nonblock_state(driver->audio_data,
|
||||
settings->audio.sync ? enable : true);
|
||||
|
||||
audio_data.chunk_size = enable ? audio_data.nonblock_chunk_size :
|
||||
audio_data.block_chunk_size;
|
||||
|
@ -106,8 +106,6 @@ const void *audio_driver_find_handle(int index);
|
||||
**/
|
||||
const char *audio_driver_find_ident(int index);
|
||||
|
||||
void audio_driver_set_nonblock_state(bool toggle);
|
||||
|
||||
void audio_driver_set_nonblocking_state(bool enable);
|
||||
|
||||
/**
|
||||
|
@ -1446,7 +1446,7 @@ bool event_command(enum event_command cmd)
|
||||
case EVENT_CMD_AUDIO_SET_NONBLOCKING_STATE:
|
||||
boolean = true; /* fall-through */
|
||||
case EVENT_CMD_AUDIO_SET_BLOCKING_STATE:
|
||||
audio_driver_set_nonblock_state(boolean);
|
||||
audio_driver_set_nonblocking_state(boolean);
|
||||
break;
|
||||
case EVENT_CMD_OVERLAY_SET_SCALE_FACTOR:
|
||||
#ifdef HAVE_OVERLAY
|
||||
|
Loading…
Reference in New Issue
Block a user