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:
nakeee
2009-03-30 09:55:50 +00:00
parent 5987dbf7ba
commit 37d513c53b
19 changed files with 133 additions and 69 deletions

View File

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