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

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

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

revision 483 by schoenebeck, Mon Mar 21 23:40:56 2005 UTC revision 1248 by persson, Fri Jun 22 10:10:06 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, 2006 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 105  namespace LinuxSampler { Line 105  namespace LinuxSampler {
105      AudioOutputDeviceJack::AudioChannelJack::AudioChannelJack(uint ChannelNr, AudioOutputDeviceJack* pDevice) throw (AudioOutputException) : AudioChannel(ChannelNr, CreateJackPort(ChannelNr, pDevice), pDevice->uiMaxSamplesPerCycle) {      AudioOutputDeviceJack::AudioChannelJack::AudioChannelJack(uint ChannelNr, AudioOutputDeviceJack* pDevice) throw (AudioOutputException) : AudioChannel(ChannelNr, CreateJackPort(ChannelNr, pDevice), pDevice->uiMaxSamplesPerCycle) {
106          this->pDevice   = pDevice;          this->pDevice   = pDevice;
107          this->ChannelNr = ChannelNr;          this->ChannelNr = ChannelNr;
108            delete Parameters["NAME"];
109          Parameters["NAME"]          = new ParameterName(this);          Parameters["NAME"]          = new ParameterName(this);
110          Parameters["JACK_BINDINGS"] = new ParameterJackBindings(this);          Parameters["JACK_BINDINGS"] = new ParameterJackBindings(this);
111      }      }
# Line 129  namespace LinuxSampler { Line 130  namespace LinuxSampler {
130          InitWithDefault(); // use default name          InitWithDefault(); // use default name
131      }      }
132    
133      AudioOutputDeviceJack::ParameterName::ParameterName(String s) throw (LinuxSamplerException) : DeviceCreationParameterString(s) {      AudioOutputDeviceJack::ParameterName::ParameterName(String s) throw (Exception) : DeviceCreationParameterString(s) {
134      }      }
135    
136      String AudioOutputDeviceJack::ParameterName::Description() {      String AudioOutputDeviceJack::ParameterName::Description() {
# Line 156  namespace LinuxSampler { Line 157  namespace LinuxSampler {
157          return (existingJackDevices) ? "LinuxSampler" + ToString(existingJackDevices) : "LinuxSampler";          return (existingJackDevices) ? "LinuxSampler" + ToString(existingJackDevices) : "LinuxSampler";
158      }      }
159    
160      void AudioOutputDeviceJack::ParameterName::OnSetValue(String s) throw (LinuxSamplerException) {      void AudioOutputDeviceJack::ParameterName::OnSetValue(String s) throw (Exception) {
161          // not possible, as parameter is fix          // not possible, as parameter is fix
162      }      }
163    
# Line 178  namespace LinuxSampler { Line 179  namespace LinuxSampler {
179       */       */
180      AudioOutputDeviceJack::AudioOutputDeviceJack(std::map<String,DeviceCreationParameter*> Parameters) : AudioOutputDevice(Parameters) {      AudioOutputDeviceJack::AudioOutputDeviceJack(std::map<String,DeviceCreationParameter*> Parameters) : AudioOutputDevice(Parameters) {
181          if (((DeviceCreationParameterString*)Parameters["NAME"])->ValueAsString().size() >= jack_client_name_size())          if (((DeviceCreationParameterString*)Parameters["NAME"])->ValueAsString().size() >= jack_client_name_size())
182              throw LinuxSamplerException("JACK client name too long");              throw Exception("JACK client name too long");
183    
184          if ((hJackClient = jack_client_new(((DeviceCreationParameterString*)Parameters["NAME"])->ValueAsString().c_str())) == 0)          if ((hJackClient = jack_client_new(((DeviceCreationParameterString*)Parameters["NAME"])->ValueAsString().c_str())) == 0)
185              throw AudioOutputException("Seems Jack server not running.");              throw AudioOutputException("Seems Jack server not running.");
# Line 225  namespace LinuxSampler { Line 226  namespace LinuxSampler {
226      }      }
227    
228      bool AudioOutputDeviceJack::IsPlaying() {      bool AudioOutputDeviceJack::IsPlaying() {
229          csIsPlaying.GetUnsafe();          return csIsPlaying.GetUnsafe();
230      }      }
231    
232      void AudioOutputDeviceJack::Stop() {      void AudioOutputDeviceJack::Stop() {
# Line 257  namespace LinuxSampler { Line 258  namespace LinuxSampler {
258      }      }
259    
260      String AudioOutputDeviceJack::Version() {      String AudioOutputDeviceJack::Version() {
261         String s = "$Revision: 1.18 $";         String s = "$Revision: 1.21 $";
262         return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword         return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword
263      }      }
264    

Legend:
Removed from v.483  
changed lines
  Added in v.1248

  ViewVC Help
Powered by ViewVC