Main Page | Modules | Data Structures | File List | Data Fields | Globals

remix_types.h

Go to the documentation of this file.
00001 /*
00002  * libremix -- An audio mixing and sequencing library.
00003  *
00004  * Copyright (C) 2001 Commonwealth Scientific and Industrial Research
00005  * Organisation (CSIRO), Australia.
00006  * Copyright (C) 2003 Conrad Parker
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public
00010  * License as published by the Free Software Foundation; either
00011  * version 2 of the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021  *
00022  */
00023 
00029 /*
00030  * Conrad Parker <conrad@metadecks.org>, August 2001
00031  */
00032 
00033 #ifndef __REMIX_TYPES_H__
00034 #define __REMIX_TYPES_H__
00035 
00036 #include <limits.h>
00037 
00038 #include "ctxdata.h"
00039 
00040 #define RemixNone NULL
00041 
00042 typedef int RemixError;
00043 
00044 typedef float RemixPCM;
00045 
00046 typedef long RemixCount;
00047 #define REMIX_COUNT_MAX (LONG_MAX - 1L)
00048 #define REMIX_COUNT_MIN LONG_MIN
00049 #define REMIX_COUNT_INFINITE REMIX_COUNT_MAX
00050 
00051 typedef void RemixOpaque;
00052 
00053 #if defined (__REMIX__)
00054 typedef struct _RemixBase RemixBase;
00055 #else
00056 typedef RemixOpaque RemixBase;
00057 #endif
00058 
00059 typedef CDScalar RemixParameter;
00060 
00061 typedef int RemixFlags;
00062 typedef double RemixSamplerate;
00063 typedef double RemixTempo;
00064 typedef union _RemixTime RemixTime;
00065 
00066 
00067 /* Errors */
00068 #define REMIX_ERROR_OK              0
00069 #define REMIX_ERROR_INVALID         1
00070 #define REMIX_ERROR_NOENTITY        2
00071 #define REMIX_ERROR_EXISTS          3
00072 #define REMIX_ERROR_SILENCE         4
00073 #define REMIX_ERROR_NOOP            5
00074 #define REMIX_ERROR_SYSTEM          6
00075 
00076 typedef enum {
00077   REMIX_CHANNEL_LEFT,
00078   REMIX_CHANNEL_RIGHT,
00079   REMIX_CHANNEL_CENTRE,
00080   REMIX_CHANNEL_REAR,
00081   REMIX_CHANNEL_REAR_LEFT,
00082   REMIX_CHANNEL_REAR_RIGHT,
00083   REMIX_CHANNEL_REAR_CENTRE,
00084   REMIX_CHANNEL_LFE /* Low Frequency Effects */,
00085 } RemixChannelName;
00086 
00087 typedef enum {
00088   REMIX_TIME_INVALID,
00089   REMIX_TIME_SAMPLES,
00090   REMIX_TIME_SECONDS,
00091   REMIX_TIME_BEAT24S
00092 } RemixTimeType;
00093 
00094 /* Envelope types */
00095 typedef enum {
00096   REMIX_ENVELOPE_LINEAR,
00097   REMIX_ENVELOPE_SPLINE
00098 } RemixEnvelopeType;
00099 
00100 union _RemixTime {
00101   long TIME;
00102   RemixCount samples;
00103   float seconds;
00104   int beat24s;
00105 };
00106 
00107 typedef enum {
00108   REMIX_TYPE_BOOL = 0,
00109   REMIX_TYPE_INT,
00110   REMIX_TYPE_FLOAT,
00111   REMIX_TYPE_STRING,
00112   REMIX_TYPE_BASE,
00113 } RemixParameterType;
00114 
00115 typedef enum {
00116   REMIX_CONSTRAINT_TYPE_NONE = 0,
00117   REMIX_CONSTRAINT_TYPE_LIST,
00118   REMIX_CONSTRAINT_TYPE_RANGE,
00119 } RemixConstraintType;
00120 
00121 
00122 #define REMIX_RANGE_LOWER_BOUND_VALID (1<<0)
00123 #define REMIX_RANGE_UPPER_BOUND_VALID (1<<1)
00124 #define REMIX_RANGE_STEP_VALID        (1<<2)
00125 #define REMIX_RANGE_ALL_VALID (REMIX_RANGE_LOWER_BOUND_VALID | \
00126                               REMIX_RANGE_UPPER_BOUND_VALID | \
00127                               REMIX_RANGE_STEP_VALID)
00128 
00129 #define REMIX_HINT_DEFAULT  (0)
00130 #define REMIX_HINT_LOG      (1<<0)
00131 #define REMIX_HINT_TIME     (1<<1)
00132 #define REMIX_HINT_FILENAME (1<<2)
00133 
00134 #define REMIX_CONSTRAINT_EMPTY ((RemixConstraint){NULL})
00135 
00136 #define REMIX_SAMPLES(x) ((RemixTime){(RemixCount)(x)})
00137 #define REMIX_SECONDS(x) ((RemixTime){(float)(x)})
00138 #define REMIX_BEAT24S(x) ((RemixTime){(int)(x)})
00139 
00140 
00141 #if (defined(__REMIX__) || defined(__REMIX_PLUGIN__))
00142 #include <remix/remix_plugin.h>
00143 #else
00144 typedef RemixOpaque RemixEnv;
00145 typedef RemixOpaque RemixPoint;
00146 typedef RemixOpaque RemixEnvelope;
00147 typedef RemixOpaque RemixChunk;
00148 typedef RemixOpaque RemixChannel;
00149 typedef RemixOpaque RemixStream;
00150 typedef RemixOpaque RemixDeck;
00151 typedef RemixOpaque RemixTrack;
00152 typedef RemixOpaque RemixLayer;
00153 typedef RemixOpaque RemixSound;
00154 typedef RemixOpaque RemixMetaAuthor;
00155 typedef RemixOpaque RemixMetaText;
00156 typedef RemixOpaque RemixPlugin;
00157 typedef RemixOpaque RemixSquareTone;
00158 typedef RemixOpaque RemixMonitor;
00159 #endif
00160 
00161 #if defined(__cplusplus)
00162 }
00163 #endif
00164 
00165 #endif /* __REMIX_TYPES_H__ */

Generated on Fri Jan 9 08:44:16 2004 for remix by doxygen 1.3.4