play_wave_channel_run->audio_signal); ags_connectable_connect(AGS_CONNECTABLE(play_wave_channel_run->audio_signal)); } play_wave_channel_run = (AgsPlayWaveChannelRun *) recall; g_object_get(play_wave_channel_run, "output-soundcard", &output_soundcard, "recall-id", &recall_id, "recall-audio", &play_wave_audio, "recall-channel", &play_wave_channel, "recall-audio-run", &play_wave_audio_run, NULL); delay = ags_soundcard_get_delay(AGS_SOUNDCARD(output_soundcard)); /* get do playback */ g_object_get(play_wave_channel, "do-playback", &port, NULL); g_value_init(&do_playback_value, G_TYPE_BOOLEAN); ags_port_safe_read(port, &do_playback_value); do_playback = g_value_get_boolean(&do_playback_value); g_value_unset(&do_playback_value);
void ags_matrix_set_pads(AgsAudio *audio, GType type, guint pads, guint pads_old, gpointer data) { AgsMachine *machine; AgsMatrix *matrix; AgsChannel *channel, *source; AgsAudioSignal *audio_signal; guint i, j; gboolean grow; GValue value = {0,}; if(pads == pads_old){ return; } matrix = (AgsMatrix *) audio->machine_widget; machine = AGS_MACHINE(matrix); if(type == AGS_TYPE_INPUT){ if(pads < AGS_MATRIX_OCTAVE){ gtk_widget_set_size_request((GtkWidget *) matrix->drawing_area, 32 * AGS_MATRIX_CELL_WIDTH +1, pads * AGS_MATRIX_CELL_HEIGHT +1); }else if(pads_old < AGS_MATRIX_OCTAVE){ gtk_widget_set_size_request((GtkWidget *) matrix->drawing_area, 32 * AGS_MATRIX_CELL_WIDTH +1, AGS_MATRIX_OCTAVE * AGS_MATRIX_CELL_HEIGHT +1); } } if(pads_old == pads) return; if(pads_old < pads) grow = TRUE; else grow = FALSE; if(type == AGS_TYPE_INPUT){ AgsPattern *pattern; GList *list, *notation; if(grow){ /* create pattern */ source = ags_channel_nth(audio->input, pads_old); while(source != NULL){ if(source->pattern == NULL){ source->pattern = g_list_alloc(); source->pattern->data = (gpointer) ags_pattern_new(); ags_pattern_set_dim((AgsPattern *) source->pattern->data, 1, 9, 32); } source = source->next; } if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0){ ags_matrix_input_map_recall(matrix, pads_old); } }else{ } }else{ if(grow){ AgsChannel *current, *output; GList *recall; GList *list; guint stop; source = ags_channel_nth(audio->output, pads_old); if(source != NULL){ AgsAudioSignal *audio_signal; AgsSoundcard *soundcard; gdouble delay; guint stop; soundcard = AGS_SOUNDCARD(AGS_AUDIO(source->audio)->soundcard); delay = ags_soundcard_get_delay(soundcard); stop = (guint) ceil(16.0 * delay * exp2(8.0 - 4.0) + 1.0); audio_signal = ags_audio_signal_new(soundcard, source->first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; // ags_audio_signal_stream_resize(audio_signal, // stop); ags_recycling_add_audio_signal(source->first_recycling, audio_signal); if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0){ ags_matrix_output_map_recall(matrix, pads_old); } } }else{ } } }