--- linuxsampler/trunk/src/engines/EngineBase.h 2014/06/18 00:14:57 2645 +++ linuxsampler/trunk/src/engines/EngineBase.h 2015/08/23 06:14:00 2837 @@ -4,7 +4,7 @@ * * * Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck * * Copyright (C) 2005-2008 Christian Schoenebeck * - * Copyright (C) 2009-2013 Christian Schoenebeck and Grigor Iliev * + * Copyright (C) 2009-2015 Christian Schoenebeck and Grigor Iliev * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -432,14 +432,14 @@ * @param pRegion - region the engine shall stop using */ virtual void Suspend(RR* pRegion) { - dmsg(2,("EngineBase: Suspending Region %x ...\n",pRegion)); + dmsg(2,("EngineBase: Suspending Region %p ...\n",(void*)pRegion)); { LockGuard lock(SuspendedRegionsMutex); SuspensionChangeOngoing.Set(true); pPendingRegionSuspension = pRegion; SuspensionChangeOngoing.WaitAndUnlockIf(true); } - dmsg(2,("EngineBase: Region %x suspended.",pRegion)); + dmsg(2,("EngineBase: Region %p suspended.",(void*)pRegion)); } /** @@ -449,14 +449,14 @@ * @param pRegion - region the engine shall be allowed to use again */ virtual void Resume(RR* pRegion) { - dmsg(2,("EngineBase: Resuming Region %x ...\n",pRegion)); + dmsg(2,("EngineBase: Resuming Region %p ...\n",(void*)pRegion)); { LockGuard lock(SuspendedRegionsMutex); SuspensionChangeOngoing.Set(true); pPendingRegionResumption = pRegion; SuspensionChangeOngoing.WaitAndUnlockIf(true); } - dmsg(2,("EngineBase: Region %x resumed.\n",pRegion)); + dmsg(2,("EngineBase: Region %p resumed.\n",(void*)pRegion)); } virtual void ResetSuspendedRegions() { @@ -634,7 +634,7 @@ // if a valid real-time instrument script is loaded, pre-process // the event list by running the script now, since the script // might filter events or add new ones for this cycle - if (pChannel->pScript && pChannel->pScript->bHasValidScript) { + if (pChannel->pScript) { // resume any suspended script executions still hanging // around of previous audio fragment cycles for (RTList::Iterator itEvent = pChannel->pScript->pEvents->first(), @@ -978,7 +978,8 @@ dmsg(5,("Engine: instrument change command received\n")); cmd.bChangeInstrument = false; pEngineChannel->pInstrument = cmd.pInstrument; - pEngineChannel->pScript = cmd.pScript; + pEngineChannel->pScript = + cmd.pScript->bHasValidScript ? cmd.pScript : NULL; instrumentChanged = true; pEngineChannel->MarkAllActiveVoicesAsOrphans(); @@ -1154,7 +1155,7 @@ case 0x1d: { // reverb send of note (Roland GS NRPN) const uint note = NrpnCtrlLSB; const float reverb = float(itControlChangeEvent->Param.CC.Value) / 127.0f; - dmsg(4,("Note Reverb Send NRPN received (note=%d,send=%d).\n", note, reverb)); + dmsg(4,("Note Reverb Send NRPN received (note=%d,send=%f).\n", note, reverb)); if (note < 128) pChannel->pMIDIKeyInfo[note].ReverbSend = reverb; break; @@ -1162,7 +1163,7 @@ case 0x1e: { // chorus send of note (Roland GS NRPN) const uint note = NrpnCtrlLSB; const float chorus = float(itControlChangeEvent->Param.CC.Value) / 127.0f; - dmsg(4,("Note Chorus Send NRPN received (note=%d,send=%d).\n", note, chorus)); + dmsg(4,("Note Chorus Send NRPN received (note=%d,send=%f).\n", note, chorus)); if (note < 128) pChannel->pMIDIKeyInfo[note].ChorusSend = chorus; break;