/[svn]/linuxsampler/trunk/src/engines/common/Voice.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/common/Voice.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2114 by persson, Tue Feb 23 18:32:31 2010 UTC revision 2115 by persson, Thu Aug 12 15:36:15 2010 UTC
# Line 3  Line 3 
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck    *   *   Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck    *
6   *   Copyright (C) 2005-2009 Christian Schoenebeck                         *   *   Copyright (C) 2005-2010 Christian Schoenebeck                         *
7   *                                                                         *   *                                                                         *
8   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
9   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 22  Line 22 
22   ***************************************************************************/   ***************************************************************************/
23    
24  #ifndef __LS_VOICE_H__  #ifndef __LS_VOICE_H__
25  #define __LS_VOICE_H__  #define __LS_VOICE_H__
26    
27  #include "Event.h"  #include "Event.h"
28  #include "../../common/Pool.h"  #include "../../common/Pool.h"
# Line 40  namespace LinuxSampler { Line 40  namespace LinuxSampler {
40                  playback_state_disk = 3                  playback_state_disk = 3
41              };              };
42    
43              // Types              // Type bits. Mostly mutual exclusive, but a voice may both be of one shot type and require a release trigger at the same time.
44              enum type_t {              enum type_t {
45                  type_normal,                  type_normal = 0,
46                  type_release_trigger_required,  ///< If the key of this voice will be released, it causes a release triggered voice to be spawned                  type_release_trigger_required = 1 << 1,  ///< If the key of this voice will be released, it causes a release triggered voice to be spawned
47                  type_release_trigger            ///< Release triggered voice which cannot be killed by releasing its key                  type_release_trigger = 1 << 2,           ///< Release triggered voice which cannot be killed by releasing its key
48                    type_one_shot = 1 << 3,                  ///< Voice should not be released by note off
49                    type_controller_triggered = 1 << 4       ///< Voice is triggered by MIDI CC instead of a note on
50              };              };
51    
52              struct PitchInfo {              struct PitchInfo {
# Line 119  namespace LinuxSampler { Line 121  namespace LinuxSampler {
121              Voice() { }              Voice() { }
122              virtual ~Voice() { }              virtual ~Voice() { }
123      };      };
 } // namespace LinuxSampler  
124    
125  #endif  /* __LS_VOICE_H__ */      // |= operator for the type_t enum
126        inline Voice::type_t operator|=(Voice::type_t& lhs, Voice::type_t rhs) {
127            return lhs = static_cast<Voice::type_t>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs));
128        }
129    
130    } // namespace LinuxSampler
131    
132    #endif  /* __LS_VOICE_H__ */

Legend:
Removed from v.2114  
changed lines
  Added in v.2115

  ViewVC Help
Powered by ViewVC