Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions RtMidi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1683,8 +1683,9 @@ void MidiOutCore :: sendMessage( const unsigned char *message, size_t size )
OSStatus result;

ByteCount bufsize = nBytes > 65535 ? 65535 : nBytes;
Byte buffer[bufsize+16]; // pad for other struct members
ByteCount listSize = sizeof( buffer );
ByteCount listSize = (bufsize+16) * sizeof(Byte);
Byte *buffer = (Byte *) alloca(listSize);

MIDIPacketList *packetList = (MIDIPacketList*)buffer;

ByteCount remainingBytes = nBytes;
Expand Down
Loading