From 585f8b6d93f2630416f9ce52eef8ba5a075e128b Mon Sep 17 00:00:00 2001 From: Vesa Date: Sat, 14 Jun 2014 20:36:21 +0300 Subject: [PATCH] SF2 player: fix playback issues Changing the velocity after noteon doesn't really seem to work on fluidsynth (may be dependent on soundfont file) - seems like the panning changes when velocity is changed. So I disabled that, after which everything works fine. --- plugins/sf2_player/sf2_player.cpp | 6 +++--- plugins/sf2_player/sf2_player.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/sf2_player/sf2_player.cpp b/plugins/sf2_player/sf2_player.cpp index 55c199ca0..7ce0219fc 100644 --- a/plugins/sf2_player/sf2_player.cpp +++ b/plugins/sf2_player/sf2_player.cpp @@ -542,7 +542,7 @@ void sf2Instrument::playNote( NotePlayHandle * _n, sampleFrame * ) { SF2PluginData * pluginData = new SF2PluginData; pluginData->midiNote = midiNote; - pluginData->lastPanning = -1; + pluginData->lastPanning = 0; pluginData->lastVelocity = 127; pluginData->fluidVoice = NULL; @@ -588,7 +588,7 @@ void sf2Instrument::playNote( NotePlayHandle * _n, sampleFrame * ) m_notesRunningMutex.unlock(); } - SF2PluginData * pluginData = static_cast( +/* SF2PluginData * pluginData = static_cast( _n->m_pluginData ); #ifdef SOMEONE_FIXED_PER_NOTE_PANNING if( pluginData->fluidVoice && @@ -620,7 +620,7 @@ void sf2Instrument::playNote( NotePlayHandle * _n, sampleFrame * ) m_synthMutex.unlock(); pluginData->lastVelocity = currentVelocity; - } + }*/ } diff --git a/plugins/sf2_player/sf2_player.h b/plugins/sf2_player/sf2_player.h index 5c2f5beb8..728a717cc 100644 --- a/plugins/sf2_player/sf2_player.h +++ b/plugins/sf2_player/sf2_player.h @@ -24,8 +24,8 @@ */ -#ifndef _SF2_PLAYER_H -#define _SF2_PLAYER_H +#ifndef SF2_PLAYER_H +#define SF2_PLAYER_H #include