// // Setup Sound Effects card // int SetupFX (void) { if ( ChooseFxCard() == -1 ) return ( -1 ); DrawCurrentConfig(); switch ( newc.d.card ) { default: savefx = FALSE; break; case M_NONE: savefx = TRUE; break; #ifndef HERETIC case M_PC: savefx = TRUE; break; #endif case M_ADLIB: savefx = TRUE; break; case M_PAS: case M_GUS: ChooseNumDig(); savefx = TRUE; break; case M_WAVE: case M_SB: if ( ChooseSbPort ( &newc.d ) == -1 ) return ( -1 ); if ( ChooseSbIrq ( &newc.d ) == -1 ) return ( -1 ); if ( ChooseSbDma ( &newc.d ) == -1 ) return ( -1 ); ChooseNumDig(); savefx = TRUE; break; case M_CANVAS: newc.d.midiport = 0x330; if ( ChooseMidiPort ( &newc.d ) == -1 ) return ( -1 ); savefx = TRUE; break; case M_GMIDI: if ( ChooseMidiPort ( &newc.d ) == -1 ) return ( -1 ); savefx = TRUE; break; } return 0; }
void RtMidiManager::InitializeMIDI() { // RtMidiIn constructor try { m_midiIn = new RtMidiIn(); m_midiOut = new RtMidiOut(); ChooseMidiPort(); m_midiIn->setCallback( &MidiReadThread, this ); } catch (RtError &error) { // Handle the exception here error.printMessage(); } }