| 3906 | } |
| 3907 | |
| 3908 | void 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 | |
| 3926 | void MidiOutWeb::initialize( const std::string& clientName ) |
| 3927 | { |
no test coverage detected