diff options
author | Yves Combe <ycombe@src.gnome.org> | 2006-12-15 00:19:21 (GMT) |
---|---|---|
committer | Yves Combe <ycombe@src.gnome.org> | 2006-12-15 00:19:21 (GMT) |
commit | 140dc546466033a2ca7b96dd2384bc19b59e99f6 (patch) | |
tree | 71df8095ed5d619f500a7034350f1f584dde30ae /src/gc_sound/src/gc-sound-channel.c | |
parent | 859668e6b119d86f593d81ee33482289575d1ecd (diff) |
GC_SOUND gc_sound_append_child now accepts varargs for item properties.
GC_SOUND
gc_sound_append_child now accepts varargs for item properties.
add destroy_after_play property to play and destroy and item.
fix GcSoundPOlicy names (NONE -> POLICY_NONE)
GCOMPRIS
change soundutil to use gc_sound
change config.c to use gc_sound
add mixer, channels music and fx in properties
change memory to use gc_sound (BROKEN now)
TODO
fix memory (policy and cards comparaison broken)
add gc_sound_item_from_gc_filename in python bindings
Diffstat (limited to 'src/gc_sound/src/gc-sound-channel.c')
-rw-r--r-- | src/gc_sound/src/gc-sound-channel.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gc_sound/src/gc-sound-channel.c b/src/gc_sound/src/gc-sound-channel.c index 9c2bf17..28fe33c 100644 --- a/src/gc_sound/src/gc-sound-channel.c +++ b/src/gc_sound/src/gc-sound-channel.c @@ -83,7 +83,7 @@ gboolean gc_sound_channel_play (GcSoundChannel *self, GcSoundPolicy policy; /* item policy if it's set */ - if (gc_sound_item_get_policy(item) == NONE) + if (gc_sound_item_get_policy(item) == POLICY_NONE) policy = self->policy; else policy = gc_sound_item_get_policy(item); @@ -130,10 +130,12 @@ static void gc_sound_channel_destroy (GcSoundObject *self); static void root_destroyed (GcSoundObject *root, gpointer data) { - if (!(GC_SOUND_OBJECT_FLAGS (GC_SOUND_OBJECT(data)) & GC_SOUND_IN_DESTRUCTION)) - gc_sound_channel_destroy (GC_SOUND_OBJECT(data)); - // direct call claas destroy because root is already destroyed. - //GC_SOUND_OBJECT_GET_CLASS(data)->destroy (GC_SOUND_OBJECT(data)); + GcSoundChannel *self = GC_SOUND_CHANNEL(data); + if (!(GC_SOUND_OBJECT_FLAGS (GC_SOUND_OBJECT(data)) & GC_SOUND_IN_DESTRUCTION)) { + g_object_unref(self->root); + self->root = GC_SOUND_ITEM(g_object_new(GC_TYPE_SOUND_ITEM, "channel", self, NULL)); + g_object_ref_sink(G_OBJECT(self->root)); + } } static void |