mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-24 14:24:54 +00:00
IOS/USB: Skip data when HLE Wii Speak is muted
This commit is contained in:
parent
65a09924d9
commit
82a03ca73b
1 changed files with 6 additions and 1 deletions
|
@ -131,6 +131,11 @@ long Microphone::DataCallback(cubeb_stream* stream, void* user_data, const void*
|
||||||
if (Core::GetState(Core::System::GetInstance()) != Core::State::Running)
|
if (Core::GetState(Core::System::GetInstance()) != Core::State::Running)
|
||||||
return nframes;
|
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);
|
auto* mic = static_cast<Microphone*>(user_data);
|
||||||
const auto& sampler = mic->GetSampler();
|
const auto& sampler = mic->GetSampler();
|
||||||
|
|
||||||
|
@ -185,7 +190,7 @@ u16 Microphone::ReadIntoBuffer(u8* ptr, u32 size)
|
||||||
|
|
||||||
bool Microphone::HasData() const
|
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
|
const WiiSpeakState& Microphone::GetSampler() const
|
||||||
|
|
Loading…
Add table
Reference in a new issue