summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 );