coastline 0.0.4
Loading...
Searching...
No Matches
musicdevice.h
Go to the documentation of this file.
1#ifndef COASTLINE_WIN32_EAR_MUSICDEVICE_H
2#define COASTLINE_WIN32_EAR_MUSICDEVICE_H
3
4#include <stdint.h>
5
6#include <windows.h>
7// Multimedia declarations require the core Windows SDK types first.
8#include <mmsystem.h>
9
10#include "ear/musicdevice.h"
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
21
28extern int32_t g_bCdAudioMixerInitialized;
34extern int32_t g_bMidiMixerInitialized;
39extern int32_t g_bMidiSequencerActive;
40
45extern int32_t g_bMidiVolumeControlAvailable;
50extern int32_t g_bMidiMuteControlAvailable;
55extern int32_t g_bCdVolumeControlAvailable;
60extern int32_t g_bCdMuteControlAvailable;
61
66extern uint16_t g_wCdAudioDeviceId;
71extern MCIDEVICEID g_dwMidiSequencerDeviceId;
72
77extern DWORD g_dwCdTrackCount;
85extern EarCdTrackPosition *g_pCdTrackPositions;
86
91extern HMIXER g_hCdAudioMixer;
96extern HMIXER g_hMidiMixer;
97
102extern MIXERCONTROLA g_CdMuteMixerControl;
107extern MIXERCONTROLA g_CdVolumeMixerControl;
112extern MIXERCONTROLA g_MidiVolumeMixerControl;
117extern MIXERCONTROLA g_MidiMuteMixerControl;
118
123extern LONG g_bSavedMidiMute;
128extern DWORD g_dwSavedCdVolume;
133extern LONG g_bSavedCdMute;
138extern DWORD g_dwSavedMidiVolume;
143extern DWORD g_dwCdVolumeMaximum;
148extern DWORD g_dwMidiVolumeMaximum;
150
157
164
171
180uint16_t __stdcall FindCdTrackAtPosition(DWORD position);
181
187DWORD __stdcall GetCdTrackStartPosition(uint16_t track);
188
195DWORD __stdcall GetCdTrackEndPosition(uint16_t track);
196
205int __stdcall OpenCdAudioMixer(UINT mixer);
206
213
222int __stdcall OpenMidiMixer(UINT mixer);
223
229void CloseMidiMixer(void);
230
238int __stdcall CacheMidiMixerControls(DWORD line);
239
248
257
266
272
278int __stdcall IsCdTrackInRange(DWORD track);
279
288
296
303
304#ifdef __cplusplus
305}
306#endif
307
308#endif /* COASTLINE_WIN32_EAR_MUSICDEVICE_H */
typedef MCIDEVICEID
Absolute CD track positions in the MCI millisecond time format.
Definition musicdevice.h:17
DWORD end
Definition musicdevice.h:19
DWORD start
Definition musicdevice.h:18
void CloseCdAudioMixer(void)
Close the mixer of the CD audio, unless the MIDI mixer shares it.
void MarkMidiSequencerActive(void)
Record that a playback is using the MIDI sequencer.
int __stdcall CacheMidiMixerControls(DWORD line)
Find the volume and the mute controls of a line of the MIDI mixer and save their values.
DWORD __stdcall GetCdTrackStartPosition(uint16_t track)
int __stdcall OpenCdAudioMixer(UINT mixer)
Open the mixer of the CD audio, sharing the MIDI mixer when it is the same device.
int __stdcall IsCdTrackInRange(DWORD track)
DWORD __stdcall GetCdTrackEndPosition(uint16_t track)
DWORD GetCdAudioDeviceMode(void)
int OpenCdAudioDevice(void)
Open the CD audio device, timed in milliseconds, and read its tracks.
int InitializeMusicMixers(void)
Open the mixers the configuration selects and save the values of their controls.
int WaitForCdAudioReady(void)
Wait for an open CD audio device to close, closing its door when it has no CD and waiting up to a sec...
int OpenMidiSequencerDevice(void)
Open the MIDI sequencer.
int __stdcall OpenMidiMixer(UINT mixer)
Open the mixer of the MIDI music, sharing the CD audio mixer when it is the same device.
void CloseMidiMixer(void)
Close the mixer of the MIDI music, unless the CD audio mixer shares it.
void CloseActiveMidiSequencer(void)
Stop and close the MIDI sequencer when a playback is using it.
int __stdcall CacheCdAudioMixerControls(DWORD line)
Find the volume and the mute controls of a line of the CD audio mixer and save their values.
void RestoreMusicMixerControls(void)
Give the volume and the mute controls of the mixers back their values and close the mixers.
void StopAndCloseMidiSequencer(void)
CD mixer initialisation marker, also set when mixer access is disabled.
uint16_t __stdcall FindCdTrackAtPosition(DWORD position)
Find the track at a position using the loaded table.
typedef DWORD
typedef LONG
typedef UINT