mixer.h
author tron
Sat, 12 Mar 2005 09:46:07 +0000
changeset 1498 cbe7edba0316
parent 1496 3d0b86f5dcb8
child 2186 461a2aff3486
permissions -rw-r--r--
(svn r2002) Rename MxActivate to MxActivateChannel, which is more appropriate
1496
3d0b86f5dcb8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents: 337
diff changeset
     1
#ifndef MIXER_H
3d0b86f5dcb8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents: 337
diff changeset
     2
#define MIXER_H
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     3
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     4
typedef struct Mixer Mixer;
1496
3d0b86f5dcb8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents: 337
diff changeset
     5
typedef struct MixerChannel MixerChannel;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     6
1496
3d0b86f5dcb8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents: 337
diff changeset
     7
enum {
3d0b86f5dcb8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents: 337
diff changeset
     8
	MX_AUTOFREE = 1,
3d0b86f5dcb8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents: 337
diff changeset
     9
//	MX_8BIT = 2,
3d0b86f5dcb8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents: 337
diff changeset
    10
//	MX_STEREO = 4,
3d0b86f5dcb8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents: 337
diff changeset
    11
//	MX_UNSIGNED = 8,
3d0b86f5dcb8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents: 337
diff changeset
    12
};
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    13
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    14
VARDEF Mixer *_mixer;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    15
1496
3d0b86f5dcb8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents: 337
diff changeset
    16
bool MxInitialize(uint rate);
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    17
void MxMixSamples(Mixer *mx, void *buffer, uint samples);
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    18
1496
3d0b86f5dcb8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents: 337
diff changeset
    19
MixerChannel *MxAllocateChannel(Mixer *mx);
3d0b86f5dcb8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents: 337
diff changeset
    20
void MxSetChannelRawSrc(MixerChannel *mc, int8 *mem, uint size, uint rate, uint flags);
3d0b86f5dcb8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents: 337
diff changeset
    21
void MxSetChannelVolume(MixerChannel *mc, uint left, uint right);
1498
cbe7edba0316 (svn r2002) Rename MxActivate to MxActivateChannel, which is more appropriate
tron
parents: 1496
diff changeset
    22
void MxActivateChannel(MixerChannel*);
337
66647f97e7c0 (svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents: 0
diff changeset
    23
1496
3d0b86f5dcb8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents: 337
diff changeset
    24
#endif