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
33 #ifndef __REMIX_TYPES_H__
34 #define __REMIX_TYPES_H__
40 #define RemixNone NULL
42 typedef int RemixError;
44 typedef float RemixPCM;
46 typedef long RemixCount;
47 #define REMIX_COUNT_MAX (LONG_MAX - 1L)
48 #define REMIX_COUNT_MIN LONG_MIN
49 #define REMIX_COUNT_INFINITE REMIX_COUNT_MAX
51 typedef void RemixOpaque;
53 #if defined (__REMIX__)
54 typedef struct _RemixBase RemixBase;
56 typedef RemixOpaque RemixBase;
59 typedef CDScalar RemixParameter;
61 typedef int RemixFlags;
62 typedef double RemixSamplerate;
63 typedef double RemixTempo;
64 typedef union _RemixTime RemixTime;
68 #define REMIX_ERROR_OK 0
69 #define REMIX_ERROR_INVALID 1
70 #define REMIX_ERROR_NOENTITY 2
71 #define REMIX_ERROR_EXISTS 3
72 #define REMIX_ERROR_SILENCE 4
73 #define REMIX_ERROR_NOOP 5
74 #define REMIX_ERROR_SYSTEM 6
81 REMIX_CHANNEL_REAR_LEFT,
82 REMIX_CHANNEL_REAR_RIGHT,
83 REMIX_CHANNEL_REAR_CENTRE,
84 REMIX_CHANNEL_LFE /* Low Frequency Effects */
96 REMIX_ENVELOPE_LINEAR,
113 } RemixParameterType;
116 REMIX_CONSTRAINT_TYPE_NONE = 0,
117 REMIX_CONSTRAINT_TYPE_LIST,
118 REMIX_CONSTRAINT_TYPE_RANGE
119 } RemixConstraintType;
122 #define REMIX_RANGE_LOWER_BOUND_VALID (1<<0)
123 #define REMIX_RANGE_UPPER_BOUND_VALID (1<<1)
124 #define REMIX_RANGE_STEP_VALID (1<<2)
125 #define REMIX_RANGE_ALL_VALID (REMIX_RANGE_LOWER_BOUND_VALID | \
126 REMIX_RANGE_UPPER_BOUND_VALID | \
127 REMIX_RANGE_STEP_VALID)
129 #define REMIX_HINT_DEFAULT (0)
130 #define REMIX_HINT_LOG (1<<0)
131 #define REMIX_HINT_TIME (1<<1)
132 #define REMIX_HINT_FILENAME (1<<2)
134 #define REMIX_CONSTRAINT_EMPTY ((RemixConstraint){NULL})
136 #define REMIX_SAMPLES(x) ((RemixTime){(RemixCount)(x)})
137 #define REMIX_SECONDS(x) ((RemixTime){(float)(x)})
138 #define REMIX_BEAT24S(x) ((RemixTime){(int)(x)})
141 #if (defined(__REMIX__) || defined(__REMIX_PLUGIN__))
142 #include <remix/remix_plugin.h>
144 typedef RemixOpaque RemixEnv;
145 typedef RemixOpaque RemixPoint;
146 typedef RemixOpaque RemixEnvelope;
147 typedef RemixOpaque RemixChunk;
148 typedef RemixOpaque RemixChannel;
149 typedef RemixOpaque RemixStream;
150 typedef RemixOpaque RemixDeck;
151 typedef RemixOpaque RemixTrack;
152 typedef RemixOpaque RemixLayer;
153 typedef RemixOpaque RemixSound;
154 typedef RemixOpaque RemixMetaAuthor;
155 typedef RemixOpaque RemixMetaText;
156 typedef RemixOpaque RemixPlugin;
157 typedef RemixOpaque RemixSquareTone;
158 typedef RemixOpaque RemixMonitor;
161 #if defined(__cplusplus)
165 #endif /* __REMIX_TYPES_H__ */