Adding --mute.
This commit is contained in:
@@ -14,4 +14,6 @@
|
|||||||
|
|
||||||
DECLARE_string(apu);
|
DECLARE_string(apu);
|
||||||
|
|
||||||
|
DECLARE_bool(mute);
|
||||||
|
|
||||||
#endif // XENIA_APU_APU_PRIVATE_H_
|
#endif // XENIA_APU_APU_PRIVATE_H_
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ using namespace xe::apu;
|
|||||||
|
|
||||||
DEFINE_string(apu, "any", "Audio system. Use: [any, nop, xaudio2]");
|
DEFINE_string(apu, "any", "Audio system. Use: [any, nop, xaudio2]");
|
||||||
|
|
||||||
|
DEFINE_bool(mute, false, "Mutes all audio output.");
|
||||||
|
|
||||||
#include "xenia/apu/nop/nop_apu.h"
|
#include "xenia/apu/nop/nop_apu.h"
|
||||||
std::unique_ptr<AudioSystem> xe::apu::CreateNop(Emulator* emulator) {
|
std::unique_ptr<AudioSystem> xe::apu::CreateNop(Emulator* emulator) {
|
||||||
return xe::apu::nop::Create(emulator);
|
return xe::apu::nop::Create(emulator);
|
||||||
|
|||||||
@@ -116,6 +116,10 @@ void XAudio2AudioDriver::Initialize() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (FLAGS_mute) {
|
||||||
|
pcm_voice_->SetVolume(0.0f);
|
||||||
|
}
|
||||||
|
|
||||||
SetEvent(wait_handle_);
|
SetEvent(wait_handle_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user