00001 /*********************************************************************** 00002 * 00003 * Copyright (C) 2009 Nils Doormann <ndmn@users.sourceforge.net> 00004 * 00005 * This program is free software: you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation, either version 3 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00017 * 00018 ***********************************************************************/ 00019 00020 /*********************************************************************** 00021 * nchains.h 00022 * 00023 * $Id: nchains.h,v 1.4 2009/08/01 21:01:16 ndmn Exp $ 00024 * 00025 ***********************************************************************/ 00026 00027 #ifndef __NCHAINS_NCHAINS_H 00028 #define __NCHAINS_NCHAINS_H 00029 00030 #include <string.h> 00031 00032 #include "defs.h" 00033 #include "interface.h" 00034 #include "client.h" 00035 #include "commands.h" 00036 #include "aio.h" 00037 #include "helper.h" 00038 00039 /************************************************************************ 00040 * Application Interface Methods 00041 ************************************************************************/ 00042 00043 00044 /** 00045 * Toggles the muted state of the current and all other chains according to action. 00046 * Action might be a value of enum __mute_actions and refers to the action to be taken on the 00047 * current chain (i.e:chain under cursor). Depending on action and current mute state 00048 * of the selected chain it is either muted or unmuted. 00049 */ 00050 extern void nchains_set_muted_state(struct _application *app,short action); 00051 00052 /** 00053 * set the visual name of the chain. the internal name always stays the same 00054 * (for ex. chain_5). this metadata refers to n-chains. 00055 */ 00056 extern void nchains_set_chain_name(struct _application *app); 00057 00058 /** 00059 * Provides an input field for an audio input and adds it to the current 00060 * selected chain. 00061 */ 00062 extern void nchains_ai_add(struct _application *app); 00063 /** 00064 * Provides an input field for an audio output and adds it to the current 00065 * selected chain. 00066 */ 00067 extern void nchains_ao_add(struct _application *app); 00068 /** 00069 * Selects the chain under cursor 00070 */ 00071 extern void nchains_c_select(struct _application *app); 00072 /** 00073 * Switches to the volume setting mode 00074 */ 00075 extern void nchains_set_volume(struct _application *app); 00076 /** 00077 * Switches to panorama setting mode 00078 */ 00079 extern void nchains_set_panorama(struct _application *app); 00080 /** 00081 * Sets the duration value of the current chain input 00082 */ 00083 extern void nchains_set_duration(struct _application *app); 00084 /** 00085 * Set the time offset <b>from where</b> the current attached audio input is being played 00086 */ 00087 extern void nchains_set_select(struct _application *app); 00088 /** 00089 * Set the time offset <b>when</b> the current attached chain input is being played 00090 */ 00091 extern void nchains_set_playat(struct _application *app); 00092 00093 /** 00094 * Toggle chanel copy mode for the current selected chain 00095 */ 00096 extern void nchains_toggle_chcopy(struct _application *app); 00097 00098 /** 00099 * Toggle start or stop. 00100 */ 00101 extern void nchains_startstop(struct _application *app); 00102 /** 00103 * Rewind to zero 00104 */ 00105 extern void nchains_rewind_to_zero(struct _application *app); 00106 /** 00107 * A microseconds alarm implementation. Fires SIGALRM after usecs microseconds. 00108 * Active during a running ecasound engine. (start) 00109 */ 00110 extern unsigned int nchains_ualarm(struct _application *app,unsigned int usecs); 00111 /** 00112 * A Handler for SIGALRM fired by nchains_ualarm. Updates the current song position. 00113 */ 00114 extern void nchains_catch_alarm(int sig); 00115 00116 /** 00117 * Handle SIGWINCH properly. 00118 */ 00119 extern void nchains_do_update(int sig); 00120 00121 /* 00122 * Bounces the whole song to the file name from appearing input prompt 00123 * All solo and un-mted chains are bounced 00124 */ 00125 extern void nchains_bounce(struct _application *app); 00126 00127 /* 00128 * updates the information about the length of the chain setup 00129 */ 00130 extern void nchains_update_cs_info(struct _application *app); 00131 00132 /* 00133 * moves the chain setup to locator position specified by <i>position</i>. 00134 */ 00135 extern void nchains_to_locator_position(struct _application *app, const char * position); 00136 00137 /** 00138 * Cdds a complete chain with all default/and ready-set chain operators to the chain setup, defined in cc 00139 */ 00140 extern void nchains_add_default_chain(struct _application *app, CHAIN *cc); 00141 00142 /** 00143 * Computes the real chain setup length of all the relevant chains (i.e. not muted, not null etc..) 00144 */ 00145 extern void nchains_update_real_length(struct _application *app); 00146 00147 /** 00148 * Displays the fx window for the current chain 00149 */ 00150 extern void nchains_fx_window_cur_chain(struct _application *app); 00151 00152 #endif /* __NCHAINS_NCHAINS_H */