9#if TGR_PLATFORM == TGR_PLATFORM_WIN
23#if TGR_PLATFORM != TGR_PLATFORM_WIN
32#if TGR_PLATFORM == TGR_PLATFORM_WIN
70#if TGR_PLATFORM == TGR_PLATFORM_WIN
84#if TGR_PLATFORM == TGR_PLATFORM_WIN
409 short nChannel,
int nSample,
int nLength,
int nLoopLength,
DWORD dwLevels);
494#if TGR_PLATFORM == TGR_PLATFORM_SDL
A buffer of samples the mixer plays, as a secondary buffer of DirectSound plays in the original.
Definition sdlmixer.h:18
#define MAX_PATH
The longest path of the Windows API, the size of the paths the settings save.
Definition rallyconfig.h:14
HRESULT StopAllSoundBuffersInList(SoundBufferNode *pHead)
Stop every sound buffer of a list.
bool LoadSoundSet(int nSet)
Load the samples of a set of sounds into the channels the banks of sounds enable, from the second sam...
bool PlaySoundChannelOneOnce(int nSample, DWORD dwLevels)
Set the levels of the two sides of channel 1 of a sample and play it once.
bool LoadSfxWaveVariants(int nEffect)
Load the three files of a sound effect of a race, named by the prefixes the banks of sounds select fo...
bool SetAudioChannelStereoLevels(int nChannel, DWORD dwLevels)
Set the levels of the two sides of the buffer of a channel and record them, when sound is on.
SoundChannelState g_aSoundChannelState[SOUND_CHANNEL_COUNT]
The settings last applied to the buffer of each channel.
SoundBufferNode * g_apSoundChannelBuffer[SOUND_CHANNEL_COUNT]
The sound buffers of the channels of the sound effects.
HRESULT ApplySoundBufferPan(SoundBufferNode *pNode)
Set the pan of the buffer of a node from nPan.
bool SetSoundChannelFrequency(int nSample, int nChannel, DWORD dwFrequency)
Set the frequency of a channel of a sample, when sound is on.
bool SetSoundVoiceFrequencyFloat(int nSample, int nVoice, float fFrequency)
Set the frequency of the even channel of a voice of a sample, dropping the fraction.
bool ShutdownDirectSound(void)
Drop a user of DirectSound.
bool InitializeDirectSound(void)
Add a user of DirectSound when sound effects play.
HRESULT StopSoundBuffer(SoundBufferNode *pNode)
Stop the buffer of DirectSound of a node that plays.
void ResetSoundBankTables(void)
Clear the first entries of the three tables of the banks of sounds.
HRESULT RestartOrPlaySoundBuffer(SoundBufferNode *pNode)
Play the buffer of a node from its start: a buffer that plays goes back to its start,...
HRESULT ApplySoundBufferVolume(SoundBufferNode *pNode)
Set the volume of the buffer of a node from nVolume scaled by g_bSfxVolume, or silence it when the so...
bool StartSoundChannelPlayback(int nSample, int nChannel, int bLooping)
Play the buffer of a sample for a channel and give it to the channel, when sound is on.
IDirectSound * g_pDirectSound
DirectSound.
bool IsSoundChannelPlaying(int nChannel)
Report whether the buffer of a channel plays, when sound is on.
IDirectSoundBuffer * g_pDirectSoundPrimaryBuffer
The primary buffer of DirectSound.
bool SetSoundChannelStereo(int nSample, int nChannel, DWORD dwLevels)
Set the levels of the two sides of a channel of a sample, when sound is on.
double g_adChannelFrequencyScale[SOUND_CHANNEL_COUNT]
The scale of a frequency of each channel, from the sample assigned to it.
bool SetSoundBufferStereoLevels(SoundBufferNode *pNode, DWORD dwLevels)
Set the volume and the pan of the buffer of a node from the levels of its two sides.
bool PlayLoopedSoundVoiceWithStereo(int nSample, int nVoice, DWORD dwLevels)
Set the levels of the two sides of the even channel of a voice of a sample and play it in a loop.
bool SetAudioChannelLooping(int nChannel, int bLooping)
Set whether the buffer of a channel plays in a loop, when sound is on.
HRESULT FreeSoundBufferList(SoundBufferNode *pHead)
Release and free every node of a list of sound buffers, with the sample and the format of each,...
void SetSoundBankEntryIndex(int nVoice, int nIndex)
Record a sound for the even channel of a voice in the first row of the banks and in the rows of the v...
bool SetStereoAndPlaySoundChannel(int nSample, int nChannel, DWORD dwLevels, int bLooping)
Set the levels of the two sides of a channel of a sample and play it, when sound is on.
bool AssignAudioChannel(int nSample, int nChannel)
Stop the buffer of a channel and give the channel the buffer of a sample for it, when sound is on.
bool SetSoundBufferFrequency(SoundBufferNode *pNode, DWORD dwFrequency)
Set the frequency of the buffer of a node, when sound is on.
bool InitSoundChannelWithVolume(short nChannel, int nSample, int nLength, int nLoopLength, DWORD dwLevels)
Request a sample and levels for a channel, give the channel the buffer of the sample,...
int AppendSoundBufferToList(SoundBufferNode *pHead, SoundBufferNode *pNode)
Add a node at the end of a list of sound buffers, not playing.
SoundBufferNode * LoadAudioFile(const char *pszPath, int sample=-1)
Load a wave file into a node of a buffer of DirectSound at the end of g_SoundBufferListHead,...
bool IsSoundBufferPlaying(SoundBufferNode *pNode)
Report whether the buffer of a node plays.
bool SetSoundVoiceStereo(int nSample, int nVoice, DWORD dwLevels)
Set the levels of the two sides of the even channel of a voice of a sample.
HRESULT PlaySoundBuffer(SoundBufferNode *pNode, int bLooping)
Set whether the buffer of a node loops and play it from its start.
int g_dwLoadedSoundSampleCount
The number of entries of g_aSoundChannelBuffers that are loaded.
@ SOUND_SET_RACE
Definition soundbuffer.h:195
@ SOUND_SET_FRONT_END
Definition soundbuffer.h:194
bool SetAudioChannelFrequency(int nChannel, long long llFrequency)
Set the frequency of the buffer of a channel, scaled by its sample, and record it,...
HRESULT CreateDirectSoundBufferFromSample(SoundBufferNode *pNode)
Create the buffer of DirectSound of a sample, static with control of the frequency,...
HRESULT ReleaseSoundBuffer(SoundBufferNode *pNode)
Release the buffer of DirectSound of a node.
int g_dwDirectSoundRefCount
The users of DirectSound.
bool PlaySoundChannelOneWithStereo(int nSample, DWORD dwLevels, int bLooping)
Set the levels of the two sides of channel 1 of a sample and play it.
SoundBufferNode g_SoundBufferListHead
The head of the list of the sound buffers.
WAVEFORMATEX * g_pDirectSoundWaveFormat
The wave format of the primary buffer, in locked global memory.
bool StopSoundVoice(int nSample, int nVoice)
Stop the buffer of the first channel of a voice of a sample, when sound is on.
HRESULT ApplySoundBufferFrequency(SoundBufferNode *pNode)
Set the frequency of the buffer of a node from dwFrequency.
#define SOUND_CHANNEL_COUNT
The number of sound channels.
Definition soundsample.h:10
The music, the volumes, and the channels of the sound effects of the Boss Rally release,...
A sound buffer of a sample, in a list.
Definition soundbuffer.h:67
SoundBufferNode * pNext
Definition soundbuffer.h:93
void * pSampleData
Definition soundbuffer.h:68
char abUnknown20[4]
Definition soundbuffer.h:80
char abUnknown2c[0x70]
Definition soundbuffer.h:83
DWORD dwFrequency
Definition soundbuffer.h:75
int bStickyFocus
Definition soundbuffer.h:82
int nPan
Definition soundbuffer.h:76
int nVolume
Definition soundbuffer.h:77
WAVEFORMATEX * pWaveFormat
Definition soundbuffer.h:71
IDirectSoundBuffer * pBuffer
Definition soundbuffer.h:85
int bLooping
Definition soundbuffer.h:78
int nNameOffset
Definition soundbuffer.h:86
int bPlaying
Definition soundbuffer.h:79
char szPath[MAX_PATH]
Definition soundbuffer.h:87
DWORD dwSampleSize
Definition soundbuffer.h:69
int bHardware
Definition soundbuffer.h:81
The settings of the buffer of a channel, as requested or as last applied.
Definition soundsystem.h:67
WAVEFORMATEX EarWaveFormat
Definition wavechunks.h:23