mixer.h
author bjarni
Wed, 04 Oct 2006 19:15:25 +0000
changeset 4728 d4426f6c6191
parent 2977 97c1c76b499a
permissions -rw-r--r--
(svn r6640) -Fix: [autoreplace] autoreplace can now use the money for selling the old vehicle to build the new one
Say we got 40k for selling the old one and the new one costs 60k, then the player only needs 20k to replace

The new engine is still built before selling the old one for various reasons, but now the player gets a loan
of the sell value, which is always repaid when replace fails or the old engine is sold. The player will never notice this loan.
2186
db48cf29b983 (svn r2701) Insert Id tags into all source files
tron
parents: 1498
diff changeset
     1
/* $Id$ */
db48cf29b983 (svn r2701) Insert Id tags into all source files
tron
parents: 1498
diff changeset
     2
1496
15d859a626e8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents:
diff changeset
     3
#ifndef MIXER_H
15d859a626e8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents:
diff changeset
     4
#define MIXER_H
15d859a626e8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents:
diff changeset
     5
15d859a626e8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents:
diff changeset
     6
typedef struct MixerChannel MixerChannel;
15d859a626e8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents:
diff changeset
     7
15d859a626e8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents:
diff changeset
     8
enum {
15d859a626e8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents:
diff changeset
     9
	MX_AUTOFREE = 1,
15d859a626e8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents:
diff changeset
    10
//	MX_8BIT = 2,
15d859a626e8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents:
diff changeset
    11
//	MX_STEREO = 4,
15d859a626e8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents:
diff changeset
    12
//	MX_UNSIGNED = 8,
15d859a626e8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents:
diff changeset
    13
};
15d859a626e8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents:
diff changeset
    14
15d859a626e8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents:
diff changeset
    15
bool MxInitialize(uint rate);
2977
97c1c76b499a (svn r3552) Remove the global variable _mixer
tron
parents: 2436
diff changeset
    16
void MxMixSamples(void* buffer, uint samples);
1496
15d859a626e8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents:
diff changeset
    17
2977
97c1c76b499a (svn r3552) Remove the global variable _mixer
tron
parents: 2436
diff changeset
    18
MixerChannel* MxAllocateChannel(void);
1496
15d859a626e8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents:
diff changeset
    19
void MxSetChannelRawSrc(MixerChannel *mc, int8 *mem, uint size, uint rate, uint flags);
15d859a626e8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents:
diff changeset
    20
void MxSetChannelVolume(MixerChannel *mc, uint left, uint right);
1498
508395d0639a (svn r2002) Rename MxActivate to MxActivateChannel, which is more appropriate
tron
parents: 1496
diff changeset
    21
void MxActivateChannel(MixerChannel*);
1496
15d859a626e8 (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents:
diff changeset
    22
2436
7d5df545bd5d (svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
Darkvater
parents: 2186
diff changeset
    23
#endif /* MIXER_H */