Add convenience functions to start/stop RSound on consoles.
This commit is contained in:
parent
1a744d33d6
commit
5cf8b6041b
|
@ -706,3 +706,23 @@ void rarch_exec (void)
|
|||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_RSOUND
|
||||
bool rarch_console_rsound_start(const char *ip)
|
||||
{
|
||||
uninit_audio();
|
||||
strlcpy(g_settings.audio.device, ip, sizeof(g_settings.audio.device));
|
||||
driver.audio = &audio_rsound;
|
||||
driver.audio_data = NULL;
|
||||
init_audio();
|
||||
return g_extern.audio_active;
|
||||
}
|
||||
|
||||
void rarch_console_rsound_stop(void)
|
||||
{
|
||||
uninit_audio();
|
||||
init_drivers_pre();
|
||||
init_audio();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -119,4 +119,9 @@ void rarch_startup (const char * config_path);
|
|||
void rarch_exec (void);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_RSOUND
|
||||
bool rarch_console_rsound_start(const char *ip);
|
||||
void rarch_console_rsound_stop(void);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue