Comments (8)
Could you provide some information on your problem? Useful would be
- steps to reproduce / minimal example
- what did you try?
from qmidi.
from qmidi.
Please try it
http://www.denisgottardello.it/Test01.zip
On windows and Linux no problem.
On Mac OS X sometimes works, sometimes goes to crash.
from qmidi.
You might be right - the request is made with a reference to a temporary (from your functions on_pushButton_clicked
and on_pushButton_2_clicked
), which is likely the cause for the crash. Those will return and the result of HexStringToByteArray(ui->lineEditNoteOn->text())
becomes invalid - and so does request.data
.
Possible options:
- Don't call sendSysEx on temporaries in your non-QMidi code.
- Change
QMidi_CoreMidi.cpp
to alloc and copy the bytes, then use thecompletionProc
of the request to free them again.
I do not have OS X available for testing, so I'm not the right person to implement such a thing ;)
from qmidi.
Solved by changing the code
` MIDISysexSendRequest request;
request.bytesToSend = data.length();
request.complete = false;
request.completionProc = nullptr;
request.completionRefCon = nullptr;
request.data = (Byte *)data.constData();
request.destination = fMidiPtrs->destinationId;
MIDISendSysex(&request);`
to
` MIDISysexSendRequest *request= new MIDISysexSendRequest();
request->bytesToSend = data.length();
request->complete = false;
request->completionProc = nullptr;
request->completionRefCon = nullptr;
request->data = (Byte *)data.constData();
request->destination = fMidiPtrs->destinationId;
MIDISendSysex(request);`
When can I delete the object
request
?
On compile time I have a lot of warnings. Can I add as developer or there is anyone that will improve the code?
from qmidi.
request->completionProc
can be used to delete request again, after passing the pointer there with request->completionRefCon
refer to https://developer.apple.com/documentation/coremidi/midisysexsendrequest
completionProc
will be called when you can delete the request.
from qmidi.
Can I add as developer
@waddlesplash would have to answer that. :)
from qmidi.
You can submit a pull request with this, sure. It would be best if the warnings were fixed, and of course you need to write the callback to delete the request.
from qmidi.
Related Issues (20)
- clear() HOT 3
- Please add documentation
- Set Volume for midi ouput HOT 1
- How can i change tempo in real time playing. HOT 1
- implicit conversions
- How play .mid files ?
- How to set 10 channel ? HOT 2
- Issues trying to include with a cmake based project HOT 4
- Virtual MIDI devices on Windows 10
- MacOS (11.4 and others) with multi Midi devices HOT 3
- Upgrade QMidi to be compatible with Qt 6.2 HOT 1
- Fails to build on FreeBSD 13.0-RELEASE HOT 6
- MIDI messages on OSX
- [Feature Request] Device Status Change Signal
- Unnecessary disposing HOT 1
- I found a bug and tried to fix it.
- Proposal: Rearchitecting QMidi for MIDI 2.0 and Extendibility HOT 2
- Port QMidiOut to macOS (CoreMidi) HOT 5
- Time - Tick conversion HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qmidi.