mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-15 08:41:59 +00:00
Merge pull request #455 from edward-san/more_wildmidi_fixes
- Fixed Clang errors/warnings on wildMIDI code.
This commit is contained in:
commit
8f149d9048
3 changed files with 6 additions and 6 deletions
|
@ -193,7 +193,7 @@ void WildMIDIDevice::HandleEvent(int status, int parm1, int parm2)
|
||||||
|
|
||||||
void WildMIDIDevice::HandleLongEvent(const BYTE *data, int len)
|
void WildMIDIDevice::HandleLongEvent(const BYTE *data, int len)
|
||||||
{
|
{
|
||||||
Renderer->LongEvent((const char *)data, len);
|
Renderer->LongEvent(data, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
|
@ -162,7 +162,7 @@ struct _mdi {
|
||||||
patch_count = 0;
|
patch_count = 0;
|
||||||
amp = 0;
|
amp = 0;
|
||||||
mix_buffer = NULL;
|
mix_buffer = NULL;
|
||||||
mix_buffer_size = NULL;
|
mix_buffer_size = 0;
|
||||||
reverb = NULL;
|
reverb = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2926,7 +2926,7 @@ void WildMidi_Renderer::ShortEvent(int status, int parm1, int parm2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WildMidi_Renderer::LongEvent(const char *data, int len)
|
void WildMidi_Renderer::LongEvent(const unsigned char *data, int len)
|
||||||
{
|
{
|
||||||
// Check for Roland SysEx
|
// Check for Roland SysEx
|
||||||
if (len >= 11 && // Must be at least 11 bytes
|
if (len >= 11 && // Must be at least 11 bytes
|
||||||
|
@ -2949,7 +2949,7 @@ void WildMidi_Renderer::LongEvent(const char *data, int len)
|
||||||
{ // Check destination address
|
{ // Check destination address
|
||||||
if (((data[6] & 0xF0) == 0x10) && data[7] == 0x15)
|
if (((data[6] & 0xF0) == 0x10) && data[7] == 0x15)
|
||||||
{ // Roland drum track setting
|
{ // Roland drum track setting
|
||||||
int sysex_ch = data[6] & 0x0F;
|
unsigned char sysex_ch = data[6] & 0x0F;
|
||||||
if (sysex_ch == 0)
|
if (sysex_ch == 0)
|
||||||
{
|
{
|
||||||
sysex_ch = 9;
|
sysex_ch = 9;
|
||||||
|
@ -2958,7 +2958,7 @@ void WildMidi_Renderer::LongEvent(const char *data, int len)
|
||||||
{
|
{
|
||||||
sysex_ch -= 1;
|
sysex_ch -= 1;
|
||||||
}
|
}
|
||||||
_event_data ev = { sysex_ch, data[8] };
|
_event_data ev = { sysex_ch, static_cast<unsigned long>(data[8]) };
|
||||||
do_sysex_roland_drum_track((_mdi *)handle, &ev);
|
do_sysex_roland_drum_track((_mdi *)handle, &ev);
|
||||||
}
|
}
|
||||||
else if (data[6] == 0x00 && data[7] == 0x7F && data[8] == 0x00)
|
else if (data[6] == 0x00 && data[7] == 0x7F && data[8] == 0x00)
|
||||||
|
|
|
@ -74,7 +74,7 @@ public:
|
||||||
~WildMidi_Renderer();
|
~WildMidi_Renderer();
|
||||||
|
|
||||||
void ShortEvent(int status, int parm1, int parm2);
|
void ShortEvent(int status, int parm1, int parm2);
|
||||||
void LongEvent(const char *data, int len);
|
void LongEvent(const unsigned char *data, int len);
|
||||||
void ComputeOutput(float *buffer, int len);
|
void ComputeOutput(float *buffer, int len);
|
||||||
void LoadInstrument(int bank, int percussion, int instr);
|
void LoadInstrument(int bank, int percussion, int instr);
|
||||||
int GetVoiceCount();
|
int GetVoiceCount();
|
||||||
|
|
Loading…
Reference in a new issue