|
OpenTTD Source
1.10.0-RC1
|
Music playback for Windows. More...
#include "../stdafx.h"#include "../string_func.h"#include "win32_m.h"#include <windows.h>#include <mmsystem.h>#include "../os/windows/win32.h"#include "../debug.h"#include "midifile.hpp"#include "midi.h"#include "../base_media_base.h"#include <mutex>#include "../safeguards.h"Go to the source code of this file.
Data Structures | |
| struct | PlaybackSegment |
Functions | |
| static byte | ScaleVolume (byte original, byte scale) |
| void CALLBACK | MidiOutProc (HMIDIOUT hmo, UINT wMsg, DWORD_PTR dwInstance, DWORD_PTR dwParam1, DWORD_PTR dwParam2) |
| static void | TransmitChannelMsg (byte status, byte p1, byte p2=0) |
| static void | TransmitSysex (const byte *&msg_start, size_t &remaining) |
| static void | TransmitStandardSysex (MidiSysexMessage msg) |
| void CALLBACK | TimerCallback (UINT uTimerID, UINT, DWORD_PTR dwUser, DWORD_PTR, DWORD_PTR) |
| Realtime MIDI playback service routine. More... | |
Variables | |
| struct { | |
| UINT time_period | |
| obtained timer precision value | |
| HMIDIOUT midi_out | |
| handle to open midiOut | |
| UINT timer_id | |
| ID of active multimedia timer. | |
| std::mutex lock | |
| synchronization for playback status fields | |
| bool playing | |
| flag indicating that playback is active | |
| int do_start | |
| flag for starting playback of next_file at next opportunity | |
| bool do_stop | |
| flag for stopping playback at next opportunity | |
| byte current_volume | |
| current effective volume setting | |
| byte new_volume | |
| volume setting to change to | |
| MidiFile current_file | |
| file currently being played from | |
| PlaybackSegment current_segment | |
| segment info for current playback | |
| DWORD playback_start_time | |
| timestamp current file began playback | |
| size_t current_block | |
| next block index to send | |
| MidiFile next_file | |
| upcoming file to play | |
| PlaybackSegment next_segment | |
| segment info for upcoming file | |
| byte channel_volumes [16] | |
| last seen volume controller values in raw data | |
| } | _midi |
| static FMusicDriver_Win32 | iFMusicDriver_Win32 |
Music playback for Windows.
Definition in file win32_m.cpp.
| void CALLBACK TimerCallback | ( | UINT | uTimerID, |
| UINT | , | ||
| DWORD_PTR | dwUser, | ||
| DWORD_PTR | , | ||
| DWORD_PTR | |||
| ) |
Realtime MIDI playback service routine.
This is called by the multimedia timer.
Definition at line 110 of file win32_m.cpp.
Referenced by MusicDriver_Win32::PlaySong().