22 #ifndef BLADERUNNER_AUDIO_MIXER_H 23 #define BLADERUNNER_AUDIO_MIXER_H 25 #include "audio/audiostream.h" 26 #include "audio/mixer.h" 28 #include "common/mutex.h" 30 #include "bladerunner/bladerunner.h" 34 class BladeRunnerEngine;
36 #if !BLADERUNNER_ORIGINAL_BUGS 37 enum audioMixerAppTimers {
38 kAudioMixerAppTimerMusicNext = 0,
39 kAudioMixerAppTimerMusicFadeOut = 1
44 #if BLADERUNNER_ORIGINAL_BUGS 45 static const int kChannels = 9;
46 static const int kUsableChannels = 8;
47 static const int kMusicChannel = 8;
49 static const int kChannels = 15;
50 static const int kUsableChannels = 14;
51 static const int kMusicChannel = 14;
53 static const int kAudioMixerAppTimersNum = 2;
54 #endif // BLADERUNNER_ORIGINAL_BUGS 55 static const int kUpdatesPerSecond = 40;
69 void (*endCallback)(
int channel,
void *data);
72 uint32 trackDurationMs;
78 Channel _channels[kChannels];
81 #if !BLADERUNNER_ORIGINAL_BUGS 82 struct audioMixerAppTimer {
84 uint32 intervalMillis;
88 audioMixerAppTimer _audioMixerAppTimers[kAudioMixerAppTimersNum];
89 #endif // !BLADERUNNER_ORIGINAL_BUGS 96 int playMusic(
Audio::RewindableAudioStream *stream,
int volume,
void(*endCallback)(
int,
void *),
void *callbackData, uint32 trackDurationMs);
97 void stop(
int channel, uint32 time);
99 void adjustVolume(
int channel,
int targetVolume, uint32 time);
100 void adjustPan(
int channel,
int targetPan, uint32 time);
102 #if !BLADERUNNER_ORIGINAL_BUGS 103 void startAppTimerProc(
int audioMixAppTimerId, uint32 intervalMillis);
104 void stopAppTimerProc(
int audioMixAppTimerId);
105 #endif // !BLADERUNNER_ORIGINAL_BUGS 111 int playInChannel(
int channel,
Audio::Mixer::SoundType type,
Audio::RewindableAudioStream *stream,
int priority,
bool loop,
int volume,
int pan,
void(*endCallback)(
int,
void *),
void *callbackData, uint32 trackDurationMs);
113 bool isActive(
int channel)
const;
115 static void timerCallback(
void *refCon);
SoundType
Definition: mixer.h:62
Definition: audio_mixer.h:43
Definition: audiostream.h:50
Definition: audiostream.h:109
Definition: bladerunner.h:113