Ejemplo n.º 1
0
void ARXMenu_Options_Audio_SetDevice(std::string device) {
	
	config.audio.device = device;
	
	/*
	 * TODO This is ugly and doesn't save all currently playing samples - only looping ones,
	 * and those aren't restored at the same playback position. Ideally the audio subsystem
	 * should be able to switch backends internally.
	 */
	
	ARX_SOUND_PushAnimSamples();
	size_t ulSizeAmbiancePlayList;
	char * pAmbiancePlayList = ARX_SOUND_AmbianceSavePlayList(ulSizeAmbiancePlayList);
	
	ARX_SOUND_Release();
	ARX_SOUND_Init();
	
	ARX_SOUND_MixerSwitch(ARX_SOUND_MixerGame, ARX_SOUND_MixerMenu);
	ARX_SOUND_PlayMenuAmbiance(AMB_MENU);
	
	ARXMenu_Options_Audio_SetMasterVolume(config.audio.volume);
	ARXMenu_Options_Audio_SetSfxVolume(config.audio.sfxVolume);
	ARXMenu_Options_Audio_SetSpeechVolume(config.audio.speechVolume);
	ARXMenu_Options_Audio_SetAmbianceVolume(config.audio.ambianceVolume);

	if(pAmbiancePlayList) {
		ARX_SOUND_AmbianceRestorePlayList(pAmbiancePlayList, ulSizeAmbiancePlayList);
		free(pAmbiancePlayList);
	}

	ARX_SOUND_PopAnimSamples();
}
Ejemplo n.º 2
0
void ARX_MENU_Launch() {
	
	arxtime.pause();

	//Synchronize menu mixers with game mixers and switch between them
	ARX_SOUND_MixerSwitch(ARX_SOUND_MixerGame, ARX_SOUND_MixerMenu);

	ARX_SOUND_PlayMenuAmbiance(AMB_MENU);
	ARX_MENU_CLICKSOUND();

	ARXmenu.currentmode = AMCM_MAIN;
	ARX_Menu_Resources_Create();
}
Ejemplo n.º 3
0
void ARX_MENU_Launch(bool allowResume) {
	
	REFUSE_GAME_RETURN = !allowResume;

	arxtime.pause();

	//Synchronize menu mixers with game mixers and switch between them
	ARX_SOUND_MixerSwitch(ARX_SOUND_MixerGame, ARX_SOUND_MixerMenu);

	ARX_SOUND_PlayMenuAmbiance(AMB_MENU);
	ARX_MENU_CLICKSOUND();

	ARXmenu.currentmode = AMCM_MAIN;
	ARX_Menu_Resources_Create();
	Menu2_Open();
}
Ejemplo n.º 4
0
void ARX_MENU_LaunchAmb(const std::string & _lpszAmb) {
	ARX_SOUND_PlayMenuAmbiance(_lpszAmb);
}