mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
Added dtk sound mixing to audiocommon (should work with LLE now)
And also moved all common setting to audiocommonconfig git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2796 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -24,19 +24,28 @@
|
||||
|
||||
namespace AudioCommon
|
||||
{
|
||||
SoundStream *InitSoundStream(std::string backend, CMixer *mixer)
|
||||
SoundStream *InitSoundStream(CMixer *mixer)
|
||||
{
|
||||
if (!mixer)
|
||||
mixer = new CMixer();
|
||||
|
||||
std::string backend = ac_Config.sBackend;
|
||||
if (backend == BACKEND_DIRECTSOUND && DSound::isValid()) soundStream = new DSound(mixer, g_dspInitialize.hWnd);
|
||||
if (backend == BACKEND_AOSOUND && AOSound::isValid()) soundStream = new AOSound(mixer);
|
||||
if (backend == BACKEND_OPENAL && OpenALStream::isValid()) soundStream = new OpenALStream(mixer);
|
||||
if (backend == BACKEND_NULL && NullSound::isValid()) soundStream = new NullSound(mixer);
|
||||
|
||||
if (soundStream != NULL) {
|
||||
if (soundStream->Start())
|
||||
ac_Config.Update();
|
||||
if (soundStream->Start()) {
|
||||
// Start the sound recording
|
||||
/*
|
||||
if (ac_Config.record) {
|
||||
soundStream->StartLogAudio(FULL_DUMP_DIR g_Config.recordFile);
|
||||
}
|
||||
*/
|
||||
|
||||
return soundStream;
|
||||
}
|
||||
PanicAlert("Could not initialize backend %s, falling back to NULL", backend.c_str());
|
||||
}
|
||||
|
||||
@ -45,7 +54,7 @@ namespace AudioCommon
|
||||
delete soundStream;
|
||||
soundStream = new NullSound(mixer);
|
||||
soundStream->Start();
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user