tron@1496: #ifndef MIXER_H tron@1496: #define MIXER_H tron@1496: tron@1496: typedef struct Mixer Mixer; tron@1496: typedef struct MixerChannel MixerChannel; tron@1496: tron@1496: enum { tron@1496: MX_AUTOFREE = 1, tron@1496: // MX_8BIT = 2, tron@1496: // MX_STEREO = 4, tron@1496: // MX_UNSIGNED = 8, tron@1496: }; tron@1496: tron@1496: VARDEF Mixer *_mixer; tron@1496: tron@1496: bool MxInitialize(uint rate); tron@1496: void MxMixSamples(Mixer *mx, void *buffer, uint samples); tron@1496: tron@1496: MixerChannel *MxAllocateChannel(Mixer *mx); tron@1496: void MxSetChannelRawSrc(MixerChannel *mc, int8 *mem, uint size, uint rate, uint flags); tron@1496: void MxSetChannelVolume(MixerChannel *mc, uint left, uint right); tron@1498: void MxActivateChannel(MixerChannel*); tron@1496: tron@1496: #endif