[SCM] gsequencer/upstream: bugfixes to ags_channel_reset_recall_ids()
jkraehemann-guest at users.alioth.debian.org
jkraehemann-guest at users.alioth.debian.org
Sun Jun 14 16:07:01 UTC 2015
The following commit has been merged in the upstream branch:
commit 048ebda56159c9e21c9716091aa802c779e5a79b
Author: Joël Krähemann <weedlight at gmail.com>
Date: Sat Apr 18 16:36:14 2015 +0000
bugfixes to ags_channel_reset_recall_ids()
diff --git a/src/ags/audio/ags_audio.c b/src/ags/audio/ags_audio.c
index 88bafd7..3090d1e 100644
--- a/src/ags/audio/ags_audio.c
+++ b/src/ags/audio/ags_audio.c
@@ -2716,6 +2716,11 @@ ags_audio_duplicate_recall(AgsAudio *audio,
AgsMutexManager *mutex_manager;
pthread_mutex_t *mutex;
+
+ if(audio == NULL ||
+ recall_id == NULL){
+ return;
+ }
pthread_mutex_lock(&(ags_application_mutex));
@@ -2728,9 +2733,9 @@ ags_audio_duplicate_recall(AgsAudio *audio,
pthread_mutex_lock(mutex);
- //#ifdef AGS_DEBUG
+#ifdef AGS_DEBUG
g_message("ags_audio_duplicate_recall: %s - audio.lines[%u,%u]\n\0", G_OBJECT_TYPE_NAME(audio->machine), audio->output_lines, audio->input_lines);
- //#endif
+#endif
playback = FALSE;
sequencer = FALSE;
@@ -2840,6 +2845,11 @@ void ags_audio_resolve_recall(AgsAudio *audio,
AgsMutexManager *mutex_manager;
pthread_mutex_t *mutex;
+
+ if(audio == NULL ||
+ recall_id == NULL){
+ return;
+ }
pthread_mutex_lock(&(ags_application_mutex));
@@ -2896,7 +2906,12 @@ ags_audio_init_recall(AgsAudio *audio, gint stage,
AgsMutexManager *mutex_manager;
pthread_mutex_t *mutex;
-
+
+ if(audio == NULL ||
+ recall_id == NULL){
+ return;
+ }
+
pthread_mutex_lock(&(ags_application_mutex));
mutex_manager = ags_mutex_manager_get_instance();
@@ -3040,6 +3055,11 @@ ags_audio_play(AgsAudio *audio,
AgsMutexManager *mutex_manager;
pthread_mutex_t *mutex;
+
+ if(audio == NULL ||
+ recall_id == NULL){
+ return;
+ }
pthread_mutex_lock(&(ags_application_mutex));
diff --git a/src/ags/audio/ags_channel.c b/src/ags/audio/ags_channel.c
index 5a6dbb9..b49b670 100644
--- a/src/ags/audio/ags_channel.c
+++ b/src/ags/audio/ags_channel.c
@@ -1590,16 +1590,14 @@ ags_channel_set_recycling(AgsChannel *channel,
while(recall_id != NULL){
if(AGS_IS_OUTPUT(channel)){
if(AGS_RECALL_ID(recall_id->data)->recycling != NULL &&
- AGS_IS_INPUT(AGS_RECYCLING(AGS_RECALL_ID(recall_id->data)->recycling)->channel)){
+ !AGS_IS_OUTPUT(AGS_RECYCLING(AGS_RECALL_ID(recall_id->data)->recycling)->channel)){
recall_id = recall_id->next;
continue;
}
-
- old_recycling_container = (AgsRecyclingContainer *) AGS_RECALL_ID(recall_id->data)->recycling_container;
}else{
if(AGS_RECALL_ID(recall_id->data)->recycling != NULL &&
- AGS_IS_OUTPUT(AGS_RECYCLING(AGS_RECALL_ID(recall_id->data)->recycling)->channel)){
+ !AGS_IS_INPUT(AGS_RECYCLING(AGS_RECALL_ID(recall_id->data)->recycling)->channel)){
recall_id = recall_id->next;
continue;
@@ -1611,19 +1609,17 @@ ags_channel_set_recycling(AgsChannel *channel,
recycling_container = ags_recycling_container_reset_recycling(old_recycling_container,
old_first_recycling, old_last_recycling,
first_recycling, last_recycling);
-
+ recycling_container->parent = old_recycling_container->parent;
+
g_object_set(recall_id->data,
"recycling-container\0", recycling_container,
NULL);
ags_audio_add_recycling_container(audio,
recycling_container);
- if(ags_recall_id_find_recycling_container(channel->recall_id,
- AGS_RECALL_ID(recall_id->data)->recycling_container) != NULL){
- ags_channel_recursive_reset_recycling_container(channel,
- old_recycling_container,
- recycling_container);
- }
+ ags_channel_recursive_reset_recycling_container(channel,
+ old_recycling_container,
+ recycling_container);
recall_id = recall_id->next;
}
@@ -1778,6 +1774,9 @@ ags_channel_recursive_reset_recycling_container(AgsChannel *channel,
}
if(AGS_IS_INPUT(channel)){
+ ags_channel_reset_recycling_container(AGS_AUDIO(channel->audio)->recall_id);
+ ags_channel_reset_recycling_container(channel->recall_id);
+
ags_channel_recursive_reset_recycling_container_down_output(channel->link);
ags_channel_recursive_reset_recycling_container_up(channel);
}else{
@@ -1914,6 +1913,11 @@ ags_channel_resolve_recall(AgsChannel *channel,
AgsRecall *recall;
GList *list_recall;
+ if(channel == NULL ||
+ recall_id == NULL){
+ return;
+ }
+
#ifdef AGS_DEBUG
g_message("resolve channel %d\0", channel->line);
#endif
@@ -1952,7 +1956,9 @@ ags_channel_play(AgsChannel *channel,
AgsRecall *recall;
GList *list, *list_next;
- if(recall_id == NULL || recall_id->recycling_container == NULL){
+ if(channel == NULL ||
+ recall_id == NULL ||
+ recall_id->recycling_container == NULL){
return;
}
@@ -2665,6 +2671,11 @@ ags_channel_duplicate_recall(AgsChannel *channel,
GList *list_recall;
gboolean playback, sequencer, notation;
+ if(channel == NULL ||
+ recall_id == NULL){
+ return;
+ }
+
//#ifdef AGS_DEBUG
g_message("duplicate channel %d\0", channel->line);
//#endif
@@ -2711,9 +2722,9 @@ ags_channel_duplicate_recall(AgsChannel *channel,
/* duplicate the recall */
copy = ags_recall_duplicate(recall, recall_id);
- //#ifdef AGS_DEBUG
+#ifdef AGS_DEBUG
g_message("recall duplicated: %s\0", G_OBJECT_TYPE_NAME(copy));
- //#endif
+#endif
/* set appropriate flag */
if(playback){
@@ -2757,6 +2768,11 @@ ags_channel_init_recall(AgsChannel *channel, gint stage,
{
AgsRecall *recall;
GList *list_recall;
+
+ if(channel == NULL ||
+ recall_id == NULL){
+ return;
+ }
#ifdef AGS_DEBUG
g_message("ags_channel_init_recall@%d - audio::IN[%u]; channel: %llu %llu\n\0",
@@ -3152,7 +3168,7 @@ ags_channel_recursive_play_init(AgsChannel *channel, gint stage,
"recycling_container\0", default_recall_id->recycling_container,
"recycling\0", input->first_recycling,
NULL);
- recall_id[input->pad] = recall_id;
+ recall_id[input->pad] = input_recall_id;
ags_channel_add_recall_id(input,
input_recall_id);
@@ -3276,7 +3292,7 @@ ags_channel_recursive_play_init(AgsChannel *channel, gint stage,
/* output recall id */
output_recall_id = g_object_new(AGS_TYPE_RECALL_ID,
- "recycling_container\0", recycling_container,
+ "recycling_container\0", recycling_container,
"recycling\0", output->first_recycling,
NULL);
ags_channel_add_recall_id(output,
@@ -4957,7 +4973,7 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
AgsRecyclingContainer *recycling_container;
GList *link_devout_play_list, *channel_devout_play_list;
GList *link_invalid_recall_id_list, *channel_invalid_recall_id_list;
- GList *channel_recall_id_list, *link_recall_id_list;
+ GList *channel_recall_id_list, *link_recall_id_list, *recycled_recall_id_list;
GList *parent;
GList *list;
gint stage;
@@ -4992,7 +5008,9 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
GList *list, gboolean collect_recall_id);
auto GList* ags_channel_recursive_collect_devout_play_up(AgsChannel *channel,
gboolean collect_recall_id);
-
+ auto GList* ags_channel_recursive_collect_recycled(AgsChannel *channel,
+ GList *collected_recall_id);
+
/* tree iterator functions */
auto void ags_channel_recursive_reset_recall_id_down_input(AgsChannel *output,
GList *recall_id_list, GList *devout_play_list,
@@ -5036,7 +5054,6 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
void ags_audio_reset_recall_id(AgsAudio *audio,
GList *recall_id_list, GList *devout_play_list,
GList *invalid_recall_id_list){
- AgsChannel *channel;
AgsRecall *recall;
AgsRecallID *recall_id;
AgsDevoutPlay *devout_play;
@@ -5078,90 +5095,126 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
while(recall_id_list != NULL){
/* playback */
- devout_play = AGS_DEVOUT_PLAY(devout_play_list->data);
- playback = ((AGS_DEVOUT_PLAY_PLAYBACK & (devout_play->flags)) != 0) ? TRUE: FALSE;
-
- if(playback){
+ if(devout_play_list != NULL){
+ devout_play = AGS_DEVOUT_PLAY(devout_play_list->data);
+ playback = ((AGS_DEVOUT_PLAY_PLAYBACK & (devout_play->flags)) != 0) ? TRUE: FALSE;
+ }else{
+ playback = (((AGS_RECALL_ID_PLAYBACK & (AGS_RECALL_ID(recall_id_list->data)->flags)) != 0) ? TRUE: FALSE);
+ }
+
+ if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) == 0){
+ if(playback){
#ifdef AGS_DEBUG
- g_message("recall id reset: play\0");
+ g_message("recall id reset: play\0");
#endif
- /* append new recall id */
- recall_id = g_object_new(AGS_TYPE_RECALL_ID,
- "recycling\0", AGS_RECALL_ID(recall_id_list->data)->recycling,
- "recycling_container\0", AGS_RECALL_ID(recall_id_list->data)->recycling_container,
- NULL);
- ags_audio_add_recall_id(audio,
- recall_id);
+ /* append new recall id */
+ recall_id = g_object_new(AGS_TYPE_RECALL_ID,
+ "recycling\0", AGS_RECALL_ID(recall_id_list->data)->recycling,
+ "recycling_container\0", AGS_RECALL_ID(recall_id_list->data)->recycling_container,
+ NULL);
+ ags_audio_add_recall_id(audio,
+ recall_id);
- if((AGS_RECALL_ID_PLAYBACK & (AGS_RECALL_ID(recall_id_list->data)->flags)) != 0){
- recall_id->flags |= AGS_RECALL_ID_PLAYBACK;
- }
+ if((AGS_RECALL_ID_PLAYBACK & (AGS_RECALL_ID(recall_id_list->data)->flags)) != 0){
+ recall_id->flags |= AGS_RECALL_ID_PLAYBACK;
+ }
- if((AGS_RECALL_ID_SEQUENCER & (AGS_RECALL_ID(recall_id_list->data)->flags)) != 0){
- recall_id->flags |= AGS_RECALL_ID_SEQUENCER;
- }
+ if((AGS_RECALL_ID_SEQUENCER & (AGS_RECALL_ID(recall_id_list->data)->flags)) != 0){
+ recall_id->flags |= AGS_RECALL_ID_SEQUENCER;
+ }
- if((AGS_RECALL_ID_NOTATION & (AGS_RECALL_ID(recall_id_list->data)->flags)) != 0){
- recall_id->flags |= AGS_RECALL_ID_NOTATION;
- }
+ if((AGS_RECALL_ID_NOTATION & (AGS_RECALL_ID(recall_id_list->data)->flags)) != 0){
+ recall_id->flags |= AGS_RECALL_ID_NOTATION;
+ }
- /* iterate */
- recall_id_list = recall_id_list->next;
- devout_play_list = devout_play_list->next;
- }
+ /* iterate */
+ recall_id_list = recall_id_list->next;
- if(recall_id_list == NULL){
- break;
- }
+ if(devout_play_list != NULL){
+ devout_play_list = devout_play_list->next;
+ }
+ }
- /* sequencer */
- devout_play = AGS_DEVOUT_PLAY(devout_play_list->data);
- sequencer = ((AGS_DEVOUT_PLAY_SEQUENCER & (devout_play->flags)) != 0) ? TRUE: FALSE;
+ if(recall_id_list == NULL){
+ break;
+ }
- if(sequencer){
+ /* sequencer */
+ devout_play = AGS_DEVOUT_PLAY(devout_play_list->data);
+
+ if(devout_play_list != NULL){
+ devout_play = AGS_DEVOUT_PLAY(devout_play_list->data);
+ sequencer = ((AGS_DEVOUT_PLAY_SEQUENCER & (devout_play->flags)) != 0) ? TRUE: FALSE;
+ }else{
+ sequencer = (((AGS_RECALL_ID_SEQUENCER & (AGS_RECALL_ID(recall_id_list->data)->flags)) != 0) ? TRUE: FALSE);
+ }
+
+ if(sequencer){
#ifdef AGS_DEBUG
- g_message("recall id reset: sequencer\0");
+ g_message("recall id reset: sequencer\0");
#endif
- /* append new recall id */
- recall_id = g_object_new(AGS_TYPE_RECALL_ID,
- "recycling\0", AGS_RECALL_ID(recall_id_list->data)->recycling,
- "recycling_container\0", AGS_RECALL_ID(recall_id_list->data)->recycling_container,
- NULL);
- ags_audio_add_recall_id(audio,
- recall_id);
+ /* append new recall id */
+ recall_id = g_object_new(AGS_TYPE_RECALL_ID,
+ "recycling\0", AGS_RECALL_ID(recall_id_list->data)->recycling,
+ "recycling_container\0", AGS_RECALL_ID(recall_id_list->data)->recycling_container,
+ NULL);
+ ags_audio_add_recall_id(audio,
+ recall_id);
- /* iterate */
- recall_id_list = recall_id_list->next;
- devout_play_list = devout_play_list->next;
+ /* iterate */
+ recall_id_list = recall_id_list->next;
- }
+ if(devout_play_list != NULL){
+ devout_play_list = devout_play_list->next;
+ }
+ }
- if(recall_id_list == NULL){
- break;
- }
+ if(recall_id_list == NULL){
+ break;
+ }
- /* notation */
- devout_play = AGS_DEVOUT_PLAY(devout_play_list->data);
- notation = ((AGS_DEVOUT_PLAY_NOTATION & (devout_play->flags)) != 0) ? TRUE: FALSE;
+ /* notation */
+ devout_play = AGS_DEVOUT_PLAY(devout_play_list->data);
- if(notation){
+ if(devout_play_list != NULL){
+ devout_play = AGS_DEVOUT_PLAY(devout_play_list->data);
+ notation = ((AGS_DEVOUT_PLAY_NOTATION & (devout_play->flags)) != 0) ? TRUE: FALSE;
+ }else{
+ notation = (((AGS_RECALL_ID_NOTATION & (AGS_RECALL_ID(recall_id_list->data)->flags)) != 0) ? TRUE: FALSE);
+ }
+
+ if(notation){
#ifdef AGS_DEBUG
- g_message("recall id reset: notation\0");
+ g_message("recall id reset: notation\0");
#endif
- /* append new recall id */
- recall_id = g_object_new(AGS_TYPE_RECALL_ID,
- "recycling\0", AGS_RECALL_ID(recall_id_list->data)->recycling,
- "recycling_container\0", AGS_RECALL_ID(recall_id_list->data)->recycling_container,
- NULL);
- ags_audio_add_recall_id(audio,
- recall_id);
+ /* append new recall id */
+ recall_id = g_object_new(AGS_TYPE_RECALL_ID,
+ "recycling\0", AGS_RECALL_ID(recall_id_list->data)->recycling,
+ "recycling_container\0", AGS_RECALL_ID(recall_id_list->data)->recycling_container,
+ NULL);
+ ags_audio_add_recall_id(audio,
+ recall_id);
+
+ /* iterate */
+ recall_id_list = recall_id_list->next;
+ if(devout_play_list != NULL){
+ devout_play_list = devout_play_list->next;
+ }
+ }
+ }else{
+ ags_audio_add_recall_id(audio,
+ recall_id_list->data);
+
/* iterate */
recall_id_list = recall_id_list->next;
- devout_play_list = devout_play_list->next;
+
+ if(devout_play_list != NULL){
+ devout_play_list = devout_play_list->next;
+ }
}
}
}
@@ -5169,6 +5222,7 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
void ags_channel_reset_recall_id(AgsChannel *channel,
GList *recall_id_list, GList *devout_play_list,
GList *invalid_recall_id_list){
+ AgsAudio *audio;
AgsRecall *recall;
AgsRecallID *recall_id;
AgsDevoutPlay *devout_play;
@@ -5176,6 +5230,8 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
gboolean play;
gboolean playback, sequencer, notation;
+ audio = channel->audio;
+
while(invalid_recall_id_list != NULL){
recall_id = AGS_RECALL_ID(invalid_recall_id_list->data);
@@ -5203,9 +5259,13 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
while(recall_id_list != NULL){
/* playback */
- devout_play = AGS_DEVOUT_PLAY(devout_play_list->data);
- playback = (((AGS_DEVOUT_PLAY_PLAYBACK & (devout_play->flags)) != 0) ? TRUE: FALSE);
-
+ if(devout_play_list != NULL){
+ devout_play = AGS_DEVOUT_PLAY(devout_play_list->data);
+ playback = (((AGS_DEVOUT_PLAY_PLAYBACK & (devout_play->flags)) != 0) ? TRUE: FALSE);
+ }else{
+ playback = (((AGS_RECALL_ID_PLAYBACK & (AGS_RECALL_ID(recall_id_list->data)->flags)) != 0) ? TRUE: FALSE);
+ }
+
if(playback){
#ifdef AGS_DEBUG
g_message("recall id reset: playback\0");
@@ -5213,7 +5273,7 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
/* append new recall id */
recall_id = g_object_new(AGS_TYPE_RECALL_ID,
- "recycling\0", AGS_RECALL_ID(recall_id_list->data)->recycling,
+ "recycling\0", channel->first_recycling,
"recycling_container\0", AGS_RECALL_ID(recall_id_list->data)->recycling_container,
NULL);
ags_channel_add_recall_id(channel,
@@ -5222,7 +5282,10 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
/* iterate */
recall_id_list = recall_id_list->next;
- devout_play_list = devout_play_list->next;
+
+ if(devout_play_list != NULL){
+ devout_play_list = devout_play_list->next;
+ }
}
if(recall_id_list == NULL){
@@ -5230,9 +5293,13 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
}
/* sequencer */
- devout_play = AGS_DEVOUT_PLAY(devout_play_list->data);
- sequencer = (((AGS_DEVOUT_PLAY_SEQUENCER & (devout_play->flags)) != 0) ? TRUE: FALSE);
-
+ if(devout_play_list != NULL){
+ devout_play = AGS_DEVOUT_PLAY(devout_play_list->data);
+ sequencer = (((AGS_DEVOUT_PLAY_SEQUENCER & (devout_play->flags)) != 0) ? TRUE: FALSE);
+ }else{
+ sequencer = (((AGS_RECALL_ID_SEQUENCER & (AGS_RECALL_ID(recall_id_list->data)->flags)) != 0) ? TRUE: FALSE);
+ }
+
if(sequencer){
#ifdef AGS_DEBUG
g_message("recall id reset: sequencer\0");
@@ -5240,7 +5307,7 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
/* append new recall id */
recall_id = g_object_new(AGS_TYPE_RECALL_ID,
- "recycling\0", AGS_RECALL_ID(recall_id_list->data)->recycling,
+ "recycling\0", channel->first_recycling,
"recycling_container\0", AGS_RECALL_ID(recall_id_list->data)->recycling_container,
NULL);
ags_channel_add_recall_id(channel,
@@ -5249,7 +5316,10 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
/* iterate */
recall_id_list = recall_id_list->next;
- devout_play_list = devout_play_list->next;
+
+ if(devout_play_list != NULL){
+ devout_play_list = devout_play_list->next;
+ }
}
if(recall_id_list == NULL){
@@ -5258,8 +5328,13 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
/* notation */
devout_play = AGS_DEVOUT_PLAY(devout_play_list->data);
- notation = (((AGS_DEVOUT_PLAY_NOTATION & (devout_play->flags)) != 0) ? TRUE: FALSE);
+ if(devout_play_list != NULL){
+ notation = (((AGS_DEVOUT_PLAY_NOTATION & (devout_play->flags)) != 0) ? TRUE: FALSE);
+ }else{
+ notation = (((AGS_RECALL_ID_NOTATION & (AGS_RECALL_ID(recall_id_list->data)->flags)) != 0) ? TRUE: FALSE);
+ }
+
if(notation){
#ifdef AGS_DEBUG
g_message("recall id reset: notation\0");
@@ -5267,16 +5342,19 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
/* append new recall id */
recall_id = g_object_new(AGS_TYPE_RECALL_ID,
- "recycling\0", AGS_RECALL_ID(recall_id_list->data)->recycling,
+ "recycling\0", channel->first_recycling,
"recycling_container\0", AGS_RECALL_ID(recall_id_list->data)->recycling_container,
NULL);
ags_channel_add_recall_id(channel,
recall_id);
recall_id->flags |= AGS_RECALL_ID_NOTATION;
-
+
/* iterate */
recall_id_list = recall_id_list->next;
- devout_play_list = devout_play_list->next;
+
+ if(devout_play_list != NULL){
+ devout_play_list = devout_play_list->next;
+ }
}
}
}
@@ -5289,9 +5367,11 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
recall_id = ags_recall_id_find_recycling_container(audio->recall_id,
AGS_RECALL_ID(recall_id_list->data)->recycling_container);
- ags_audio_duplicate_recall(audio,
- recall_id);
-
+ if(recall_id != NULL){
+ ags_audio_duplicate_recall(audio,
+ recall_id);
+ }
+
recall_id_list = recall_id_list->next;
}
}
@@ -5304,9 +5384,11 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
recall_id = ags_recall_id_find_recycling_container(channel->recall_id,
AGS_RECALL_ID(recall_id_list->data)->recycling_container);
- ags_channel_duplicate_recall(channel,
- recall_id);
-
+ if(recall_id != NULL){
+ ags_channel_duplicate_recall(channel,
+ recall_id);
+ }
+
recall_id_list = recall_id_list->next;
}
}
@@ -5319,9 +5401,11 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
recall_id = ags_recall_id_find_recycling_container(audio->recall_id,
AGS_RECALL_ID(recall_id_list->data)->recycling_container);
- ags_audio_resolve_recall(audio,
- recall_id);
-
+ if(recall_id != NULL){
+ ags_audio_resolve_recall(audio,
+ recall_id);
+ }
+
recall_id_list = recall_id_list->next;
}
}
@@ -5334,9 +5418,11 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
recall_id = ags_recall_id_find_recycling_container(channel->recall_id,
AGS_RECALL_ID(recall_id_list->data)->recycling_container);
- ags_channel_resolve_recall(channel,
- recall_id);
-
+ if(recall_id != NULL){
+ ags_channel_resolve_recall(channel,
+ recall_id);
+ }
+
recall_id_list = recall_id_list->next;
}
}
@@ -5349,9 +5435,11 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
recall_id = ags_recall_id_find_recycling_container(audio->recall_id,
AGS_RECALL_ID(recall_id_list->data)->recycling_container);
- ags_audio_init_recall(audio, stage,
- recall_id);
-
+ if(recall_id != NULL){
+ ags_audio_init_recall(audio, stage,
+ recall_id);
+ }
+
recall_id_list = recall_id_list->next;
}
}
@@ -5365,9 +5453,11 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
recall_id = ags_recall_id_find_recycling_container(channel->recall_id,
AGS_RECALL_ID(recall_id_list->data)->recycling_container);
- ags_channel_init_recall(channel, stage,
- recall_id);
-
+ if(recall_id != NULL){
+ ags_channel_init_recall(channel, stage,
+ recall_id);
+ }
+
recall_id_list = recall_id_list->next;
}
}
@@ -5378,7 +5468,7 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
AgsChannel *current;
if(output == NULL){
- return(NULL);
+ return(list);
}
audio = AGS_AUDIO(output->audio);
@@ -5543,7 +5633,7 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
if(AGS_IS_OUTPUT(channel)){
audio = AGS_AUDIO(current->audio);
- goto ags_channel_recursive_collect_devout_play_upOUTPUT;
+ goto ags_channel_recursive_collect_devout_play_up_OUTPUT;
}
while(current != NULL){
@@ -5596,7 +5686,7 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
current->line);
}
- ags_channel_recursive_collect_devout_play_upOUTPUT:
+ ags_channel_recursive_collect_devout_play_up_OUTPUT:
if(current->devout_play != NULL){
if((AGS_DEVOUT_PLAY_PLAYBACK & (AGS_DEVOUT_PLAY(current->devout_play)->flags)) != 0 &&
AGS_DEVOUT_PLAY(current->devout_play)->recall_id[0] != NULL){
@@ -5635,64 +5725,231 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
return(list);
}
- void ags_channel_recursive_reset_recall_id_down_input(AgsChannel *output,
- GList *recall_id_list, GList *devout_play_list,
- GList *invalid_recall_id_list)
+ GList* ags_channel_recursive_collect_recycled(AgsChannel *channel,
+ GList *collected_recall_id)
{
AgsAudio *audio;
AgsChannel *current;
- GList *next_recall_id_list;
- GList *next_invalid_recall_id_list;
+ GList *recall_id;
+ GList *list;
- audio = AGS_AUDIO(output->audio);
+ if(channel == NULL){
+ return(NULL);
+ }
- next_recall_id_list = recall_id_list;
- next_invalid_recall_id_list = invalid_recall_id_list;
+ current = channel;
+ list = NULL;
- if((AGS_AUDIO_ASYNC & (audio->flags)) != 0){
- current = ags_channel_nth(audio->input, output->audio_channel);
+ if(AGS_IS_OUTPUT(channel)){
+ audio = AGS_AUDIO(current->audio);
- while(current != NULL){
- /* reset AgsInput */
- ags_channel_reset_recall_id(current,
- recall_id_list, devout_play_list,
- invalid_recall_id_list);
-
- /* follow the links */
- ags_channel_recursive_reset_recall_id_down(current->link,
- next_recall_id_list, devout_play_list,
- next_invalid_recall_id_list);
+ goto ags_channel_recursive_collect_devout_play_up_OUTPUT;
+ }
- current = current->next_pad;
+ while(current != NULL){
+ audio = AGS_AUDIO(current->audio);
+
+ /* input */
+ /* nothing to do here */
+
+ if(audio->output == NULL ||
+ (AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) != 0){
+ break;
+ }
+
+ /* output */
+ if((AGS_AUDIO_ASYNC & (audio->flags)) != 0){
+ current = ags_channel_nth(audio->output,
+ current->audio_channel);
+ }else{
+ current = ags_channel_nth(audio->output,
+ current->line);
}
- }else{
- current = ags_channel_nth(audio->input,
- output->line);
- /* reset AgsInput */
- ags_channel_reset_recall_id(current,
- recall_id_list, devout_play_list,
- invalid_recall_id_list);
+ ags_channel_recursive_collect_devout_play_up_OUTPUT:
+ /* nothing to do here */
+
+ current = current->link;
+ }
- /* follow the links */
- ags_channel_recursive_reset_recall_id_down(current->link,
- recall_id_list, devout_play_list,
- next_invalid_recall_id_list);
+ /* input */
+ if(current != NULL &&
+ AGS_IS_INPUT(current)){
+ recall_id = current->recall_id;
+
+ while(recall_id != NULL){
+ if(g_list_find(collected_recall_id,
+ recall_id->data) == NULL){
+ list = g_list_prepend(list,
+ recall_id->data);
+ }
+
+ recall_id = recall_id->next;
+ }
}
- }
- void ags_channel_recursive_reset_recall_id_down(AgsChannel *current,
- GList *recall_id_list, GList *devout_play_list,
- GList *invalid_recall_id_list)
+ return(list);
+ }
+
+ void ags_channel_recursive_reset_recall_id_down_input(AgsChannel *output,
+ GList *recall_id_list, GList *devout_play_list,
+ GList *invalid_recall_id_list)
{
AgsAudio *audio;
- AgsRecycling *recycling;
- AgsRecyclingContainer *recycling_container;
- AgsRecallID *recall_id;
-
+ AgsChannel *current;
+ AgsRecallID *recall_id, *default_recall_id;
+
GList *next_recall_id_list;
GList *next_invalid_recall_id_list;
- guint recycling_length;
+
+ audio = AGS_AUDIO(output->audio);
+
+ /* apply */
+ if((AGS_AUDIO_ASYNC & (audio->flags)) != 0){
+ current = ags_channel_nth(audio->input, output->audio_channel);
+
+ while(current != NULL){
+ /* retrieve next recall id */
+ if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) == 0){
+ next_recall_id_list = recall_id_list;
+ next_invalid_recall_id_list = invalid_recall_id_list;
+ }else{
+ next_recall_id_list = NULL;
+
+ while(recall_id_list != NULL){
+ default_recall_id = recall_id_list->data;
+
+ /* recall id */
+ recall_id = g_object_new(AGS_TYPE_RECALL_ID,
+ "recycling\0", current->first_recycling,
+ "recycling-container\0", default_recall_id->recycling_container,
+ NULL);
+
+ if((AGS_RECALL_ID_PLAYBACK & (AGS_RECALL_ID(recall_id_list->data)->flags)) != 0){
+ recall_id->flags |= AGS_RECALL_ID_PLAYBACK;
+ }
+
+ if((AGS_RECALL_ID_SEQUENCER & (AGS_RECALL_ID(recall_id_list->data)->flags)) != 0){
+ recall_id->flags |= AGS_RECALL_ID_SEQUENCER;
+ }
+
+ if((AGS_RECALL_ID_NOTATION & (AGS_RECALL_ID(recall_id_list->data)->flags)) != 0){
+ recall_id->flags |= AGS_RECALL_ID_NOTATION;
+ }
+
+ next_recall_id_list = g_list_prepend(next_recall_id_list,
+ recall_id);
+
+ recall_id_list = recall_id_list->next;
+ }
+
+ next_recall_id_list = g_list_reverse(next_recall_id_list);
+
+ next_invalid_recall_id_list = NULL;
+
+ while(invalid_recall_id_list != NULL){
+ if(next_invalid_recall_id_list == NULL){
+ next_invalid_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list->data)->recycling_container);
+ }else{
+ next_invalid_recall_id_list = g_list_concat(next_invalid_recall_id_list,
+ ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list->data)->recycling_container));
+ }
+
+ invalid_recall_id_list = invalid_recall_id_list->next;
+ }
+ }
+
+ /* reset AgsInput */
+ ags_channel_reset_recall_id(current,
+ recall_id_list, devout_play_list,
+ invalid_recall_id_list);
+
+ /* follow the links */
+ ags_channel_recursive_reset_recall_id_down(current->link,
+ next_recall_id_list, devout_play_list,
+ next_invalid_recall_id_list);
+
+ current = current->next_pad;
+ }
+ }else{
+ current = ags_channel_nth(audio->input,
+ output->line);
+
+ /* retrieve next recall id */
+ if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) == 0){
+ next_recall_id_list = recall_id_list;
+ next_invalid_recall_id_list = invalid_recall_id_list;
+ }else{
+ next_recall_id_list = NULL;
+
+ while(recall_id_list != NULL){
+ default_recall_id = recall_id_list->data;
+
+ /* recall id */
+ recall_id = g_object_new(AGS_TYPE_RECALL_ID,
+ "recycling\0", current->first_recycling,
+ "recycling-container\0", default_recall_id->recycling_container,
+ NULL);
+
+ if((AGS_RECALL_ID_PLAYBACK & (AGS_RECALL_ID(recall_id_list->data)->flags)) != 0){
+ recall_id->flags |= AGS_RECALL_ID_PLAYBACK;
+ }
+
+ if((AGS_RECALL_ID_SEQUENCER & (AGS_RECALL_ID(recall_id_list->data)->flags)) != 0){
+ recall_id->flags |= AGS_RECALL_ID_SEQUENCER;
+ }
+
+ if((AGS_RECALL_ID_NOTATION & (AGS_RECALL_ID(recall_id_list->data)->flags)) != 0){
+ recall_id->flags |= AGS_RECALL_ID_NOTATION;
+ }
+
+ next_recall_id_list = g_list_prepend(next_recall_id_list,
+ recall_id);
+
+ recall_id_list = recall_id_list->next;
+ }
+
+ next_recall_id_list = g_list_reverse(next_recall_id_list);
+
+ next_invalid_recall_id_list = NULL;
+
+ while(invalid_recall_id_list != NULL){
+ if(next_invalid_recall_id_list == NULL){
+ next_invalid_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list->data)->recycling_container);
+ }else{
+ next_invalid_recall_id_list = g_list_concat(next_invalid_recall_id_list,
+ ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list->data)->recycling_container));
+ }
+
+ invalid_recall_id_list = invalid_recall_id_list->next;
+ }
+ }
+
+ /* reset AgsInput */
+ ags_channel_reset_recall_id(current,
+ next_recall_id_list, devout_play_list,
+ next_invalid_recall_id_list);
+
+ /* follow the links */
+ ags_channel_recursive_reset_recall_id_down(current->link,
+ next_recall_id_list, devout_play_list,
+ next_invalid_recall_id_list);
+ }
+ }
+
+ void ags_channel_recursive_reset_recall_id_down(AgsChannel *current,
+ GList *recall_id_list, GList *devout_play_list,
+ GList *invalid_recall_id_list)
+ {
+ AgsAudio *audio;
+ AgsChannel *input, *last_input;
+ AgsRecycling *recycling;
+ AgsRecyclingContainer *recycling_container;
+ AgsRecallID *recall_id;
+
+ GList *output_recall_id_list, *default_recall_id_list;
+ GList *output_invalid_recall_id_list, *default_invalid_recall_id_list;
+ guint recycling_length;
guint i;
if(current == NULL){
@@ -5700,21 +5957,31 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
}
audio = AGS_AUDIO(current->audio);
-
- /* reset on AgsOutput */
- ags_channel_reset_recall_id(current,
- recall_id_list, devout_play_list,
- invalid_recall_id_list);
+
+ /* input */
+ if((AGS_AUDIO_ASYNC & (audio->flags)) != 0){
+ input = ags_channel_nth(audio->input,
+ current->audio_channel);
+ last_input = ags_channel_pad_last(input);
+ }else{
+ input = ags_channel_nth(audio->input,
+ current->line);
+ last_input = input;
+ }
/* retrieve next recall id list */
if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) == 0){
- next_recall_id_list = recall_id_list;
- next_invalid_recall_id_list = invalid_recall_id_list;
+ default_recall_id_list =
+ output_recall_id_list = recall_id_list;
+
+ default_invalid_recall_id_list =
+ output_invalid_recall_id_list = invalid_recall_id_list;
}else{
- next_recall_id_list = NULL;
+ output_recall_id_list = NULL;
+ default_recall_id_list = NULL;
while(recall_id_list != NULL){
- /* create toplevel recycling container */
+ /* output related - create toplevel recycling container */
recycling_length = ags_recycling_position(current->first_recycling, current->last_recycling->next,
current->last_recycling);
recycling_length += 1;
@@ -5740,59 +6007,133 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
"recycling\0", current->first_recycling,
"recycling-container\0", recycling_container,
NULL);
+
+ if((AGS_RECALL_ID_PLAYBACK & (AGS_RECALL_ID(recall_id_list->data)->flags)) != 0){
+ recall_id->flags |= AGS_RECALL_ID_PLAYBACK;
+ }
+
+ if((AGS_RECALL_ID_SEQUENCER & (AGS_RECALL_ID(recall_id_list->data)->flags)) != 0){
+ recall_id->flags |= AGS_RECALL_ID_SEQUENCER;
+ }
+
+ if((AGS_RECALL_ID_NOTATION & (AGS_RECALL_ID(recall_id_list->data)->flags)) != 0){
+ recall_id->flags |= AGS_RECALL_ID_NOTATION;
+ }
+
g_object_set(recycling_container,
"recall_id\0", recall_id,
NULL);
- next_recall_id_list = g_list_prepend(next_recall_id_list,
- recall_id);
+ output_recall_id_list = g_list_prepend(output_recall_id_list,
+ recall_id);
+
+ /* default related - create toplevel recycling container */
+ recycling_length = ags_recycling_position(input->first_recycling, last_input->last_recycling->next,
+ last_input->last_recycling);
+ recycling_length += 1;
+
+ recycling_container = (AgsRecyclingContainer *) g_object_new(AGS_TYPE_RECYCLING_CONTAINER,
+ "length\0", recycling_length,
+ "parent\0", AGS_RECALL_ID(output_recall_id_list->data)->recycling_container,
+ NULL);
+ ags_audio_add_recycling_container(audio,
+ recycling_container);
+
+ /* recycling */
+ recycling = input->first_recycling;
+
+ for(i = 0; i < recycling_length; i++){
+ recycling_container->recycling[i] = recycling;
+
+ recycling = recycling->next;
+ }
+
+ /* recall id */
+ recall_id = g_object_new(AGS_TYPE_RECALL_ID,
+ "recycling\0", input->first_recycling,
+ "recycling-container\0", recycling_container,
+ NULL);
+
+ if((AGS_RECALL_ID_PLAYBACK & (AGS_RECALL_ID(recall_id_list->data)->flags)) != 0){
+ recall_id->flags |= AGS_RECALL_ID_PLAYBACK;
+ }
+
+ if((AGS_RECALL_ID_SEQUENCER & (AGS_RECALL_ID(recall_id_list->data)->flags)) != 0){
+ recall_id->flags |= AGS_RECALL_ID_SEQUENCER;
+ }
+
+ if((AGS_RECALL_ID_NOTATION & (AGS_RECALL_ID(recall_id_list->data)->flags)) != 0){
+ recall_id->flags |= AGS_RECALL_ID_NOTATION;
+ }
+ g_object_set(recycling_container,
+ "recall_id\0", recall_id,
+ NULL);
+
+ default_recall_id_list = g_list_prepend(default_recall_id_list,
+ recall_id);
+
+ /* iterate */
recall_id_list = recall_id_list->next;
}
- next_recall_id_list = g_list_reverse(next_recall_id_list);
-
- next_invalid_recall_id_list = NULL;
+ default_recall_id_list = g_list_reverse(default_recall_id_list);
+
+ /* invalid recall id list */
+ output_invalid_recall_id_list = NULL;
+ default_invalid_recall_id_list = NULL;
while(invalid_recall_id_list != NULL){
- if(next_invalid_recall_id_list == NULL){
- next_invalid_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list->data)->recycling_container);
+ if(output_invalid_recall_id_list == NULL){
+ output_invalid_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list->data)->recycling_container);
+
+ default_invalid_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(output_invalid_recall_id_list->data)->recycling_container);
}else{
- next_invalid_recall_id_list = g_list_concat(next_invalid_recall_id_list,
- ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list->data)->recycling_container));
+ output_invalid_recall_id_list = g_list_concat(output_invalid_recall_id_list,
+ ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list->data)->recycling_container));
+
+ default_invalid_recall_id_list = g_list_concat(default_invalid_recall_id_list,
+ ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list->data)->recycling_container));
}
invalid_recall_id_list = invalid_recall_id_list->next;
}
}
+ /* reset on AgsOutput */
+ ags_channel_reset_recall_id(current,
+ output_recall_id_list, devout_play_list,
+ output_invalid_recall_id_list);
+
+
if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) != 0){
/* reset on AgsAudio */
ags_audio_reset_recall_id(audio,
- recall_id_list, devout_play_list,
- invalid_recall_id_list);
+ output_recall_id_list, devout_play_list,
+ output_invalid_recall_id_list);
/* reset new recall id on AgsAudio */
ags_audio_reset_recall_id(audio,
- next_recall_id_list, devout_play_list,
- next_invalid_recall_id_list);
+ default_recall_id_list, devout_play_list,
+ default_invalid_recall_id_list);
}else{
/* reset on AgsAudio */
ags_audio_reset_recall_id(audio,
- recall_id_list, devout_play_list,
- invalid_recall_id_list);
+ output_recall_id_list, devout_play_list,
+ output_invalid_recall_id_list);
}
/* follow the links */
ags_channel_recursive_reset_recall_id_down_input(current,
- recall_id_list, devout_play_list,
- next_invalid_recall_id_list);
+ default_recall_id_list, devout_play_list,
+ default_invalid_recall_id_list);
/* free allocated lists */
if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) != 0){
- g_list_free_full(next_recall_id_list,
- g_object_unref);
- g_list_free(next_invalid_recall_id_list);
+ g_list_free(output_recall_id_list);
+ g_list_free(default_recall_id_list);
+ g_list_free(output_invalid_recall_id_list);
+ g_list_free(default_invalid_recall_id_list);
}
}
@@ -5810,6 +6151,10 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
if(AGS_IS_OUTPUT(channel)){
audio = AGS_AUDIO(current->audio);
+
+ ags_audio_reset_recall_id(audio,
+ recall_id_list, devout_play_list,
+ invalid_recall_id_list);
goto ags_channel_tillrecycling_reset_recall_id_upOUTPUT;
}
@@ -5823,10 +6168,6 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
invalid_recall_id_list);
- if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) != 0){
- break;
- }
-
/* audio */
ags_audio_reset_recall_id(audio,
recall_id_list, devout_play_list,
@@ -5850,14 +6191,10 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
recall_id_list, devout_play_list,
invalid_recall_id_list);
- ags_audio_reset_recall_id(audio,
- recall_id_list, devout_play_list,
- invalid_recall_id_list);
-
current = current->link;
}
}
-
+
void ags_channel_recursive_unset_recall_id_down_input(AgsChannel *output,
GList *invalid_recall_id_list)
{
@@ -6073,7 +6410,6 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
AgsAudio *audio;
AgsChannel *current;
- GList *next_recall_id_list;
audio = AGS_AUDIO(output->audio);
@@ -6087,33 +6423,9 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
recall_id_list);
if(current->link != NULL){
- /* retrieve next recall id list */
- if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
- next_recall_id_list = recall_id_list;
- }else{
- next_recall_id_list = NULL;
-
- while(recall_id_list != NULL){
- if(next_recall_id_list == NULL){
- next_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container);
- }else{
- next_recall_id_list = g_list_concat(next_recall_id_list,
- ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container));
- }
-
- recall_id_list = recall_id_list->next;
- }
- }
-
/* follow the links */
- if(next_recall_id_list != NULL){
- ags_channel_recursive_duplicate_recall_down(current->link,
- next_recall_id_list);
- }
-
- if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
- g_list_free(next_recall_id_list);
- }
+ ags_channel_recursive_duplicate_recall_down(current->link,
+ recall_id_list);
}
current = current->next_pad;
@@ -6126,32 +6438,10 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
ags_channel_recursive_reset_channel_duplicate_recall(current,
recall_id_list);
- /* retrieve next recall id list */
- if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
- next_recall_id_list = recall_id_list;
- }else{
- next_recall_id_list = NULL;
-
- while(recall_id_list != NULL){
- if(next_recall_id_list == NULL){
- next_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container);
- }else{
- next_recall_id_list = g_list_concat(next_recall_id_list,
- ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container));
- }
-
- recall_id_list = recall_id_list->next;
- }
- }
-
/* follow the links */
- if(next_recall_id_list != NULL){
+ if(current->link != NULL){
ags_channel_recursive_duplicate_recall_down(current->link,
- next_recall_id_list);
- }
-
- if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
- g_list_free(next_recall_id_list);
+ recall_id_list);
}
}
}
@@ -6159,54 +6449,58 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
GList *recall_id_list){
AgsAudio *audio;
- GList *next_recall_id_list;
+ GList *next_recall_id_list, *default_recall_id_list;
if(current == NULL)
return;
audio = AGS_AUDIO(current->audio);
- /* duplicate output */
- ags_channel_recursive_reset_channel_duplicate_recall(current,
- recall_id_list);
-
/* retrieve next recall id list */
- if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
+ if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) == 0){
next_recall_id_list = recall_id_list;
+ default_recall_id_list = recall_id_list;
}else{
next_recall_id_list = NULL;
-
+ default_recall_id_list = NULL;
+
while(recall_id_list != NULL){
if(next_recall_id_list == NULL){
next_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container);
+
+ default_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(next_recall_id_list->data)->recycling_container);
}else{
next_recall_id_list = g_list_concat(next_recall_id_list,
ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container));
+
+ default_recall_id_list = g_list_concat(default_recall_id_list,
+ ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(next_recall_id_list->data)->recycling_container));
}
recall_id_list = recall_id_list->next;
}
}
-
+
+ /* duplicate output */
+ ags_channel_recursive_reset_channel_duplicate_recall(current,
+ next_recall_id_list);
+
/* duplicate audio */
ags_channel_recursive_reset_audio_duplicate_recall(audio,
- recall_id_list);
-
- if(next_recall_id_list != NULL){
- if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) != 0){
- ags_channel_recursive_reset_audio_duplicate_recall(audio,
- next_recall_id_list);
- }
+ next_recall_id_list);
+
+ if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) != 0){
+ ags_channel_recursive_reset_audio_duplicate_recall(audio,
+ default_recall_id_list);
}
/* go down */
- if(next_recall_id_list != NULL){
- ags_channel_recursive_duplicate_recall_down_input(current,
- next_recall_id_list);
- }
+ ags_channel_recursive_duplicate_recall_down_input(current,
+ default_recall_id_list);
if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
g_list_free(next_recall_id_list);
+ g_list_free(default_recall_id_list);
}
}
void ags_channel_tillrecycling_duplicate_recall_up(AgsChannel *channel,
@@ -6229,12 +6523,7 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
/* duplicate input */
ags_channel_recursive_reset_channel_duplicate_recall(current,
- recall_id_list);
-
-
- if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) != 0){
- break;
- }
+ recall_id_list);
/* duplicate audio */
ags_channel_recursive_reset_audio_duplicate_recall(audio,
@@ -6269,7 +6558,6 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
{
AgsAudio *audio;
AgsChannel *current;
- GList *next_recall_id_list;
audio = AGS_AUDIO(output->audio);
@@ -6283,33 +6571,9 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
recall_id_list);
if(current->link != NULL){
- /* retrieve next recall id list */
- if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
- next_recall_id_list = recall_id_list;
- }else{
- next_recall_id_list = NULL;
-
- while(recall_id_list != NULL){
- if(next_recall_id_list == NULL){
- next_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container);
- }else{
- next_recall_id_list = g_list_concat(next_recall_id_list,
- ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container));
- }
-
- recall_id_list = recall_id_list->next;
- }
- }
-
/* follow the links */
- if(next_recall_id_list != NULL){
- ags_channel_recursive_resolve_recall_down(current->link,
- next_recall_id_list);
- }
-
- if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
- g_list_free(next_recall_id_list);
- }
+ ags_channel_recursive_resolve_recall_down(current->link,
+ recall_id_list);
}
current = current->next_pad;
@@ -6322,32 +6586,10 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
ags_channel_recursive_reset_channel_resolve_recall(current,
recall_id_list);
- /* retrieve next recall id list */
- if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
- next_recall_id_list = recall_id_list;
- }else{
- next_recall_id_list = NULL;
-
- while(recall_id_list != NULL){
- if(next_recall_id_list == NULL){
- next_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container);
- }else{
- next_recall_id_list = g_list_concat(next_recall_id_list,
- ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container));
- }
-
- recall_id_list = recall_id_list->next;
- }
- }
-
/* follow the links */
- if(next_recall_id_list != NULL){
+ if(current->link != NULL){
ags_channel_recursive_resolve_recall_down(current->link,
- next_recall_id_list);
- }
-
- if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
- g_list_free(next_recall_id_list);
+ recall_id_list);
}
}
}
@@ -6355,54 +6597,58 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
GList *recall_id_list)
{
AgsAudio *audio;
- GList *next_recall_id_list;
+ GList *next_recall_id_list, *default_recall_id_list;
if(current == NULL)
return;
audio = AGS_AUDIO(current->audio);
- /* resolve output */
- ags_channel_recursive_reset_channel_resolve_recall(current,
- recall_id_list);
-
/* retrieve next recall id list */
- if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
+ if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) == 0){
next_recall_id_list = recall_id_list;
+ default_recall_id_list = recall_id_list;
}else{
next_recall_id_list = NULL;
+ default_recall_id_list = NULL;
while(recall_id_list != NULL){
if(next_recall_id_list != NULL){
next_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container);
+
+ default_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(next_recall_id_list->data)->recycling_container);
}else{
next_recall_id_list = g_list_concat(next_recall_id_list,
ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container));
+
+ default_recall_id_list = g_list_concat(default_recall_id_list,
+ ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(next_recall_id_list->data)->recycling_container));
}
recall_id_list = recall_id_list->next;
}
}
-
+
+ /* resolve output */
+ ags_channel_recursive_reset_channel_resolve_recall(current,
+ next_recall_id_list);
+
/* resolve audio */
ags_channel_recursive_reset_audio_resolve_recall(audio,
- recall_id_list);
+ next_recall_id_list);
- if(next_recall_id_list != NULL){
- if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
- ags_channel_recursive_reset_audio_resolve_recall(audio,
- next_recall_id_list);
- }
+ if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) != 0){
+ ags_channel_recursive_reset_audio_resolve_recall(audio,
+ default_recall_id_list);
}
/* go down */
- if(next_recall_id_list != NULL){
- ags_channel_recursive_resolve_recall_down_input(current,
- next_recall_id_list);
- }
+ ags_channel_recursive_resolve_recall_down_input(current,
+ default_recall_id_list);
if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
g_list_free(next_recall_id_list);
+ g_list_free(default_recall_id_list);
}
}
void ags_channel_tillrecycling_resolve_recall_up(AgsChannel *channel,
@@ -6429,10 +6675,6 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
recall_id_list);
- if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) != 0){
- break;
- }
-
/* resolve audio */
ags_channel_recursive_reset_audio_resolve_recall(audio,
recall_id_list);
@@ -6465,7 +6707,6 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
{
AgsAudio *audio;
AgsChannel *current;
- GList *next_recall_id_list;
audio = AGS_AUDIO(output->audio);
@@ -6473,71 +6714,28 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
current = ags_channel_nth(audio->input, output->audio_channel);
while(current != NULL){
- /* retrieve next recall id list */
- if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
- next_recall_id_list = recall_id_list;
- }else{
- next_recall_id_list = NULL;
-
- while(recall_id_list != NULL){
- if(next_recall_id_list == NULL){
- next_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container);
- }else{
- next_recall_id_list = g_list_concat(next_recall_id_list,
- ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container));
- }
-
- recall_id_list = recall_id_list->next;
- }
- }
/* follow the links */
- if(next_recall_id_list != NULL){
- ags_channel_recursive_init_recall_down(current->link,
- next_recall_id_list);
- }
+ ags_channel_recursive_init_recall_down(current->link,
+ recall_id_list);
/* init AgsInput */
ags_channel_recursive_reset_channel_init_recall(current,
recall_id_list);
- /* free allocated lists */
- if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) != 0){
- g_list_free(next_recall_id_list);
- }
-
current = current->next_pad;
}
}else{
current = ags_channel_nth(audio->input, output->line);
-
- /* retrieve next recall id list */
- if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
- next_recall_id_list = recall_id_list;
- }else{
- next_recall_id_list = NULL;
-
- while(recall_id_list != NULL){
- next_recall_id_list = g_list_concat(next_recall_id_list,
- ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container));
-
- recall_id_list = recall_id_list->next;
- }
- }
/* follow the links */
- if(next_recall_id_list != NULL){
- ags_channel_recursive_init_recall_down(current->link,
- next_recall_id_list);
- }
+ ags_channel_recursive_init_recall_down(current->link,
+ recall_id_list);
/* init AgsInput */
- ags_channel_recursive_reset_channel_init_recall(current,
- recall_id_list);
-
- /* free allocated lists */
- if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) != 0){
- g_list_free(next_recall_id_list);
+ if(current->link != NULL){
+ ags_channel_recursive_reset_channel_init_recall(current,
+ recall_id_list);
}
}
}
@@ -6545,7 +6743,7 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
GList *recall_id_list)
{
AgsAudio *audio;
- GList *next_recall_id_list;
+ GList *next_recall_id_list, *default_recall_id_list;
if(current == NULL)
return;
@@ -6553,17 +6751,24 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
audio = AGS_AUDIO(current->audio);
/* retrieve next recall id list */
- if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
+ if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) == 0){
next_recall_id_list = recall_id_list;
+ default_recall_id_list = recall_id_list;
}else{
next_recall_id_list = NULL;
-
+ default_recall_id_list = NULL;
+
while(recall_id_list != NULL){
if(next_recall_id_list == NULL){
next_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container);
+
+ default_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(next_recall_id_list->data)->recycling_container);
}else{
next_recall_id_list = g_list_concat(next_recall_id_list,
ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container));
+
+ default_recall_id_list = g_list_concat(default_recall_id_list,
+ ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(next_recall_id_list->data)->recycling_container));
}
recall_id_list = recall_id_list->next;
@@ -6571,31 +6776,25 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
}
/* follow the links */
- if(next_recall_id_list != NULL){
- ags_channel_recursive_resolve_recall_down_input(current,
- next_recall_id_list);
- }
+ ags_channel_recursive_resolve_recall_down_input(current,
+ default_recall_id_list);
/* init audio */
- if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
- ags_channel_recursive_reset_audio_init_recall(audio,
- next_recall_id_list);
- }
-
+ ags_channel_recursive_reset_audio_init_recall(audio,
+ next_recall_id_list);
- if(next_recall_id_list != NULL){
- if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
- ags_channel_recursive_reset_audio_init_recall(audio,
- next_recall_id_list);
+ if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) != 0){
+ ags_channel_recursive_reset_audio_init_recall(audio,
+ default_recall_id_list);
}
- }
/* init output */
ags_channel_recursive_reset_channel_init_recall(current,
- recall_id_list);
+ next_recall_id_list);
- if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
+ if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) != 0){
g_list_free(next_recall_id_list);
+ g_list_free(default_recall_id_list);
}
}
void ags_channel_tillrecycling_init_recall_up(AgsChannel *channel,
@@ -6621,11 +6820,6 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
ags_channel_recursive_reset_channel_init_recall(current,
recall_id_list);
-
- if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) != 0){
- break;
- }
-
/* init audio */
ags_channel_recursive_reset_audio_init_recall(audio,
recall_id_list);
@@ -6694,6 +6888,10 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
link_recall_id_list = ags_channel_recursive_collect_devout_play_up(link,
TRUE);
+ recycled_recall_id_list = NULL;
+ recycled_recall_id_list = ags_channel_recursive_collect_recycled(link,
+ link_recall_id_list);
+
/* retrieve invalid lower */
channel_invalid_recall_id_list = NULL;
channel_invalid_recall_id_list = ags_channel_tillrecycling_collect_devout_play_down(old_link_link,
@@ -6709,26 +6907,33 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
ags_channel_recursive_reset_recall_id_down(channel,
link_recall_id_list, link_devout_play_list,
channel_invalid_recall_id_list);
-
+
+ ags_channel_recursive_reset_recall_id_down(channel,
+ recycled_recall_id_list, NULL,
+ NULL);
+
/* go up */
ags_channel_tillrecycling_reset_recall_id_up(link,
channel_recall_id_list, channel_devout_play_list,
link_invalid_recall_id_list);
- /* unset recall ids */
+ /* unset recall ids */
/* go down */
ags_channel_recursive_unset_recall_id_down(old_link_link,
link_invalid_recall_id_list);
/* go up */
ags_channel_tillrecycling_unset_recall_id_up(old_channel_link,
- channel_invalid_recall_id_list);
+ channel_invalid_recall_id_list);
/* duplicate recalls */
/* go down */
ags_channel_recursive_duplicate_recall_down(channel,
link_recall_id_list);
+ ags_channel_recursive_duplicate_recall_down(channel,
+ recycled_recall_id_list);
+
/* go up */
ags_channel_tillrecycling_duplicate_recall_up(link,
channel_recall_id_list);
@@ -6738,6 +6943,9 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
ags_channel_recursive_resolve_recall_down(channel,
link_recall_id_list);
+ ags_channel_recursive_resolve_recall_down(channel,
+ recycled_recall_id_list);
+
/* go up */
ags_channel_tillrecycling_resolve_recall_up(link,
channel_recall_id_list);
@@ -6748,6 +6956,9 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
ags_channel_recursive_init_recall_down(channel,
link_recall_id_list);
+ ags_channel_recursive_init_recall_down(channel,
+ recycled_recall_id_list);
+
/* go up */
ags_channel_tillrecycling_init_recall_up(link,
channel_recall_id_list);
diff --git a/src/ags/audio/ags_recall_channel_run.c b/src/ags/audio/ags_recall_channel_run.c
index f322235..651af09 100644
--- a/src/ags/audio/ags_recall_channel_run.c
+++ b/src/ags/audio/ags_recall_channel_run.c
@@ -897,11 +897,11 @@ ags_recall_channel_run_map_recall_recycling(AgsRecallChannelRun *recall_channel_
"destination\0", destination_recycling,
NULL);
- ags_recall_add_child(AGS_RECALL(recall_channel_run), AGS_RECALL(recall_recycling));
-
- if(destination_recycling != NULL){
- destination_recycling = destination_recycling->next;
- }
+ ags_recall_add_child(AGS_RECALL(recall_channel_run), AGS_RECALL(recall_recycling));
+
+ if(destination_recycling != NULL){
+ destination_recycling = destination_recycling->next;
+ }
}while(destination_recycling != end_destination_recycling);
source_recycling = source_recycling->next;
@@ -916,12 +916,13 @@ ags_recall_channel_run_remap_child_source(AgsRecallChannelRun *recall_channel_ru
{
AgsRecycling *destination_recycling, *source_recycling;
AgsRecallRecycling *recall_recycling;
- GList *list;
+ GList *list, *list_next;
if(recall_channel_run->source == NULL ||
AGS_RECALL(recall_channel_run)->child_type == G_TYPE_NONE ||
- (AGS_RECALL_TEMPLATE & (AGS_RECALL(recall_channel_run)->flags)) != 0)
+ (AGS_RECALL_TEMPLATE & (AGS_RECALL(recall_channel_run)->flags)) != 0){
return;
+ }
/* remove old */
if(old_start_changed_region != NULL){
@@ -936,18 +937,15 @@ ags_recall_channel_run_remap_child_source(AgsRecallChannelRun *recall_channel_ru
list = ags_recall_get_children(AGS_RECALL(recall_channel_run));
while(list != NULL){
+ list_next = list->next;
+
if(AGS_RECALL_RECYCLING(list->data)->source == source_recycling){
recall = AGS_RECALL(list->data);
- recall->flags |= AGS_RECALL_HIDE;
- cancel_recall = ags_cancel_recall_new(recall,
- NULL);
-
- ags_task_thread_append_task(AGS_TASK_THREAD(AGS_AUDIO_LOOP(AGS_MAIN(devout->ags_main)->main_loop)->task_thread),
- (AgsTask *) cancel_recall);
+ ags_recall_remove(recall);
}
- list = list->next;
+ list = list_next;
}
source_recycling = source_recycling->next;
@@ -959,16 +957,20 @@ ags_recall_channel_run_remap_child_source(AgsRecallChannelRun *recall_channel_ru
source_recycling = new_start_changed_region;
while(source_recycling != new_end_changed_region->next){
+ if(AGS_RECALL(recall_channel_run)->recall_id->recycling_container->parent == NULL){
+ g_warning("a !!!\0");
+ }
+
recall_recycling = g_object_new(AGS_RECALL(recall_channel_run)->child_type,
"devout\0", AGS_RECALL(recall_channel_run)->devout,
"recall_id\0", AGS_RECALL(recall_channel_run)->recall_id,
"audio_channel\0", recall_channel_run->audio_channel,
"source\0", source_recycling,
- "destination\0", NULL,
+ "destination\0", ((recall_channel_run->destination != NULL) ? recall_channel_run->destination->first_recycling: NULL),
NULL);
ags_recall_add_child(AGS_RECALL(recall_channel_run), AGS_RECALL(recall_recycling));
-
+
source_recycling = source_recycling->next;
}
}
@@ -1005,12 +1007,7 @@ ags_recall_channel_run_remap_child_destination(AgsRecallChannelRun *recall_chann
if(AGS_RECALL_RECYCLING(list->data)->destination == destination_recycling){
recall = AGS_RECALL(list->data);
- recall->flags |= AGS_RECALL_HIDE;
- cancel_recall = ags_cancel_recall_new(recall,
- NULL);
-
- ags_task_thread_append_task(AGS_TASK_THREAD(AGS_AUDIO_LOOP(AGS_MAIN(devout->ags_main)->main_loop)->task_thread),
- (AgsTask *) cancel_recall);
+ ags_recall_remove(recall);
}
list = list->next;
@@ -1023,8 +1020,9 @@ ags_recall_channel_run_remap_child_destination(AgsRecallChannelRun *recall_chann
/* add new */
if(new_start_changed_region != NULL){
if(recall_channel_run->source != NULL){
- if(recall_channel_run->source->first_recycling == NULL)
+ if(recall_channel_run->source->first_recycling == NULL){
return;
+ }
destination_recycling = new_start_changed_region;
@@ -1062,7 +1060,6 @@ ags_recall_channel_run_source_recycling_changed_callback(AgsChannel *channel,
/* empty */
}
-
void
ags_recall_channel_run_destination_recycling_changed_callback(AgsChannel *channel,
AgsRecycling *old_start_region, AgsRecycling *old_end_region,
diff --git a/src/ags/audio/ags_recall_recycling.c b/src/ags/audio/ags_recall_recycling.c
index 8b509cc..c5d22e5 100644
--- a/src/ags/audio/ags_recall_recycling.c
+++ b/src/ags/audio/ags_recall_recycling.c
@@ -651,6 +651,14 @@ ags_recall_recycling_source_add_audio_signal_callback(AgsRecycling *source,
recall = AGS_RECALL(recall_recycling);
channel = AGS_RECALL_CHANNEL_RUN(recall->parent)->source;
+ if(audio_signal->recall_id != NULL && recall->recall_id != NULL){
+ g_message("%x, %x\0", recall->recall_id->recycling_container, AGS_RECALL_ID(audio_signal->recall_id)->recycling_container);
+
+ if(recall->recall_id->recycling_container->parent == NULL){
+ g_warning("b !!!\0");
+ }
+ }
+
if((AGS_AUDIO_SIGNAL_TEMPLATE & (audio_signal->flags)) == 0 &&
audio_signal->recall_id != NULL && recall->recall_id != NULL &&
(AGS_RECALL_ID(audio_signal->recall_id)->recycling_container == recall->recall_id->recycling_container ||
@@ -687,6 +695,7 @@ ags_recall_recycling_source_add_audio_signal_callback(AgsRecycling *source,
if(AGS_RECALL(recall_recycling)->child_type != G_TYPE_NONE){
recall_audio_signal = g_object_new(AGS_RECALL(recall_recycling)->child_type,
"devout\0", recall->devout,
+ "recall_id\0", recall->recall_id,
"audio_channel\0", recall_recycling->audio_channel,
"destination\0", recall_recycling->child_destination,
"source\0", audio_signal,
diff --git a/src/ags/audio/ags_recycling_container.c b/src/ags/audio/ags_recycling_container.c
index 4ee31f1..9b205ec 100644
--- a/src/ags/audio/ags_recycling_container.c
+++ b/src/ags/audio/ags_recycling_container.c
@@ -661,10 +661,12 @@ ags_recycling_container_reset_recycling(AgsRecyclingContainer *recycling_contain
/* instantiate */
if(new_context){
new_recycling_container = g_object_new(AGS_TYPE_RECYCLING_CONTAINER,
+ "parent\0", recycling_container->parent,
"length\0", new_length,
NULL);
}else{
new_recycling_container = g_object_new(AGS_TYPE_RECYCLING_CONTAINER,
+ "parent\0", recycling_container->parent,
"length\0", (recycling_container->length -
(last_index - first_index) +
new_length),
diff --git a/src/ags/audio/recall/ags_buffer_audio_signal.c b/src/ags/audio/recall/ags_buffer_audio_signal.c
index d1c90a8..4b44136 100644
--- a/src/ags/audio/recall/ags_buffer_audio_signal.c
+++ b/src/ags/audio/recall/ags_buffer_audio_signal.c
@@ -219,8 +219,11 @@ ags_buffer_audio_signal_run_init_pre(AgsRecall *recall)
AgsDevout *devout;
AgsRecycling *recycling;
AgsAudioSignal *destination;
+ AgsRecyclingContainer *recycling_container, *parent_recycling_container;
+
AgsBufferRecycling *buffer_recycling;
AgsBufferAudioSignal *buffer_audio_signal;
+
GList *stream;
guint buffer_size;
guint samplerate;
@@ -244,11 +247,17 @@ ags_buffer_audio_signal_run_init_pre(AgsRecall *recall)
// recall->flags &= (~AGS_RECALL_PERSISTENT);
recycling = AGS_RECALL_RECYCLING(buffer_recycling)->destination;
+ recycling_container = recall->recall_id->recycling_container;
+ parent_recycling_container = recycling_container->parent;
+ if(parent_recycling_container == NULL){
+ g_warning("!!!\0");
+ }
+
/* create new audio signal */
destination = ags_audio_signal_new((GObject *) devout,
(GObject *) recycling,
- (GObject *) recall->recall_id->recycling_container->parent->recall_id);
+ (GObject *) parent_recycling_container->recall_id);
length = (guint) (2.0 * devout->delay[devout->tic_counter]) + 1;
ags_audio_signal_stream_resize(destination,
length);
diff --git a/src/ags/audio/recall/ags_copy_pattern_channel_run.c b/src/ags/audio/recall/ags_copy_pattern_channel_run.c
index 752bcc0..c7ce9a6 100644
--- a/src/ags/audio/recall/ags_copy_pattern_channel_run.c
+++ b/src/ags/audio/recall/ags_copy_pattern_channel_run.c
@@ -453,13 +453,17 @@ ags_copy_pattern_channel_run_sequencer_alloc_callback(AgsDelayAudioRun *delay_au
while(list != NULL){
if(AGS_RECALL_ID(list->data)->recycling_container->parent == AGS_RECALL(copy_pattern_channel_run)->recall_id->recycling_container){
child_recall_id = list->data;
+ g_message("found\0");
break;
+ }else{
+ g_message("!%x, !%x\0", AGS_RECALL_ID(list->data)->recycling_container->parent, AGS_RECALL(copy_pattern_channel_run)->recall_id->recycling_container);
}
list = list->next;
}
if(list == NULL){
+ g_warning("!!!!\0");
child_recall_id = NULL;
}
}
diff --git a/src/ags/main.c b/src/ags/main.c
index 39c3b51..516bb92 100644
--- a/src/ags/main.c
+++ b/src/ags/main.c
@@ -767,7 +767,7 @@ main(int argc, char **argv)
guint i;
const char *error;
- const rlim_t kStackSize = 128L * 1024L * 1024L; // min stack size = 128 Mb
+ const rlim_t kStackSize = 256L * 1024L * 1024L; // min stack size = 128 Mb
// mtrace();
atexit(ags_signal_cleanup);
--
gsequencer packaging
More information about the pkg-multimedia-commits
mailing list