2 * libremix -- An audio mixing and sequencing library.
4 * Copyright (C) 2001 Commonwealth Scientific and Industrial Research
5 * Organisation (CSIRO), Australia.
6 * Copyright (C) 2003 Conrad Parker
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 * Base types and public interfaces to libremix
30 * Conrad Parker <conrad@metadecks.org>, August 2001
38 * \section Introduction
40 * Remix is an audio sequencing and mixing library that provides a
41 * multichannel, sparse audio data container (streams), a structured mixing
42 * abstraction (decks), and widely useful means of generating control data
43 * (via envelopes) and of caching audio data.
45 * \subsection contents Contents
47 * - \link remix_deck.h Decks \endlink:
48 * The Remix hierarchical mixing abstraction
50 * - \link remix_stream.h Streams \endlink:
51 * The multichannel PCM stream abstraction
53 * - \link remix.h remix.h \endlink:
54 * Documentation of the Remix C API
56 * - \link examples Examples \endlink:
57 * Annotated example programs
59 * - \link configuration Configuration \endlink:
60 * Customizing libremix.
62 * - \link building Building \endlink:
63 * Information related to building software that uses libremix.
65 * \section licensing Licensing
67 * libremix is provided under the
68 * \link lgpl GNU Lesser General Public License \endlink.
72 /** \defgroup lgpl Licensing
73 * \section lgpl GNU Lesser General Public License
78 /** \defgroup configuration Configuration
79 * \section ./configure ./configure
81 * It is possible to customize the functionality of libremix
82 * by using various ./configure flags when
83 * building it from source.
85 * For general information about using ./configure, see the file
86 * \link install INSTALL \endlink
89 /** \defgroup install Installation
90 * \section install INSTALL
95 /** \defgroup building Building against libremix
98 * \section autoconf Using GNU autoconf
100 * If you are using GNU autoconf, you do not need to call pkg-config
101 * directly. Use the following macro to determine if libremix is
105 PKG_CHECK_MODULES(REMIX, remix >= 0.2.0,
106 HAVE_REMIX="yes", HAVE_REMIX="no")
107 if test "x$HAVE_REMIX" = "xyes" ; then
108 AC_SUBST(REMIX_CFLAGS)
113 * If libremix is found, HAVE_REMIX will be set to "yes", and
114 * the autoconf variables REMIX_CFLAGS and REMIX_LIBS will
115 * be set appropriately.
117 * \section pkg-config Determining compiler options with pkg-config
119 * If you are not using GNU autoconf in your project, you can use the
120 * pkg-config tool directly to determine the correct compiler options.
123 REMIX_CFLAGS=`pkg-config --cflags remix`
125 REMIX_LIBS=`pkg-config --libs remix`
130 /** \defgroup examples Example programs
132 * Example programs are fun for all the family.
134 * Here's some examples.
135 * - \link noisedemo Noise demo \endlink
136 * - \link squaredemo Square demo \endlink
137 * - \link sndfiledemo Sndfile demo \endlink
140 /** \defgroup noisedemo Noise demo
142 * Plays a sequence of short bursts of whitenoise.
144 * \include noisedemo.c noisedemo.c
147 /** \defgroup squaredemo Square demo
149 * Plays a polyphonic sequence of musical notes generated by a builtin
150 * square wave synthesizer.
152 * \include squaredemo.c squaredemo.c
155 /** \defgroup sndfiledemo Sndfile demo
157 * Plays a sequence of notes using sound files from disk.
159 * \include sndfiledemo.c sndfiledemo.c
162 #include <remix/remix_types.h>
164 #if defined(__cplusplus)
168 extern CDSet * REMIX_MONO;
169 extern CDSet * REMIX_STEREO;
173 RemixEnv * remix_init (void);
174 RemixEnv * remix_init_clone (RemixEnv * env);
175 void remix_purge (RemixEnv * env);
176 RemixError remix_last_error (RemixEnv * env);
177 char * remix_error_string (RemixEnv * env, RemixError error);
178 RemixSamplerate remix_set_samplerate (RemixEnv * env, RemixSamplerate samplerate);
179 RemixSamplerate remix_get_samplerate (RemixEnv * env);
180 RemixTempo remix_set_tempo (RemixEnv * env, RemixTempo tempo);
181 RemixTempo remix_get_tempo (RemixEnv * env);
182 CDSet * remix_set_channels (RemixEnv * env, CDSet * channelset);
183 CDSet * remix_get_channels (RemixEnv * env);
187 /* Sources: Plugins, Samples etc. */
188 CDList * remix_open (SOUNDRENDER env, char * filename);
189 void remix_close (SOUNDRENDER env, RemixPlugin plugin);
194 RemixPlugin * remix_find_plugin (RemixEnv * env, char * identifier);
196 RemixBase * remix_new (RemixEnv * env, RemixPlugin * plugin, CDSet * parameters);
197 CDSet * remix_suggest (RemixEnv * env, RemixPlugin * plugin, CDSet * parameters);
199 int remix_get_init_parameter_key (RemixEnv * env, RemixPlugin * plugin, char * name);
200 int remix_get_parameter_key (RemixEnv * env, RemixBase * base, char * name);
202 RemixParameter remix_set_parameter (RemixEnv * env, RemixBase * base, int key,
203 RemixParameter parameter);
204 RemixParameter remix_get_parameter (RemixEnv * env, RemixBase * base, int key);
205 RemixParameterType remix_get_parameter_type (RemixEnv * env, RemixBase * base, int key);
208 RemixBase * remix_clone_subclass (RemixEnv * env, RemixBase * base);
209 int remix_destroy (RemixEnv * env, RemixBase * base);
210 int remix_destroy_list (RemixEnv * env, CDList * list);
211 RemixBase * remix_prepare (RemixEnv * env, RemixBase * base);
212 RemixCount remix_process (RemixEnv * env, RemixBase * base, RemixCount count,
213 RemixStream * input, RemixStream * output);
214 RemixCount remix_length (RemixEnv * env, RemixBase * base);
215 RemixCount remix_seek (RemixEnv * env, RemixBase * base, RemixCount offset, int whence);
216 RemixCount remix_tell (RemixEnv * env, RemixBase * base);
217 int remix_flush (RemixEnv * env, RemixBase * base);
219 RemixCount remix_set_mixlength (RemixEnv * env, RemixCount mixlength);
220 RemixCount remix_get_mixlength (RemixEnv * env);
223 int remix_is_writeable (RemixEnv * env, RemixBase * base);
224 int remix_is_seekable (RemixEnv * env, RemixBase * base);
225 int remix_is_cacheable (RemixEnv * env, RemixBase * base);
226 int remix_is_causal (RemixEnv * env, RemixBase * base);
228 char * remix_set_name (RemixEnv * env, RemixBase * base, char * name);
229 char * remix_get_name (RemixEnv * env, RemixBase * base);
231 #include <remix/remix_deck.h>
232 #include <remix/remix_envelope.h>
233 #include <remix/remix_stream.h>
236 RemixBase * remix_squaretone_new (RemixEnv * env, float frequency);
237 float remix_squaretone_set_frequency (RemixEnv * env,
238 RemixBase * squaretone,
240 float remix_squaretone_get_frequency (RemixEnv * env,
241 RemixBase * squaretone);
244 RemixMonitor * remix_monitor_new (RemixEnv * env);
247 RemixBase * remix_scrubby_new (RemixEnv * env);
248 RemixBase * remix_scrubby_set_source (RemixEnv * env, RemixBase * scrubby,
250 RemixBase * remix_scrubby_get_source (RemixEnv * env, RemixBase * scrubby);
251 int remix_scrubby_set_direction (RemixEnv * env, RemixBase * scrubby, int direction);
252 int remix_scrubby_get_direction (RemixEnv * env, RemixBase * scrubby);
254 #include <remix/remix_time.h>
256 #include <remix/remix_meta.h>
258 #if defined(__cplusplus)
262 #endif /* __REMIX_H__ */