summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon/AudioCommon.cpp
diff options
context:
space:
mode:
authorLinktothepast <kostamarino@gmail.com>2015-09-28 16:50:35 +0300
committerLinktothepast <kostamarino@gmail.com>2015-09-28 16:50:35 +0300
commit748be565b8df535ef558e74b38cd0f4d615f8a21 (patch)
treeb151efee0a87e99125f2401325a9bddecf84fc73 /Source/Core/AudioCommon/AudioCommon.cpp
parentcf17fccdd3093a1b8476b10183b1c4bde36da74d (diff)
parentce493b897d6d3735c930a8465cc0c26bbe5feb86 (diff)
Merge remote-tracking branch 'dolphin-emu/master' into gameinis
Diffstat (limited to 'Source/Core/AudioCommon/AudioCommon.cpp')
-rw-r--r--Source/Core/AudioCommon/AudioCommon.cpp27
1 files changed, 16 insertions, 11 deletions
diff --git a/Source/Core/AudioCommon/AudioCommon.cpp b/Source/Core/AudioCommon/AudioCommon.cpp
index f5438faca9..b4f2dae2f0 100644
--- a/Source/Core/AudioCommon/AudioCommon.cpp
+++ b/Source/Core/AudioCommon/AudioCommon.cpp
@@ -14,9 +14,9 @@
#include "AudioCommon/PulseAudioStream.h"
#include "AudioCommon/XAudio2_7Stream.h"
#include "AudioCommon/XAudio2Stream.h"
-
#include "Common/FileUtil.h"
-
+#include "Common/MsgHandler.h"
+#include "Common/Logging/Log.h"
#include "Core/ConfigManager.h"
#include "Core/Movie.h"
@@ -57,7 +57,7 @@ namespace AudioCommon
if (!g_sound_stream && NullSound::isValid())
{
- WARN_LOG(DSPHLE, "Could not initialize backend %s, using %s instead.",
+ WARN_LOG(AUDIO, "Could not initialize backend %s, using %s instead.",
backend.c_str(), BACKEND_NULLSOUND);
g_sound_stream = new NullSound();
}
@@ -65,14 +65,19 @@ namespace AudioCommon
if (g_sound_stream)
{
UpdateSoundStream();
- if (g_sound_stream->Start())
+ if (!g_sound_stream->Start())
{
- if (SConfig::GetInstance().m_DumpAudio && !s_audio_dump_start)
- StartAudioDump();
-
- return g_sound_stream;
+ ERROR_LOG(AUDIO, "Could not start backend %s, using %s instead",
+ backend.c_str(), BACKEND_NULLSOUND);
+ delete g_sound_stream;
+ g_sound_stream = new NullSound();
+ g_sound_stream->Start();
}
- PanicAlertT("Could not initialize backend %s.", backend.c_str());
+
+ if (SConfig::GetInstance().m_DumpAudio && !s_audio_dump_start)
+ StartAudioDump();
+
+ return g_sound_stream;
}
PanicAlertT("Sound backend %s is not valid.", backend.c_str());
@@ -84,7 +89,7 @@ namespace AudioCommon
void ShutdownSoundStream()
{
- INFO_LOG(DSPHLE, "Shutting down sound stream");
+ INFO_LOG(AUDIO, "Shutting down sound stream");
if (g_sound_stream)
{
@@ -95,7 +100,7 @@ namespace AudioCommon
g_sound_stream = nullptr;
}
- INFO_LOG(DSPHLE, "Done shutting down sound stream");
+ INFO_LOG(AUDIO, "Done shutting down sound stream");
}
std::vector<std::string> GetSoundBackends()