summaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorCalvin Morrison <calvin@pobox.com>2026-05-17 09:10:55 -0400
committerCalvin Morrison <calvin@pobox.com>2026-05-17 09:10:55 -0400
commit5ccdfbc97811847611ee366848aa4b4b767bd656 (patch)
treed02c6cb94e0e652da3f7adee3d2d60434be037f7 /src/model
parent62ac7a360129aa741d898ea2e70c3ab958877305 (diff)
cleanup
Diffstat (limited to 'src/model')
-rw-r--r--src/model/pulsedevice.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/model/pulsedevice.cpp b/src/model/pulsedevice.cpp
index 8fb8d48..d79ee8e 100644
--- a/src/model/pulsedevice.cpp
+++ b/src/model/pulsedevice.cpp
@@ -241,12 +241,11 @@ void PulseDevice::setMuted( bool m )
if ( !m_context ) return;
pa_threaded_mainloop_lock( m_mainloop );
pa_operation *op = 0;
- int mute = m ? 1 : 0;
switch ( m_category ) {
- case Output: op = pa_context_set_sink_mute_by_index( m_context, m_paIndex, mute, 0, 0 ); break;
- case Input: op = pa_context_set_source_mute_by_index( m_context, m_paIndex, mute, 0, 0 ); break;
- case Playback: op = pa_context_set_sink_input_mute( m_context, m_paIndex, mute, 0, 0 ); break;
- case Recording: op = pa_context_set_source_output_mute( m_context, m_paIndex, mute, 0, 0 ); break;
+ case Output: op = pa_context_set_sink_mute_by_index( m_context, m_paIndex, m, 0, 0 ); break;
+ case Input: op = pa_context_set_source_mute_by_index( m_context, m_paIndex, m, 0, 0 ); break;
+ case Playback: op = pa_context_set_sink_input_mute( m_context, m_paIndex, m, 0, 0 ); break;
+ case Recording: op = pa_context_set_source_output_mute( m_context, m_paIndex, m, 0, 0 ); break;
}
if ( op ) pa_operation_unref( op );
pa_threaded_mainloop_unlock( m_mainloop );