coastline 0.0.4
Loading...
Searching...
No Matches
soundsystem.h
Go to the documentation of this file.
1#pragma once
2
8
9#include <stdbool.h>
10#include <stdint.h>
11
12#include "common/soundsample.h"
13#if TGR_PLATFORM == TGR_PLATFORM_SDL
14#include "common/audio.h"
15#endif
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
22#define VOLUME_LEVEL_COUNT 10
23
31
39
47
48#if TGR_PLATFORM != TGR_PLATFORM_SDL
55extern unsigned char g_bBgmVolume;
56
63extern unsigned char g_bSfxVolume;
64#endif
65
68 int nSample;
69 long long llFrequency;
70 uint32_t dwReserved;
71 uint32_t dwStereoLevels;
72};
73
81
88extern int g_bAltLoopingSoundSet;
89
98bool SetCurrentMusicTrack(int nModeIndex);
99
108bool DispatchMusicVolumeChange(unsigned char bVolume);
109
119
128
137
146
155
165
174bool StopAudioChannel(int nChannel);
175
187
197
198#ifdef __cplusplus
199}
200#endif
The music player of FastTracker 2 modules, the sound channels, and the mixing thread.
#define g_bBgmVolume
Definition audio.h:664
#define g_bSfxVolume
Definition audio.h:668
s32 g_adwBgmVolumeLevels[VOLUME_LEVELS]
The volume of the music and of the effects at each level.
s32 g_adwSfxVolumeLevels[VOLUME_LEVELS]
The sound effect volume at each level.
#define SOUND_CHANNEL_COUNT
The number of sound channels.
Definition soundsample.h:10
bool ResetAudioSubsystem(void)
Stop and free the list of sound buffers and clear the buffers of the channels of every loaded sample ...
#define VOLUME_LEVEL_COUNT
The number of levels of the volumes of the configuration.
Definition soundsystem.h:22
int RandomizeMusicTrack(void)
Choose a track of music at random from track 3 to g_nMusicTrackMax, other than the track that plays w...
bool ResumeLoopingSoundChannels(void)
Move each channel that plays the sample of the other set to the sample of the current set and play it...
int g_bAltLoopingSoundSet
Whether the channels that play sample 0 move to sample 25, rather than back.
bool UnpauseMusicPlayback(void)
Resume the music when the game is no longer paused.
bool SetCurrentMusicTrack(int nModeIndex)
Play a track of music, through the CD audio in music mode 1 and the EAR library otherwise.
void ApplyAudioVolumeSettings(void)
Set the volumes of the music and the sound effects from the levels of g_GlobalRallyConfig.
bool StopAudioChannel(int nChannel)
Stop the buffer of a channel, when sound is on.
struct SoundChannelState g_aSoundChannelRequested[SOUND_CHANNEL_COUNT]
The settings requested for the buffer of each channel.
bool PauseMusicPlayback(void)
Pause the music while the game is paused.
bool SelectNextMusicTrack(void)
Play the track of music after the current one, staying at the last.
bool MuteAllActiveSoundChannels(void)
Silence every channel of sound that has a buffer, and centre its pan, when DirectSound plays sound ef...
bool SelectPreviousMusicTrack(void)
Play the track of music before the current one, staying at the first.
bool DispatchMusicVolumeChange(unsigned char bVolume)
Give a volume of the music to the CD audio in music mode 1 and to the EAR library otherwise.
The settings of the buffer of a channel, as requested or as last applied.
Definition soundsystem.h:67
uint32_t dwReserved
Definition soundsystem.h:70
uint32_t dwStereoLevels
Definition soundsystem.h:71
int nSample
Definition soundsystem.h:68
long long llFrequency
Definition soundsystem.h:69