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
9 changes: 8 additions & 1 deletion audio/audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ void audio::Init(cfestring& musicDirectory)
} catch (RtMidiError &error)
{
error.printMessage();
ABORT("MIDI Out Error");
// No MIDI backend (e.g. no /dev/snd/seq): run without music.
return;
}


Expand Down Expand Up @@ -181,6 +182,9 @@ cfestring& audio::GetCurrentlyPlayedFile()
/* Port0 is NULL, and disabled. */
int audio::ChangeMIDIOutputDevice(int newPort)
{
if( !midiout )
return 0;

if( newPort != CurrentMIDIOutPort)
{
audio::SetPlaybackStatus(0x00);
Expand Down Expand Up @@ -209,6 +213,9 @@ int audio::ChangeMIDIOutputDevice(int newPort)

int audio::GetMIDIOutputDevices(std::vector<std::string>& deviceNames)
{
if( !midiout )
return 0;

int nPorts = midiout->getPortCount();
std::string portName;

Expand Down