mixer.h
author Darkvater
Mon, 31 Jul 2006 11:50:23 +0000
branch0.4
changeset 10065 fc91a7eca19e
parent 9959 984493ab6fff
permissions -rw-r--r--
(svn r5669) - Backport from trunk (r5464, r3641):
Codechange: verify the presence of music files in the gm folder. Slightly altered r5464
to exclude the addition of music.c and left out the extra functionality. While in essence
this is not a true fix, several people have reported a rising CPU usage because Dmusic
kept indefinitely looping the file list. This should solve that.
/* $Id$ */

#ifndef MIXER_H
#define MIXER_H

typedef struct Mixer Mixer;
typedef struct MixerChannel MixerChannel;

enum {
	MX_AUTOFREE = 1,
//	MX_8BIT = 2,
//	MX_STEREO = 4,
//	MX_UNSIGNED = 8,
};

VARDEF Mixer *_mixer;

bool MxInitialize(uint rate);
void MxMixSamples(Mixer *mx, void *buffer, uint samples);

MixerChannel *MxAllocateChannel(Mixer *mx);
void MxSetChannelRawSrc(MixerChannel *mc, int8 *mem, uint size, uint rate, uint flags);
void MxSetChannelVolume(MixerChannel *mc, uint left, uint right);
void MxActivateChannel(MixerChannel*);

#endif /* MIXER_H */