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

Diff of /linuxsampler/trunk/src/audiodriver/AudioOutputDeviceJack.cpp

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

revision 173 by capela, Wed Jun 23 18:54:08 2004 UTC revision 174 by senkov, Tue Jul 6 03:27:38 2004 UTC
# Line 27  Line 27 
27    
28  namespace LinuxSampler {  namespace LinuxSampler {
29    
30      REGISTER_AUDIO_OUTPUT_DRIVER("Jack",AudioOutputDeviceJack);      REGISTER_AUDIO_OUTPUT_DRIVER(AudioOutputDeviceJack);
31    
32        /* Common parameters for now they'll have to be registered here. */
33        REGISTER_AUDIO_OUTPUT_DRIVER_PARAMETER(AudioOutputDeviceJack, ParameterActive);
34        REGISTER_AUDIO_OUTPUT_DRIVER_PARAMETER(AudioOutputDeviceJack, ParameterSampleRate);
35        REGISTER_AUDIO_OUTPUT_DRIVER_PARAMETER(AudioOutputDeviceJack, ParameterChannels);
36    
37      /**      /**
38       * Open and initialize connection to the JACK system.       * Open and initialize connection to the JACK system.
# Line 36  namespace LinuxSampler { Line 41  namespace LinuxSampler {
41       * @throws AudioOutputException  on error       * @throws AudioOutputException  on error
42       * @see AcquireChannels()       * @see AcquireChannels()
43       */       */
44      AudioOutputDeviceJack::AudioOutputDeviceJack(std::map<String,String> Parameters) : AudioOutputDevice(std::map<String,DeviceCreationParameter*>()) {      AudioOutputDeviceJack::AudioOutputDeviceJack(std::map<String,DeviceCreationParameter*> Parameters) : AudioOutputDevice(std::map<String,DeviceCreationParameter*>()) {
45          if ((hJackClient = jack_client_new("LinuxSampler")) == 0)          if ((hJackClient = jack_client_new("LinuxSampler")) == 0)
46              throw AudioOutputException("Seems Jack server not running.");              throw AudioOutputException("Seems Jack server not running.");
47    
# Line 131  namespace LinuxSampler { Line 136  namespace LinuxSampler {
136          return jack_get_sample_rate(hJackClient);          return jack_get_sample_rate(hJackClient);
137      }      }
138    
139        String AudioOutputDeviceJack::Name() {
140            return "Jack";
141        }
142    
143      String AudioOutputDeviceJack::Driver() {      String AudioOutputDeviceJack::Driver() {
144          return "Jack";          return Name();
145      }      }
146    
147      String AudioOutputDeviceJack::Description() {      String AudioOutputDeviceJack::Description() {
# Line 140  namespace LinuxSampler { Line 149  namespace LinuxSampler {
149      }      }
150    
151      String AudioOutputDeviceJack::Version() {      String AudioOutputDeviceJack::Version() {
152         String s = "$Revision: 1.7 $";         String s = "$Revision: 1.8 $";
153         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
154      }      }
155    
     std::map<String,DeviceCreationParameter*> AudioOutputDeviceJack::AvailableParameters() {  
         // FIXME: not a good solution to get the commot parameters (ACTIVE,SAMPERATE,CHANNELS which have to be offered by all audio output drivers)  
         std::map<String,DeviceCreationParameter*> available_parameters = AudioOutputDevice::AvailableParameters();  
         return available_parameters; // this driver currently does not have additional, individual device parameters  
     }  
   
   
156      // libjack callback functions      // libjack callback functions
157    
158      int __libjack_process_callback(jack_nframes_t nframes, void* arg) {      int __libjack_process_callback(jack_nframes_t nframes, void* arg) {

Legend:
Removed from v.173  
changed lines
  Added in v.174

  ViewVC Help
Powered by ViewVC