diff options
| author | Jonathan Gray | 2002-10-10 08:26:00 +0000 |
|---|---|---|
| committer | Jonathan Gray | 2002-10-10 08:26:00 +0000 |
| commit | 1f41180f943f2e659bcc5eb5154d1e04d4f595ea (patch) | |
| tree | bf97f9df7df550ec31aa2824e584b5c323935aa3 | |
| parent | ba39c5926ce15649b3ebc125dfb4c24be3ec78e3 (diff) | |
| download | scummvm-rg350-1f41180f943f2e659bcc5eb5154d1e04d4f595ea.tar.gz scummvm-rg350-1f41180f943f2e659bcc5eb5154d1e04d4f595ea.tar.bz2 scummvm-rg350-1f41180f943f2e659bcc5eb5154d1e04d4f595ea.zip | |
default port for alsa if env var isn't set
svn-id: r5119
| -rw-r--r-- | sound/mididrv.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sound/mididrv.cpp b/sound/mididrv.cpp index 2d06462711..da314302a0 100644 --- a/sound/mididrv.cpp +++ b/sound/mididrv.cpp @@ -1103,13 +1103,17 @@ int MidiDriver_ALSA::open(int mode) return MERR_STREAMING_NOT_AVAILABLE; if (!(var = getenv("SCUMMVM_PORT"))) { - error("You have to define the environnement variable SCUMMVM_PORT"); - return -1; + // default alsa port if none specified + if (parse_addr("65:0", &seq_client, &seq_port) < 0) { + error("Invalid port %s", var); + return -1; + } } - - if (parse_addr(var, &seq_client, &seq_port) < 0) { - error("Invalid port %s", var); - return -1; + else { + if (parse_addr(var, &seq_client, &seq_port) < 0) { + error("Invalid port %s", var); + return -1; + } } if (my_snd_seq_open(&seq_handle)) { |
