mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-20 03:24:59 +00:00
IOS/USB: Skip data when HLE Wii Speak is muted
This commit is contained in:
parent
399cd629e6
commit
e15d7ca664
1 changed files with 6 additions and 1 deletions
|
@ -130,6 +130,11 @@ long Microphone::DataCallback(cubeb_stream* stream, void* user_data, const void*
|
|||
if (Core::GetState(Core::System::GetInstance()) != Core::State::Running)
|
||||
return nframes;
|
||||
|
||||
// Skip data when HLE Wii Speak is muted
|
||||
// TODO: Update cubeb and use cubeb_stream_set_input_mute
|
||||
if (Config::Get(Config::MAIN_WII_SPEAK_MUTED))
|
||||
return nframes;
|
||||
|
||||
auto* mic = static_cast<Microphone*>(user_data);
|
||||
const auto& sampler = mic->GetSampler();
|
||||
|
||||
|
@ -184,7 +189,7 @@ u16 Microphone::ReadIntoBuffer(u8* ptr, u32 size)
|
|||
|
||||
bool Microphone::HasData() const
|
||||
{
|
||||
return m_samples_avail > 0 && !Config::Get(Config::MAIN_WII_SPEAK_MUTED);
|
||||
return m_samples_avail > 0;
|
||||
}
|
||||
|
||||
const WiiSpeakState& Microphone::GetSampler() const
|
||||
|
|
Loading…
Add table
Reference in a new issue