|
| PACK_N (struct ChunkHeader { FOURCC type;DWORD length;}, 2) |
| A RIFF chunk header.
|
|
| PACK_N (struct WAVE_DOWNLOAD { DMUS_DOWNLOADINFO dlInfo;ULONG ulOffsetTable[2];DMUS_WAVE dmWave;DMUS_WAVEDATA dmWaveData;}, 2) |
| Buffer format for a DLS wave download.
|
|
static uint8_t | ScaleVolume (uint8_t original, uint8_t scale) |
|
static void | TransmitChannelMsg (IDirectMusicBuffer *buffer, REFERENCE_TIME rt, uint8_t status, uint8_t p1, uint8_t p2=0) |
|
static void | TransmitSysex (IDirectMusicBuffer *buffer, REFERENCE_TIME rt, const uint8_t *&msg_start, size_t &remaining) |
|
static void | TransmitStandardSysex (IDirectMusicBuffer *buffer, REFERENCE_TIME rt, MidiSysexMessage msg) |
|
static void | TransmitNotesOff (IDirectMusicBuffer *buffer, REFERENCE_TIME block_time, REFERENCE_TIME cur_time) |
| Transmit 'Note off' messages to all MIDI channels.
|
|
static void | MidiThreadProc () |
|
static void * | DownloadArticulationData (int base_offset, void *data, const std::vector< CONNECTION > &artic) |
|
static const char * | LoadDefaultDLSFile (const char *user_dls) |
|
|
static const int | MS_TO_REFTIME = 1000 * 10 |
| DirectMusic time base is 100 ns.
|
|
static const int | MIDITIME_TO_REFTIME = 10 |
| Time base of the midi file reader is 1 us.
|
|
struct { |
bool shutdown |
| flag to indicate playback thread shutdown
|
|
bool playing |
| flag indicating that playback is active
|
|
bool do_start |
| flag for starting playback of next_file at next opportunity
|
|
bool do_stop |
| flag for stopping playback at next opportunity
|
|
int preload_time |
| preload time for music blocks.
|
|
uint8_t new_volume |
| volume setting to change to
|
|
MidiFile next_file |
| upcoming file to play
|
|
PlaybackSegment next_segment |
| segment info for upcoming file
|
|
} | _playback |
|
static std::thread | _dmusic_thread |
| Handle to our worker thread.
|
|
static HANDLE | _thread_event = nullptr |
| Event to signal the thread that it should look at a state change.
|
|
static std::mutex | _thread_mutex |
| Lock access to playback data that is not thread-safe.
|
|
static IDirectMusic * | _music = nullptr |
| The direct music object manages buffers and ports.
|
|
static IDirectMusicPort * | _port = nullptr |
| The port object lets us send MIDI data to the synthesizer.
|
|
static IDirectMusicBuffer * | _buffer = nullptr |
| The buffer object collects the data to sent.
|
|
static std::vector< IDirectMusicDownload * > | _dls_downloads |
| List of downloaded DLS instruments.
|
|
static FMusicDriver_DMusic | iFMusicDriver_DMusic |
|
Playing music via DirectMusic.
Definition in file dmusic.cpp.