/[svn]/linuxsampler/trunk/src/drivers/audio/AudioOutputDevice.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/drivers/audio/AudioOutputDevice.cpp

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

revision 846 by persson, Sun Mar 19 16:38:22 2006 UTC revision 1607 by schoenebeck, Mon Dec 31 19:03:31 2007 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 Christian Schoenebeck                              *   *   Copyright (C) 2005 - 2007 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 23  Line 23 
23    
24  #include "AudioOutputDeviceFactory.h"  #include "AudioOutputDeviceFactory.h"
25  #include "AudioOutputDevice.h"  #include "AudioOutputDevice.h"
26    #include "../../common/global_private.h"
27    
28  namespace LinuxSampler {  namespace LinuxSampler {
29    
# Line 56  namespace LinuxSampler { Line 57  namespace LinuxSampler {
57          return true;          return true;
58      }      }
59    
60      void AudioOutputDevice::ParameterActive::OnSetValue(bool b) throw (LinuxSamplerException) {      void AudioOutputDevice::ParameterActive::OnSetValue(bool b) throw (Exception) {
61          if (b) ((AudioOutputDevice*)pDevice)->Play();          if (b) ((AudioOutputDevice*)pDevice)->Play();
62          else ((AudioOutputDevice*)pDevice)->Stop();          else ((AudioOutputDevice*)pDevice)->Stop();
63      }      }
# Line 109  namespace LinuxSampler { Line 110  namespace LinuxSampler {
110          return std::vector<int>();          return std::vector<int>();
111      }      }
112    
113      void AudioOutputDevice::ParameterSampleRate::OnSetValue(int i) throw (LinuxSamplerException) {      int AudioOutputDevice::ParameterSampleRate::ValueAsInt() {
114            return (pDevice) ? (int) ((AudioOutputDevice*)pDevice)->SampleRate()
115                             : DeviceCreationParameterInt::ValueAsInt();
116        }
117    
118        void AudioOutputDevice::ParameterSampleRate::OnSetValue(int i) throw (Exception) {
119          /* cannot happen, as parameter is fix */          /* cannot happen, as parameter is fix */
120      }      }
121    
# Line 150  namespace LinuxSampler { Line 156  namespace LinuxSampler {
156      }      }
157    
158      optional<int> AudioOutputDevice::ParameterChannels::RangeMinAsInt(std::map<String,String> Parameters) {      optional<int> AudioOutputDevice::ParameterChannels::RangeMinAsInt(std::map<String,String> Parameters) {
159          return optional<int>::nothing;          return 1;
160      }      }
161    
162      optional<int> AudioOutputDevice::ParameterChannels::RangeMaxAsInt(std::map<String,String> Parameters) {      optional<int> AudioOutputDevice::ParameterChannels::RangeMaxAsInt(std::map<String,String> Parameters) {
# Line 161  namespace LinuxSampler { Line 167  namespace LinuxSampler {
167          return std::vector<int>();          return std::vector<int>();
168      }      }
169    
170      void AudioOutputDevice::ParameterChannels::OnSetValue(int i) throw (LinuxSamplerException) {      void AudioOutputDevice::ParameterChannels::OnSetValue(int i) throw (Exception) {
171          ((AudioOutputDevice*)pDevice)->AcquireChannels(i);          ((AudioOutputDevice*)pDevice)->AcquireChannels(i);
172      }      }
173    
# Line 233  namespace LinuxSampler { Line 239  namespace LinuxSampler {
239          }          }
240      }      }
241    
242        uint AudioOutputDevice::ChannelCount() {
243            return Channels.size();
244        }
245    
246      std::map<String,DeviceCreationParameter*> AudioOutputDevice::DeviceParameters() {      std::map<String,DeviceCreationParameter*> AudioOutputDevice::DeviceParameters() {
247          return Parameters;          return Parameters;
248      }      }

Legend:
Removed from v.846  
changed lines
  Added in v.1607

  ViewVC Help
Powered by ViewVC