xmlNode* ags_panel_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsPanel *panel; AgsFileLookup *file_lookup; xmlNode *node; GList *list; gchar *id; guint i; panel = AGS_PANEL(plugin); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-panel"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", panel, NULL)); xmlAddChild(parent, node); return(node); }
void ags_panel_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsPanel *gobject; AgsFileLookup *file_lookup; GList *list; guint64 length, index; gobject = AGS_PANEL(plugin); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); list = file->lookup; while((list = ags_file_lookup_find_by_node(list, node->parent)) != NULL){ file_lookup = AGS_FILE_LOOKUP(list->data); if(g_signal_handler_find(list->data, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, ags_file_read_machine_resolve_audio, NULL) != 0){ g_signal_connect_after(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_panel_read_resolve_audio), gobject); break; } list = list->next; } }
void ags_panel_input_line_map_recall(AgsLine *line, guint output_pad_start) { AgsPanel *panel; AgsPanelInputLine *panel_input_line; AgsAudio *audio; AgsChannel *source; AgsChannel *current; AgsPlayChannel *play_channel; AgsPlayChannelRunMaster *play_channel_run; GList *list; if((AGS_LINE_MAPPED_RECALL & (line->flags)) != 0 || (AGS_LINE_PREMAPPED_RECALL & (line->flags)) != 0){ return; } panel_input_line = AGS_PANEL_INPUT_LINE(line); audio = AGS_AUDIO(line->channel->audio); panel = AGS_PANEL(audio->machine_widget); source = line->channel; /* ags-play */ ags_recall_factory_create(audio, NULL, NULL, "ags-play-master\0", source->audio_channel, source->audio_channel + 1, source->pad, source->pad + 1, (AGS_RECALL_FACTORY_INPUT, AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_ADD), 0); /* set audio channel */ list = source->play; while((list = ags_recall_template_find_type(list, AGS_TYPE_PLAY_CHANNEL)) != NULL){ GValue audio_channel_value = {0,}; play_channel = AGS_PLAY_CHANNEL(list->data); g_value_init(&audio_channel_value, G_TYPE_UINT64); g_value_set_uint64(&audio_channel_value, source->audio_channel); ags_port_safe_write(play_channel->audio_channel, &audio_channel_value); list = list->next; } /* call parent */ AGS_LINE_CLASS(ags_panel_input_line_parent_class)->map_recall(line, output_pad_start); }
void ags_panel_set_xml_type(AgsPlugin *plugin, gchar *xml_type) { AGS_PANEL(plugin)->xml_type = xml_type; }
gchar* ags_panel_get_xml_type(AgsPlugin *plugin) { return(AGS_PANEL(plugin)->xml_type); }
void ags_panel_set_name(AgsPlugin *plugin, gchar *name) { AGS_PANEL(plugin)->name = name; }
gchar* ags_panel_get_name(AgsPlugin *plugin) { return(AGS_PANEL(plugin)->name); }