|
coastline 0.0.4
|
The music of the PC port. More...
#include <windows.h>#include <mmsystem.h>#include "common/soundbuffer.h"#include "common/soundsystem.h"
Go to the source code of this file.
Functions | |
| bool | InitializeEarSound (HWND hWnd) |
| Load the EAR library and start it for a window, when the game plays music in mode 2. | |
| bool | InitializeMusicPlayback (void) |
| Start the music library and its channel. | |
| 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 play finished, for the window to play the track. | |
| bool | PlayEarMusicTrack (int nTrack) |
| Play a track of music through the EAR library. | |
| int | GetCurrentMusicTrack (void) |
| The track of music that plays, from the CD audio in music mode 1 and the EAR library otherwise. | |
| int | GetCdAudioCurrentTrack (void) |
| The track of the CD audio that plays, as MCI reports it. | |
| int | GetEarMusicCurrentTrack (void) |
| The track of music the EAR library plays. | |
| bool | ReplayCurrentMusicTrack (void) |
| Play the current track of the music again when the music is active. | |
| 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 from 0, while a track plays. | |
| 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 255 into 0 to 10000, when the music is active. | |
| MCIERROR | MciPlayCdTracks (HWND hWnd, unsigned char nTrack) |
| Play the tracks of the CD audio from a track on. | |
| bool | AdvanceMusicTrackWrapping (void) |
| Play the next track of music, from the first again after the last. | |
| bool | StopMusicTrack (void) |
| Stop the track of music that plays. | |
| int | ShutDownEarMusicChannel (void) |
| Close the music channel of the EAR library. | |
| bool | PauseCdAudio (void) |
| Pause the CD audio. | |
| bool | PlayCdAudioFromCurrentTrack (void) |
| Play the tracks of the CD audio from the current track on. | |
| bool | RouteMusicInitByFlag (HWND hWnd) |
| Set the music up, opening CD audio through MCI when g_dwPlayMusicMode is 1 and starting the software music otherwise. | |
| 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, and read the number of tracks. | |
| bool | InitSoftwareMusicStack (HWND hWnd) |
| Set up the EAR library for the first user of the device of the music and start its music. | |
| bool | ReleaseMusicDeviceReference (void) |
| Drop a user of the device of the music. | |
| bool | ShutdownEarSound (void) |
| Drop a user of the EAR library. | |
Variables | |
| UINT | g_uEarSoundWindowMessage |
| The message the music library sends the main window, in music mode 2. | |
| MCIDEVICEID | g_dwMciCdAudioDeviceId |
| The MCI device of the CD audio, in music mode 1. | |
| unsigned char | g_bCdMusicVolume |
| The volume of the music the CD audio last had. | |
| int | g_nCurrentMusicTrack |
| The track of music that plays. | |
| int | g_nMusicTrackMin |
| The first track of music. | |
| int | g_nMusicTrackMax |
| The last track of music. | |
| HWND | g_hMusicNotifyWnd |
| The window told when the tracks of the CD audio end. | |
| int | g_bCdAudioPlaying |
| Whether the CD audio was paused. | |
| int | g_dwEarMusicChannel |
| The channel of the EAR library the music plays on, 100. | |
| int | g_nMusicDeviceRefCount |
| The users of the device of the music. | |
| int | g_bMusicActive |
| Whether music is active, with the tracks of the CD read or the channel of the EAR library started. | |
| int | g_bEarOutputInitialized |
| Whether the output of the EAR library is set up. | |
The music of the PC port.
| bool InitializeEarSound | ( | HWND | hWnd | ) |
Load the EAR library and start it for a window, when the game plays music in mode 2.
Only the first call does the work. A failure shows a message and exits the game.
| hWnd | The window the library posts its messages to. |
| bool InitializeMusicPlayback | ( | void | ) |
Start the music library and its channel.
| 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 play finished, for the window to play the track.
| nTrack | The track. |
| bool PlayEarMusicTrack | ( | int | nTrack | ) |
Play a track of music through the EAR library.
| nTrack | The track. |
| int GetCurrentMusicTrack | ( | void | ) |
The track of music that plays, from the CD audio in music mode 1 and the EAR library otherwise.
| int GetCdAudioCurrentTrack | ( | void | ) |
The track of the CD audio that plays, as MCI reports it.
| int GetEarMusicCurrentTrack | ( | void | ) |
The track of music the EAR library plays.
| bool ReplayCurrentMusicTrack | ( | void | ) |
Play the current track of the music again when the music is active.
| 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 from 0, while a track plays.
The volume is recorded in g_bCdMusicVolume.
| bVolume | The volume. |
| 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 255 into 0 to 10000, when the music is active.
| bVolume | The volume. |
Play the tracks of the CD audio from a track on.
| hWnd | The window told when the tracks end. |
| nTrack | The first track. |
| bool AdvanceMusicTrackWrapping | ( | void | ) |
Play the next track of music, from the first again after the last.
| bool StopMusicTrack | ( | void | ) |
Stop the track of music that plays.
A CD audio that does not stop has its device closed.
| int ShutDownEarMusicChannel | ( | void | ) |
Close the music channel of the EAR library.
| bool PauseCdAudio | ( | void | ) |
Pause the CD audio.
A CD audio that does not pause has its device closed.
| bool PlayCdAudioFromCurrentTrack | ( | void | ) |
Play the tracks of the CD audio from the current track on.
| bool RouteMusicInitByFlag | ( | HWND | hWnd | ) |
Set the music up, opening CD audio through MCI when g_dwPlayMusicMode is 1 and starting the software music otherwise.
| hWnd | The main window. |
| 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, and read the number of tracks.
The music then plays tracks 2 to the last.
| hWnd | The window told of the end of a track. |
| bool InitSoftwareMusicStack | ( | HWND | hWnd | ) |
Set up the EAR library for the first user of the device of the music and start its music.
| hWnd | The main window. |
| bool ReleaseMusicDeviceReference | ( | void | ) |
Drop a user of the device of the music.
In music mode 1 the CD audio stops, and the last user closes its device. In mode 2 the music channel of the EAR library is cleared, and the last user shuts the library down.
| bool ShutdownEarSound | ( | void | ) |
Drop a user of the EAR library.
The last user shuts the library down.
|
extern |
The message the music library sends the main window, in music mode 2.
|
extern |
The MCI device of the CD audio, in music mode 1.
|
extern |
The volume of the music the CD audio last had.
Only whether it is 0 matters, and the music of the CD is paused at 0.
|
extern |
The track of music that plays.
|
extern |
The first track of music.
|
extern |
The last track of music.
|
extern |
The window told when the tracks of the CD audio end.
|
extern |
Whether the CD audio was paused.
|
extern |
The channel of the EAR library the music plays on, 100.
|
extern |
The users of the device of the music.
|
extern |
Whether music is active, with the tracks of the CD read or the channel of the EAR library started.
|
extern |
Whether the output of the EAR library is set up.