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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 705 - (show annotations) (download)
Wed Jul 20 21:43:23 2005 UTC (18 years, 9 months ago) by schoenebeck
File size: 2420 byte(s)
* support for muting sampler channels and solo mode of the same, two new
  LSCP commands ("SET CHANNEL MUTE" and "SET CHANNEL SOLO") and two new
  fields ("MUTE" and "SOLO") for command "GET CHANNEL INFO" were
  introduced for this (patch by Grigor Iliev, a bit adjusted)

1 /***************************************************************************
2 * *
3 * LinuxSampler - modular, streaming capable sampler *
4 * *
5 * Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck *
6 * Copyright (C) 2005 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 }
32
33 void EngineChannel::SetMute(int state) throw (LinuxSamplerException) {
34 if(iMute == state) return;
35 if(state < -1 || state > 1)
36 throw LinuxSamplerException("Invalid Mute state: " + ToString(state));
37
38 iMute = state;
39
40 StatusChanged(true);
41 }
42
43 int EngineChannel::GetMute() {
44 return iMute;
45 }
46
47 void EngineChannel::SetSolo(bool solo) {
48 if(bSolo == solo) return;
49 bSolo = solo;
50 StatusChanged(true);
51 }
52
53 bool EngineChannel::GetSolo() {
54 return bSolo;
55 }
56
57 } // namespace LinuxSampler

  ViewVC Help
Powered by ViewVC