coastline 0.0.4
Loading...
Searching...
No Matches
sound.h
Go to the documentation of this file.
1#pragma once
2
7
8#include <windows.h>
9// The headers below need the types of windows.h.
10#include <mmsystem.h>
11
12#include "common/soundbuffer.h"
13#include "common/soundsystem.h"
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
26
34
45
54
63
73bool PostCdAudioPlayNotify(int nTrack);
74
83bool PlayEarMusicTrack(int nTrack);
84
93
102
111
119extern unsigned char g_bCdMusicVolume;
120
129
139bool HandleMusicPauseResume(unsigned char bVolume);
140
150bool SetScaledAudioVolume(unsigned char bVolume);
151
161MCIERROR MciPlayCdTracks(HWND hWnd, unsigned char nTrack);
162
169extern int g_nCurrentMusicTrack;
170
177extern int g_nMusicTrackMin;
178
185extern int g_nMusicTrackMax;
186
194
201extern int g_bCdAudioPlaying;
202
211
219bool StopMusicTrack(void);
220
229
237bool PauseCdAudio(void);
238
247
258
265extern int g_dwEarMusicChannel;
266
273extern int g_nMusicDeviceRefCount;
274
282extern int g_bMusicActive;
283
290extern int g_bEarOutputInitialized;
291
302
312
323
332
333#ifdef __cplusplus
334}
335#endif
typedef MCIERROR
typedef MCIDEVICEID
bool PlayEarMusicTrack(int nTrack)
Play a track of music through the EAR library.
int ShutDownEarMusicChannel(void)
Close the music channel of the EAR library.
int g_nMusicTrackMax
The last track of music.
bool HandleMusicPauseResume(unsigned char bVolume)
Pause the music of the CD when its volume turns 0, and play its track again when the volume turns fro...
int g_nCurrentMusicTrack
The track of music that plays.
int g_bEarOutputInitialized
Whether the output of the EAR library is set up.
int GetCurrentMusicTrack(void)
The track of music that plays, from the CD audio in music mode 1 and the EAR library otherwise.
int g_bCdAudioPlaying
Whether the CD audio was paused.
bool InitializeMusicPlayback(void)
Start the music library and its channel.
bool OpenCdaudioMci(HWND hWnd)
Open the CD audio through MCI for the first user of the device of the music, with the time in tracks,...
bool SetScaledAudioVolume(unsigned char bVolume)
Set the attenuation of the channel of the music of the EAR library from a volume, scaled from 0 to 25...
int g_bMusicActive
Whether music is active, with the tracks of the CD read or the channel of the EAR library started.
bool ShutdownEarSound(void)
Drop a user of the EAR library.
bool InitializeEarSound(HWND hWnd)
Load the EAR library and start it for a window, when the game plays music in mode 2.
unsigned char g_bCdMusicVolume
The volume of the music the CD audio last had.
int g_nMusicTrackMin
The first track of music.
bool AdvanceMusicTrackWrapping(void)
Play the next track of music, from the first again after the last.
int g_nMusicDeviceRefCount
The users of the device of the music.
bool StopMusicTrack(void)
Stop the track of music that plays.
bool RouteMusicInitByFlag(HWND hWnd)
Set the music up, opening CD audio through MCI when g_dwPlayMusicMode is 1 and starting the software ...
bool ReleaseMusicDeviceReference(void)
Drop a user of the device of the music.
WPARAM GetEarMusicEventHandle(void)
The event the music library signals at the end of a track.
bool PostCdAudioPlayNotify(int nTrack)
Make a track of the CD audio current, and post a notice of MCI to the window of the music that the pl...
MCIERROR MciPlayCdTracks(HWND hWnd, unsigned char nTrack)
Play the tracks of the CD audio from a track on.
bool PauseCdAudio(void)
Pause the CD audio.
UINT g_uEarSoundWindowMessage
The message the music library sends the main window, in music mode 2.
bool ReplayCurrentMusicTrack(void)
Play the current track of the music again when the music is active.
MCIDEVICEID g_dwMciCdAudioDeviceId
The MCI device of the CD audio, in music mode 1.
int GetCdAudioCurrentTrack(void)
The track of the CD audio that plays, as MCI reports it.
int g_dwEarMusicChannel
The channel of the EAR library the music plays on, 100.
bool InitSoftwareMusicStack(HWND hWnd)
Set up the EAR library for the first user of the device of the music and start its music.
HWND g_hMusicNotifyWnd
The window told when the tracks of the CD audio end.
bool PlayCdAudioFromCurrentTrack(void)
Play the tracks of the CD audio from the current track on.
int GetEarMusicCurrentTrack(void)
The track of music the EAR library plays.
The buffers and the channels of the sound effects of the PC port.
The music, the volumes, and the channels of the sound effects of the Boss Rally release,...
typedef HWND
typedef UINT
typedef WPARAM