1/* Copyright (C) 2005-2018 Joël Krähemann 2 * Permission is granted to copy, distribute and/or modify this document 3 * under the terms of the GNU Free Documentation License, Version 1.3 4 * or any later version published by the Free Software Foundation; 5 * with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. 6 * A copy of the license is included in the section entitled "GNU 7 * Free Documentation License". 8 */ 9 10#include <glib.h> 11#include <glib-object.h> 12 13#include <ags/libags.h> 14#include <ags/libags-audio.h> 15 16AgsAudio *master_audio, *slave_audio; 17AgsLinkChannel *linkChannel; 18 19AgsApplicationContext *application_context; 20AgsTaskLauncher *task_launcher; 21 22GObject *soundcard; 23 24GError *error; 25 26application_context = ags_application_context_get_instance(); 27task_launcher = ags_concurrency_provider_get_task_launcher(AGS_CONCURRENCY_PROVIDER(application_context)); 28 29/* create AgsAudio objects */ 30master_audio = (AgsAudio *) g_object_new(AGS_TYPE_AUDIO, 31 "soundcard", soundcard, 32 NULL); 33slave_audio = (AgsAudio *) g_object_new(AGS_TYPE_AUDIO, 34 "soundcard", soundcard, 35 NULL); 36 37/* assign AgsAudioSignal objects to master_audio and slave_audio */ 38ags_audio_set_flags(master_audio, 39 AGS_AUDIO_OUTPUT_HAS_RECYCLING); 40ags_audio_set_flags(slave_audio, 41 (AGS_AUDIO_ASYNC | AGS_AUDIO_OUTPUT_HAS_RECYCLING | AGS_AUDIO_INPUT_HAS_RECYCLING)); 42 43/* create AgsChannel objects within master_audio and slave_audio */ 44ags_audio_set_audio_channels(master_audio, 2); 45ags_audio_set_pads(master_audio, AGS_TYPE_OUTPUT, 1); 46ags_audio_set_pads(master_audio, AGS_TYPE_INPUT, 1); 47 48ags_audio_set_audio_channels(slave_audio, 2); 49ags_audio_set_pads(slave_audio, AGS_TYPE_OUTPUT, 1); 50ags_audio_set_pads(slave_audio, AGS_TYPE_INPUT, 8); 51