4639N/A * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. 4639N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4639N/A * This code is free software; you can redistribute it and/or modify it 4639N/A * under the terms of the GNU General Public License version 2 only, as 4639N/A * published by the Free Software Foundation. Oracle designates this 4639N/A * particular file as subject to the "Classpath" exception as provided 4639N/A * by Oracle in the LICENSE file that accompanied this code. 4639N/A * This code is distributed in the hope that it will be useful, but WITHOUT 4639N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 4639N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 4639N/A * version 2 for more details (a copy is included in the LICENSE file that 4639N/A * You should have received a copy of the GNU General Public License version 4639N/A * 2 along with this work; if not, write to the Free Software Foundation, 4639N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 4639N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 4639N/A/* *************************** MidiOutDevice implementation ***************************************** */ 4639N/A /* queue sizes are ignored for MIDI_OUT only (uses STREAMS) */ 4639N/A // issue a "SUSTAIN OFF" message to each MIDI channel, 0 to 15. 4639N/A // "CONTROL CHANGE" is 176, "SUSTAIN CONTROLLER" is 64, and the value is 0. 4639N/A // $$fb 2002-04-04: It is responsability of the application developer to 4639N/A // leave the device in a consistent state. So I put this in comments 4639N/A for (channel = 0; channel < 16; channel++) 4639N/A MIDI_OUT_SendShortMessage(deviceHandle, (unsigned char)(176 + channel), 4639N/A (unsigned char)64, (unsigned char)0, (UINT32)-1); 4639N/A ERROR0(
"< ERROR: MIDI_OUT_SendShortMessage: handle is NULL\n");
4639N/A case 0xC0:
// Program change 4639N/A case 0xD0:
// Channel pressure 4639N/A fprintf(
stderr,
"%s: %d->internal error: sysex message status=0x%X while sending short message\n",
4639N/A case 0xF1:
// MTC quarter frame message 4639N/A //fprintf(stderr, ">>>MIDI_OUT_SendShortMessage: MTC quarter frame message....\n"); 4639N/A //fprintf(stderr, ">>>MIDI_OUT_SendShortMessage: Song select....\n"); 4639N/A case 0xF2:
// Song position pointer 4639N/A //fprintf(stderr, ">>>MIDI_OUT_SendShortMessage: Song position pointer....\n"); 4639N/A //fprintf(stderr, ">>>MIDI_OUT_SendShortMessage: Tune request....\n"); 4639N/A fprintf(
stderr,
"%s: %d->Invalid message: message status=0x%X while sending short message\n",
4639N/A // This can't happen, but handle it anyway. 4639N/A fprintf(
stderr,
"%s: %d->Invalid message: message status=0x%X while sending short message\n",
4639N/A ERROR0(
"< ERROR: MIDI_OUT_SendLongMessage: handle, or data is NULL\n");
4639N/A // Copies the bytes to our current packet. 4639N/A // Packet list is full, send it. 4639N/A // Moves the data pointer to the next segment. 4639N/A#
endif /* USE_PLATFORM_MIDI_OUT */