From 9aeb1175c9881be8e3520c7b4d14b81f79f49ca5 Mon Sep 17 00:00:00 2001 From: vruppert Date: Sun, 20 Jul 2008 08:08:23 +0000 Subject: [PATCH] - ALSA code cleanup: removed unused client and queue - return error at unimplemented SYSEX command --- iodev/soundlnx.cc | 8 ++------ iodev/soundlnx.h | 4 +--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/iodev/soundlnx.cc b/iodev/soundlnx.cc index 86e76228..0ac91034 100644 --- a/iodev/soundlnx.cc +++ b/iodev/soundlnx.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: soundlnx.cc,v 1.16 2008/07/19 12:01:54 vruppert Exp $ +// $Id: soundlnx.cc,v 1.17 2008/07/20 08:08:23 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -106,8 +106,6 @@ int bx_sound_linux_c::alsa_seq_open(char *device) WRITELOG(MIDILOG(2), "Couldn't open ALSA sequencer for midi output"); return BX_SOUND_OUTPUT_ERR; } - alsa_seq.queue = snd_seq_alloc_queue(alsa_seq.handle); - alsa_seq.client = snd_seq_client_id(alsa_seq.handle); ret = snd_seq_create_simple_port(alsa_seq.handle, NULL, SND_SEQ_PORT_CAP_WRITE | SND_SEQ_PORT_CAP_SUBS_WRITE | @@ -123,7 +121,6 @@ int bx_sound_linux_c::alsa_seq_open(char *device) } } if (ret < 0) { - snd_seq_free_queue(alsa_seq.handle, alsa_seq.queue); snd_seq_close(alsa_seq.handle); return BX_SOUND_OUTPUT_ERR; } else { @@ -215,7 +212,7 @@ int bx_sound_linux_c::alsa_seq_output(int delta, int command, int length, Bit8u break; case 0xf0: WRITELOG(MIDILOG(3), "alsa_seq_output(): SYSEX not implemented, length=%d", length); - break; + return BX_SOUND_OUTPUT_ERR; default: WRITELOG(MIDILOG(3), "alsa_seq_output(): unknown command 0x%02x, length=%d", command, length); return BX_SOUND_OUTPUT_ERR; @@ -248,7 +245,6 @@ int bx_sound_linux_c::closemidioutput() { #if BX_HAVE_ALSASOUND if ((use_alsa_seq) && (alsa_seq.handle != NULL)) { - snd_seq_free_queue(alsa_seq.handle, alsa_seq.queue); snd_seq_close(alsa_seq.handle); return BX_SOUND_OUTPUT_OK; } diff --git a/iodev/soundlnx.h b/iodev/soundlnx.h index e45179ea..26373f49 100644 --- a/iodev/soundlnx.h +++ b/iodev/soundlnx.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: soundlnx.h,v 1.10 2008/07/19 12:01:54 vruppert Exp $ +// $Id: soundlnx.h,v 1.11 2008/07/20 08:08:23 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -73,8 +73,6 @@ private: bx_bool use_alsa_pcm; struct { snd_seq_t *handle; - int client; - int queue; int source_port; } alsa_seq; struct { -- 2.11.4.GIT