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

Contents of /linuxsampler/trunk/src/engines/EngineChannel.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 947 - (show annotations) (download)
Mon Nov 27 21:34:55 2006 UTC (17 years, 4 months ago) by schoenebeck
File size: 3206 byte(s)
* implemented MIDI instrument mapping according to latest LSCP draft

1 /***************************************************************************
2 * *
3 * LinuxSampler - modular, streaming capable sampler *
4 * *
5 * Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck *
6 * Copyright (C) 2005, 2006 Christian Schoenebeck *
7 * *
8 * 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 *
10 * the Free Software Foundation; either version 2 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This program is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU General Public License *
19 * along with this program; if not, write to the Free Software *
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
21 * MA 02111-1307 USA *
22 ***************************************************************************/
23
24 #include "EngineChannel.h"
25
26 namespace LinuxSampler {
27
28 EngineChannel::EngineChannel() {
29 iMute = 0;
30 bSolo = false;
31 uiMidiBankMsb = 0;
32 uiMidiBankLsb = 0;
33 uiMidiProgram = 0;
34 }
35
36 void EngineChannel::SetMute(int state) throw (Exception) {
37 if(iMute == state) return;
38 if(state < -1 || state > 1)
39 throw Exception("Invalid Mute state: " + ToString(state));
40
41 iMute = state;
42
43 StatusChanged(true);
44 }
45
46 int EngineChannel::GetMute() {
47 return iMute;
48 }
49
50 void EngineChannel::SetSolo(bool solo) {
51 if(bSolo == solo) return;
52 bSolo = solo;
53 StatusChanged(true);
54 }
55
56 bool EngineChannel::GetSolo() {
57 return bSolo;
58 }
59
60 uint8_t EngineChannel::GetMidiProgram() {
61 return uiMidiProgram; // AFAIK atomic on all systems
62 }
63
64 void EngineChannel::SetMidiProgram(uint8_t Program) {
65 uiMidiProgram = Program; // AFAIK atomic on all systems
66 }
67
68 uint8_t EngineChannel::GetMidiBankMsb() {
69 return uiMidiBankMsb; // AFAIK atomic on all systems
70 }
71
72 void EngineChannel::SetMidiBankMsb(uint8_t BankMSB) {
73 uiMidiBankMsb = BankMSB; // AFAIK atomic on all systems
74 }
75
76 uint8_t EngineChannel::GetMidiBankLsb() {
77 return uiMidiBankLsb; // AFAIK atomic on all systems
78 }
79
80 void EngineChannel::SetMidiBankLsb(uint8_t BankLSB) {
81 uiMidiBankLsb = BankLSB; // AFAIK atomic on all systems
82 }
83
84 } // namespace LinuxSampler

  ViewVC Help
Powered by ViewVC