aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/qmpmidioutfluid.cpp4
-rw-r--r--core/qmpmidioutfluid.hpp2
-rw-r--r--core/qmpmidioutrtmidi.cpp2
-rw-r--r--core/qmpmidioutrtmidi.hpp2
-rw-r--r--core/qmpmidiplay.cpp2
-rw-r--r--core/qmpmidiread.cpp4
6 files changed, 8 insertions, 8 deletions
diff --git a/core/qmpmidioutfluid.cpp b/core/qmpmidioutfluid.cpp
index e9bc6b1..4fcdd21 100644
--- a/core/qmpmidioutfluid.cpp
+++ b/core/qmpmidioutfluid.cpp
@@ -69,10 +69,10 @@ void qmpMidiOutFluid::basicMessage(uint8_t type,uint8_t p1,uint8_t p2)
break;
}
}
-void qmpMidiOutFluid::extendedMessage(uint8_t length,const char *data)
+void qmpMidiOutFluid::extendedMessage(uint32_t length,const char *data)
{
int rlen=0;
- fluid_synth_sysex(synth,data,length,nullptr,&rlen,nullptr,0);
+ fluid_synth_sysex(synth,data,int(length),nullptr,&rlen,nullptr,0);
}
void qmpMidiOutFluid::rpnMessage(uint8_t ch,uint16_t type,uint16_t val)
{
diff --git a/core/qmpmidioutfluid.hpp b/core/qmpmidioutfluid.hpp
index d6a62c9..6cd2058 100644
--- a/core/qmpmidioutfluid.hpp
+++ b/core/qmpmidioutfluid.hpp
@@ -33,7 +33,7 @@ class qmpMidiOutFluid:public qmpMidiOutDevice,public IFluidSettings
void deviceDeinit();
void deviceDeinit(bool freshsettings);
void basicMessage(uint8_t type,uint8_t p1,uint8_t p2);
- void extendedMessage(uint8_t length,const char *data);
+ void extendedMessage(uint32_t length,const char *data);
void rpnMessage(uint8_t ch,uint16_t type,uint16_t val);
void nrpnMessage(uint8_t ch,uint16_t type,uint16_t val);
void panic(uint8_t ch);
diff --git a/core/qmpmidioutrtmidi.cpp b/core/qmpmidioutrtmidi.cpp
index 03b184d..6dc9ca6 100644
--- a/core/qmpmidioutrtmidi.cpp
+++ b/core/qmpmidioutrtmidi.cpp
@@ -201,7 +201,7 @@ void qmpMidiOutRtMidi::basicMessage(uint8_t type,uint8_t p1,uint8_t p2)
msg.push_back(p2);
outport->sendMessage(&msg);
}
-void qmpMidiOutRtMidi::extendedMessage(uint8_t length,const char *data)
+void qmpMidiOutRtMidi::extendedMessage(uint32_t length,const char *data)
{
if(!outport||!outport->isPortOpen())return;
std::vector<unsigned char>msg(data,data+length);
diff --git a/core/qmpmidioutrtmidi.hpp b/core/qmpmidioutrtmidi.hpp
index 8bb829c..2c9195c 100644
--- a/core/qmpmidioutrtmidi.hpp
+++ b/core/qmpmidioutrtmidi.hpp
@@ -31,7 +31,7 @@ public:
void deviceInit();
void deviceDeinit();
void basicMessage(uint8_t type,uint8_t p1,uint8_t p2);
- void extendedMessage(uint8_t length,const char *data);
+ void extendedMessage(uint32_t length,const char *data);
void rpnMessage(uint8_t ch,uint16_t type,uint16_t val);
void nrpnMessage(uint8_t ch,uint16_t type,uint16_t val);
void panic(uint8_t ch);
diff --git a/core/qmpmidiplay.cpp b/core/qmpmidiplay.cpp
index 2992e06..89fdf84 100644
--- a/core/qmpmidiplay.cpp
+++ b/core/qmpmidiplay.cpp
@@ -93,7 +93,7 @@ bool CMidiPlayer::processEvent(const SEvent *e)
if(((e->type&0x0F)==0x00||(e->type&0x0F)==07)&&sendSysEx)
for(auto& i:mididev)
if(i.refcnt)
- i.dev->extendedMessage(e->p1,e->str.c_str());
+ i.dev->extendedMessage(uint32_t(e->str.length()),e->str.c_str());
return false;
}
return false;
diff --git a/core/qmpmidiread.cpp b/core/qmpmidiread.cpp
index 48a149d..697a5bd 100644
--- a/core/qmpmidiread.cpp
+++ b/core/qmpmidiread.cpp
@@ -147,7 +147,7 @@ int CSMFReader::read_event()//returns 0 if End of Track encountered
str=new char[len+8];
if((type&0x0F)==0x00)
{
- str[0]=0xF0;++len;
+ str[0]=char(0xF0);++len;
size_t sz=fread(str+1,1,len-1,f);
if(sz<len-1)error(1,"Unexpected EOF");
}
@@ -156,7 +156,7 @@ int CSMFReader::read_event()//returns 0 if End of Track encountered
size_t sz=fread(str,1,len,f);
if(sz<len)error(1,"Unexpected EOF");
}
- curTrack->appendEvent(SEvent(curid,curt,type,len,0,str));
+ curTrack->appendEvent(SEvent(curid,curt,type,0,0,std::string(str,len)));
if(!strcmp(str,GM1SysX))ret->std=1;
if(!strcmp(str,GM2SysX))ret->std=2;
if(!strcmp(str,GSSysEx))ret->std=3;