[PATCH] emux midi synthesizer doesn't honor SOFT_PEDAL-release event

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When the hardware wavetable synthesizer of an Creative SB Audigy or SBLive! card (with emu10k chip) receives the MIDI SOFT_PEADAL-press event(?? 67 127) the appropriate voice is attenuted. Unfortunately when thepedal is released (event ?? 67 0) the voice does not get it's originalvolume again.
The attached patch fixes this problem by analysing the value (0 or 127)of the midi control event and resetting the effect register in case of arelease event. I'm not 100% sure if the code to reset the register iscorrect but at least it works.
Original patch from "Uwe KrÃ#ger" <uwe_debbug@xxxxxxxx>Submitted to http://bugs.debian.org/474312
Cc: uwe_debbug@xxxxxxxxxxxxxxxxxxxxx: maximilian attems <max@xxxxxxx>--- sound/synth/emux/emux_synth.c |    6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/sound/synth/emux/emux_synth.c b/sound/synth/emux/emux_synth.cindex 478369b..f81e081 100644--- a/sound/synth/emux/emux_synth.c+++ b/sound/synth/emux/emux_synth.c@@ -341,8 +341,12 @@ snd_emux_control(void *p, int type, struct snd_midi_channel *chan) 	case MIDI_CTL_SOFT_PEDAL: #ifdef SNDRV_EMUX_USE_RAW_EFFECT 		/* FIXME: this is an emulation */-		snd_emux_send_effect(port, chan, EMUX_FX_CUTOFF, -160,+		if (chan->control[type])+			snd_emux_send_effect(port, chan, EMUX_FX_CUTOFF, -160, 				     EMUX_FX_FLAG_ADD);+		else+			snd_emux_send_effect(port, chan, EMUX_FX_CUTOFF, 0,+				     EMUX_FX_FLAG_OFF); #endif 		break; -- 1.5.5.1
_______________________________________________Alsa-devel mailing listAlsa-devel@xxxxxxxxxxxxxxxxxxxx://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux