summaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-rw-r--r--backends/pulse/pulse-connection.c8
-rw-r--r--backends/pulse/pulse-device.c2
-rw-r--r--backends/pulse/pulse-sink-input.c26
-rw-r--r--backends/pulse/pulse-source-output.c19
4 files changed, 8 insertions, 47 deletions
diff --git a/backends/pulse/pulse-connection.c b/backends/pulse/pulse-connection.c
index afd1e48..995b522 100644
--- a/backends/pulse/pulse-connection.c
+++ b/backends/pulse/pulse-connection.c
@@ -1000,7 +1000,6 @@ pulse_connection_set_source_output_mute (PulseConnection *connection,
guint32 index,
gboolean mute)
{
-#if PA_CHECK_VERSION(1, 0, 0)
pa_operation *op;
g_return_val_if_fail (PULSE_IS_CONNECTION (connection), FALSE);
@@ -1014,9 +1013,6 @@ pulse_connection_set_source_output_mute (PulseConnection *connection,
NULL, NULL);
return process_pulse_operation (connection, op);
-#else
- return FALSE;
-#endif
}
gboolean
@@ -1024,7 +1020,6 @@ pulse_connection_set_source_output_volume (PulseConnection *connection,
guint32 index,
const pa_cvolume *volume)
{
-#if PA_CHECK_VERSION(1, 0, 0)
pa_operation *op;
g_return_val_if_fail (PULSE_IS_CONNECTION (connection), FALSE);
@@ -1038,9 +1033,6 @@ pulse_connection_set_source_output_volume (PulseConnection *connection,
NULL, NULL);
return process_pulse_operation (connection, op);
-#else
- return FALSE;
-#endif
}
gboolean
diff --git a/backends/pulse/pulse-device.c b/backends/pulse/pulse-device.c
index 71040cc..d53c86a 100644
--- a/backends/pulse/pulse-device.c
+++ b/backends/pulse/pulse-device.c
@@ -373,7 +373,6 @@ pulse_device_load (PulseDevice *device, const pa_card_info *info)
{
guint i;
-#if PA_CHECK_VERSION (2, 0, 0)
for (i = 0; i < info->n_ports; i++) {
PulsePort *port;
const gchar *name;
@@ -391,7 +390,6 @@ pulse_device_load (PulseDevice *device, const pa_card_info *info)
g_strdup (name),
port);
}
-#endif
/* Create the device profile switch */
if (info->n_profiles > 0) {
diff --git a/backends/pulse/pulse-sink-input.c b/backends/pulse/pulse-sink-input.c
index eab85b8..af73060 100644
--- a/backends/pulse/pulse-sink-input.c
+++ b/backends/pulse/pulse-sink-input.c
@@ -82,7 +82,6 @@ pulse_sink_input_new (PulseSink *sink, const pa_sink_input_info *info)
* Also make sure to make the name unique by including the PulseAudio index. */
name = g_strdup_printf ("pulse-output-control-%lu", (gulong) info->index);
-#if PA_CHECK_VERSION(1, 0, 0)
if (info->has_volume) {
flags |=
MATE_MIXER_STREAM_CONTROL_VOLUME_READABLE |
@@ -91,14 +90,6 @@ pulse_sink_input_new (PulseSink *sink, const pa_sink_input_info *info)
if (info->volume_writable)
flags |= MATE_MIXER_STREAM_CONTROL_VOLUME_WRITABLE;
}
-#else
- /* Pre-1.0 PulseAudio does not include the has_volume and volume_writable
- * fields, but does include the volume info, so let's give it a try */
- flags |=
- MATE_MIXER_STREAM_CONTROL_VOLUME_READABLE |
- MATE_MIXER_STREAM_CONTROL_VOLUME_WRITABLE |
- MATE_MIXER_STREAM_CONTROL_HAS_DECIBEL;
-#endif
if (info->client != PA_INVALID_INDEX) {
app_info = _mate_mixer_app_info_new ();
@@ -168,17 +159,16 @@ pulse_sink_input_update (PulseSinkInput *input, const pa_sink_input_info *info)
_mate_mixer_stream_control_set_mute (MATE_MIXER_STREAM_CONTROL (input),
info->mute ? TRUE : FALSE);
-#if PA_CHECK_VERSION(1, 0, 0)
- pulse_stream_control_set_channel_map (PULSE_STREAM_CONTROL (input), &info->channel_map);
-
+ pulse_stream_control_set_channel_map (PULSE_STREAM_CONTROL (input),
+ &info->channel_map);
if (info->has_volume)
- pulse_stream_control_set_cvolume (PULSE_STREAM_CONTROL (input), &info->volume, 0);
+ pulse_stream_control_set_cvolume (PULSE_STREAM_CONTROL (input),
+ &info->volume,
+ 0);
else
- pulse_stream_control_set_cvolume (PULSE_STREAM_CONTROL (input), NULL, 0);
-#else
- pulse_stream_control_set_channel_map (PULSE_STREAM_CONTROL (input), &info->channel_map);
- pulse_stream_control_set_volume (PULSE_STREAM_CONTROL (input), &info->volume, 0);
-#endif
+ pulse_stream_control_set_cvolume (PULSE_STREAM_CONTROL (input),
+ NULL,
+ 0);
g_object_thaw_notify (G_OBJECT (input));
}
diff --git a/backends/pulse/pulse-source-output.c b/backends/pulse/pulse-source-output.c
index 69fc3e4..6efecc8 100644
--- a/backends/pulse/pulse-source-output.c
+++ b/backends/pulse/pulse-source-output.c
@@ -82,7 +82,6 @@ pulse_source_output_new (PulseSource *source,
* Also make sure to make the name unique by including the PulseAudio index. */
name = g_strdup_printf ("pulse-input-control-%lu", (gulong) info->index);
-#if PA_CHECK_VERSION(1, 0, 0)
if (info->has_volume) {
flags |=
MATE_MIXER_STREAM_CONTROL_VOLUME_READABLE |
@@ -91,14 +90,6 @@ pulse_source_output_new (PulseSource *source,
if (info->volume_writable)
flags |= MATE_MIXER_STREAM_CONTROL_VOLUME_WRITABLE;
}
-#else
- /* Pre-1.0 PulseAudio does not include the has_volume and volume_writable
- * fields, but does include the volume info, so let's give it a try */
- flags |=
- MATE_MIXER_STREAM_CONTROL_VOLUME_READABLE |
- MATE_MIXER_STREAM_CONTROL_VOLUME_WRITABLE |
- MATE_MIXER_STREAM_CONTROL_HAS_DECIBEL;
-#endif
if (info->client != PA_INVALID_INDEX) {
app_info = _mate_mixer_app_info_new ();
@@ -157,10 +148,8 @@ pulse_source_output_update (PulseSourceOutput *output,
_mate_mixer_stream_control_set_mute (MATE_MIXER_STREAM_CONTROL (output),
info->mute ? TRUE : FALSE);
-#if PA_CHECK_VERSION(1, 0, 0)
pulse_stream_control_set_channel_map (PULSE_STREAM_CONTROL (output),
&info->channel_map);
-
if (info->has_volume)
pulse_stream_control_set_cvolume (PULSE_STREAM_CONTROL (output),
&info->volume,
@@ -169,14 +158,6 @@ pulse_source_output_update (PulseSourceOutput *output,
pulse_stream_control_set_cvolume (PULSE_STREAM_CONTROL (output),
NULL,
0);
-#else
- pulse_stream_control_set_channel_map (PULSE_STREAM_CONTROL (output),
- &info->channel_map);
-
- pulse_stream_control_set_volume (PULSE_STREAM_CONTROL (output),
- &info->volume,
- 0);
-#endif
g_object_thaw_notify (G_OBJECT (output));
}