MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / sendMessage

Method sendMessage

TheForceEngine/TFE_Audio/RtMidi.cpp:3908–3924  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3906}
3907
3908void MidiOutWeb::sendMessage( const unsigned char *message, size_t size )
3909{
3910 if( open_port_number < 0 )
3911 return;
3912
3913 MAIN_THREAD_EM_ASM( {
3914 var output = _rtmidi_internals_get_port_by_number( $0, false );
3915 if( output == null ) {
3916 console.log( "Port #" + $0 + " could not be found.");
3917 return;
3918 }
3919 var buf = new ArrayBuffer ($2);
3920 var msg = new Uint8Array( buf );
3921 msg.set( new Uint8Array( Module.HEAPU8.buffer.slice( $1, $1 + $2 ) ) );
3922 output.send( msg );
3923 }, open_port_number, message, size );
3924}
3925
3926void MidiOutWeb::initialize( const std::string& clientName )
3927{

Callers 2

sendMessageMethod · 0.45
messageMethod · 0.45

Calls 1

setMethod · 0.80

Tested by

no test coverage detected