예제 #1
0
파일: ags_output.c 프로젝트: weedlight/ags
/**
 * ags_output_find_last_input_recycling:
 * @output: an #AgsOutput
 *
 * Retrieve last input recycling.
 *
 * Returns: the last #AgsRecycling of #AgsAudio
 *
 * Since: 0.4
 */
AgsRecycling*
ags_output_find_last_input_recycling(AgsOutput *output)
{
  AgsAudio *audio;
  AgsChannel *input;

  if(output == NULL)
    return(NULL);

  audio = AGS_AUDIO(AGS_CHANNEL(output)->audio);

  if((AGS_AUDIO_ASYNC & (audio->flags)) != 0){
    input = ags_channel_nth(audio->input, AGS_CHANNEL(output)->audio_channel);

    input = ags_channel_last_with_recycling(input);
  }else{
    input = ags_channel_nth(audio->input, AGS_CHANNEL(output)->line);
  }

  if(input != NULL){
    return(input->last_recycling);
  }else{
    return(NULL);
  }
}
예제 #2
0
void
ags_apply_tact_launch(AgsTask *task)
{
  AgsApplyTact *apply_tact;

  apply_tact = AGS_APPLY_TACT(task);

 if(AGS_IS_APPLICATION_CONTEXT(apply_tact->scope)){
    AgsApplicationContext *application_context;

    application_context = (AgsApplicationContext *) apply_tact->scope;

    ags_apply_tact_application_context(apply_tact, application_context);
  }else if(AGS_IS_SOUNDCARD(apply_tact->scope)){
    GObject *soundcard;

    soundcard = apply_tact->scope;

    ags_apply_tact_soundcard(apply_tact, soundcard);
 }else if(AGS_IS_SEQUENCER(apply_tact->scope)){
    GObject *sequencer;

    sequencer = apply_tact->scope;

    ags_apply_tact_sequencer(apply_tact, sequencer);
 }else if(AGS_IS_AUDIO(apply_tact->scope)){
    AgsAudio *audio;

    audio = AGS_AUDIO(apply_tact->scope);

    ags_apply_tact_audio(apply_tact, audio);
  }else if(AGS_IS_CHANNEL(apply_tact->scope)){
    AgsChannel *channel;

    channel = AGS_CHANNEL(apply_tact->scope);

    ags_apply_tact_channel(apply_tact, channel);
  }else if(AGS_IS_RECALL(apply_tact->scope)){
    AgsRecall *recall;

    recall = AGS_RECALL(apply_tact->scope);

    ags_apply_tact_recall(apply_tact, recall);
  }else{
    g_warning("AgsApplyTact: Not supported scope");
  }
}
예제 #3
0
void
ags_set_samplerate_launch(AgsTask *task)
{
  AgsSetSamplerate *set_samplerate;
  GObject *gobject;

  set_samplerate = AGS_SET_SAMPLERATE(task);

  gobject = set_samplerate->gobject;

  if(AGS_IS_DEVOUT(gobject)){
    ags_set_samplerate_devout(set_samplerate, AGS_DEVOUT(gobject));
  }else if(AGS_IS_AUDIO(gobject)){
    ags_set_samplerate_audio(set_samplerate, AGS_AUDIO(gobject));
  }else if(AGS_IS_CHANNEL(gobject)){
    ags_set_samplerate_channel(set_samplerate, AGS_CHANNEL(gobject));
  }else if(AGS_IS_RECYCLING(gobject)){
    ags_set_samplerate_recycling(set_samplerate, AGS_RECYCLING(gobject));
  }else if(AGS_IS_AUDIO_SIGNAL(gobject)){
    ags_set_samplerate_audio_signal(set_samplerate, AGS_AUDIO_SIGNAL(gobject));
  }
}
void
ags_set_buffer_size_launch(AgsTask *task)
{
  AgsSetBufferSize *set_buffer_size;
  GObject *gobject;

  set_buffer_size = AGS_SET_BUFFER_SIZE(task);

  gobject = set_buffer_size->gobject;

  if(AGS_IS_DEVOUT(gobject)){
    ags_set_buffer_size_devout(set_buffer_size, AGS_DEVOUT(gobject));
  }else if(AGS_IS_AUDIO(gobject)){
    ags_set_buffer_size_audio(set_buffer_size, AGS_AUDIO(gobject));
  }else if(AGS_IS_CHANNEL(gobject)){
    ags_set_buffer_size_channel(set_buffer_size, AGS_CHANNEL(gobject));
  }else if(AGS_IS_RECYCLING(gobject)){
    ags_set_buffer_size_recycling(set_buffer_size, AGS_RECYCLING(gobject));
  }else if(AGS_IS_AUDIO_SIGNAL(gobject)){
    ags_set_buffer_size_audio_signal(set_buffer_size, AGS_AUDIO_SIGNAL(gobject));
  }
}
예제 #5
0
파일: ags_output.c 프로젝트: weedlight/ags
/**
 * ags_output_map_audio_signal:
 * @output: an #AgsOutput
 * @recall_id: the assigned #AgsRecallID
 *
 * Maps audio signal and assigning it to recall id.
 *
 * Returns: a new #GList containing #AgsAudioSignal
 *
 * Since: 0.4
 */
GList*
ags_output_map_audio_signal(AgsOutput *output, AgsRecallID *recall_id)
{
  AgsDevout *devout;
  AgsAudioSignal *audio_signal;
  GList *list_destination;

  if(output != NULL){
    list_destination = g_list_alloc();
    goto ags_copy_pattern_map_destination0;
  }else
    return(NULL);

  devout = AGS_DEVOUT(AGS_AUDIO(AGS_CHANNEL(output)->audio)->devout);
  
  while(output != NULL){
    list_destination->next = g_list_alloc();
    list_destination->next->prev = list_destination;
    list_destination = list_destination->next;
  ags_copy_pattern_map_destination0:
    g_message("ags_output_map_audio_signal\n\0");

    audio_signal = ags_audio_signal_new((GObject *) devout,
					(GObject *) output->channel.first_recycling,
					(GObject *) recall_id);
    ags_connectable_connect(AGS_CONNECTABLE(audio_signal));

    ags_recycling_add_audio_signal(output->channel.first_recycling,
				   audio_signal);
    audio_signal->stream_current = audio_signal->stream_beginning;
    list_destination->data = (gpointer) audio_signal;

    output = (AgsOutput *) output->channel.next_pad;
  }
  
  return(list_destination);
}