/[svn]/linuxsampler/trunk/src/engines/sf2/EngineChannel.h
ViewVC logotype

Contents of /linuxsampler/trunk/src/engines/sf2/EngineChannel.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2871 - (show annotations) (download) (as text)
Sun Apr 10 18:22:23 2016 UTC (8 years ago) by schoenebeck
File MIME type: text/x-c++hdr
File size: 2937 byte(s)
* All engines: Implemented scheduler for delayed MIDI events and for
  suspended real-time instrument scripts.
* Real-Time instrument scripts: Implemented support for built-in "wait()"
  function's "duration-us" argument, thus scripts using this function are
  now correctly resumed after the requested amount of microseconds.
* Real-Time instrument scripts: Implemented support for built-in
  "play_note()" function's "duration-us" argument, thus notes triggered
  with this argument are now correctly released after the requested amount
  of microseconds.
* Real-Time instrument scripts: Fixed crash which happened when trying to
  reference an undeclared script variable.
* Real-Time instrument scripts: Script events were not cleared when
  engine channel was reset, potentially causing undefined behavior.
* All engines: Attempt to partly fix resetting engine channels vs.
  resetting engine, an overall cleanup of the Reset*(),
  ConnectAudioDevice(), DisconnectAudioDevice() API methods would still be
  desirable though, because the current situation is still inconsistent
  and error prone.
* Bumped version (2.0.0.svn2).

1 /***************************************************************************
2 * *
3 * LinuxSampler - modular, streaming capable sampler *
4 * *
5 * Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck *
6 * Copyright (C) 2005 - 2008 Christian Schoenebeck *
7 * Copyright (C) 2009 - 2012 Christian Schoenebeck and Grigor Iliev *
8 * Copyright (C) 2012 - 2016 Christian Schoenebeck and Andreas Persson *
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 * This program is distributed in the hope that it will be useful, *
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 * GNU General Public License for more details. *
19 * *
20 * You should have received a copy of the GNU General Public License *
21 * along with this program; if not, write to the Free Software *
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
23 * MA 02111-1307 USA *
24 ***************************************************************************/
25
26 #ifndef __LS_SF2_ENGINECHANNEL_H__
27 #define __LS_SF2_ENGINECHANNEL_H__
28
29 #include "../AbstractEngine.h"
30 #include "../EngineChannelBase.h"
31 #include "../EngineChannelFactory.h"
32 #include "Voice.h"
33 #include <SF.h>
34
35 namespace LinuxSampler { namespace sf2 {
36 class Voice;
37
38 class EngineChannel: public LinuxSampler::EngineChannelBase<Voice, ::sf2::Region, ::sf2::Preset> {
39 public:
40 virtual void SendProgramChange(uint8_t Program);
41 virtual void LoadInstrument();
42 virtual void ResetInternal(bool bResetEngine) OVERRIDE;
43
44 virtual AbstractEngine::Format GetEngineFormat();
45
46 friend class Voice;
47 friend class Engine;
48 friend class LinuxSampler::EngineChannelFactory;
49
50 protected:
51 EngineChannel();
52 virtual ~EngineChannel();
53
54 virtual void ProcessKeySwitchChange(int key);
55
56 private:
57 bool PressedKeys[128];
58 int LastKeySwitch;
59 int LastKey;
60 };
61
62 }} // namespace LinuxSampler::sf2
63
64 #endif /* __LS_SF2_ENGINECHANNEL_H__ */

  ViewVC Help
Powered by ViewVC