summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Ratajsky <[email protected]>2016-01-07 14:24:35 +0100
committerraveit65 <[email protected]>2017-02-21 11:55:59 +0100
commit9b4dc2717f267882b3625ef36218e2d6e715fd5d (patch)
treef01ef63b97ef19a686c4d20c925329818d7848bc
parentdc958abbf829572f075e2c9077d8e78154167a17 (diff)
downloadlibmatemixer-9b4dc2717f267882b3625ef36218e2d6e715fd5d.tar.bz2
libmatemixer-9b4dc2717f267882b3625ef36218e2d6e715fd5d.tar.xz
oss: Emit stream-added after streams are loaded
-rw-r--r--backends/oss/oss-device.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/backends/oss/oss-device.c b/backends/oss/oss-device.c
index 8398aed..71af6c6 100644
--- a/backends/oss/oss-device.c
+++ b/backends/oss/oss-device.c
@@ -461,6 +461,15 @@ oss_device_load (OssDevice *device)
} else
g_clear_object (&device->priv->output);
+ if (device->priv->input != NULL)
+ g_signal_emit_by_name (G_OBJECT (device),
+ "stream-added",
+ MATE_MIXER_STREAM (device->priv->input));
+ if (device->priv->output != NULL)
+ g_signal_emit_by_name (G_OBJECT (device),
+ "stream-added",
+ MATE_MIXER_STREAM (device->priv->output));
+
/*
* See if we can use the modify_counter field to optimize polling.
*
@@ -589,16 +598,6 @@ read_mixer_devices (OssDevice *device)
if G_UNLIKELY (control == NULL)
continue;
- if (oss_stream_has_controls (stream) == FALSE) {
- free_stream_list (device);
-
- /* Pretend the stream has just been created now that we are adding
- * the first control */
- g_signal_emit_by_name (G_OBJECT (device),
- "stream-added",
- MATE_MIXER_STREAM (stream));
- }
-
g_debug ("Adding device %s control %s",
name,
mate_mixer_stream_control_get_name (MATE_MIXER_STREAM_CONTROL (control)));