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 * |
129 |
InitWithDefault(); // use default name |
InitWithDefault(); // use default name |
130 |
} |
} |
131 |
|
|
132 |
AudioOutputDeviceJack::ParameterName::ParameterName(String s) throw (LinuxSamplerException) : DeviceCreationParameterString(s) { |
AudioOutputDeviceJack::ParameterName::ParameterName(String s) throw (Exception) : DeviceCreationParameterString(s) { |
133 |
} |
} |
134 |
|
|
135 |
String AudioOutputDeviceJack::ParameterName::Description() { |
String AudioOutputDeviceJack::ParameterName::Description() { |
156 |
return (existingJackDevices) ? "LinuxSampler" + ToString(existingJackDevices) : "LinuxSampler"; |
return (existingJackDevices) ? "LinuxSampler" + ToString(existingJackDevices) : "LinuxSampler"; |
157 |
} |
} |
158 |
|
|
159 |
void AudioOutputDeviceJack::ParameterName::OnSetValue(String s) throw (LinuxSamplerException) { |
void AudioOutputDeviceJack::ParameterName::OnSetValue(String s) throw (Exception) { |
160 |
// not possible, as parameter is fix |
// not possible, as parameter is fix |
161 |
} |
} |
162 |
|
|
178 |
*/ |
*/ |
179 |
AudioOutputDeviceJack::AudioOutputDeviceJack(std::map<String,DeviceCreationParameter*> Parameters) : AudioOutputDevice(Parameters) { |
AudioOutputDeviceJack::AudioOutputDeviceJack(std::map<String,DeviceCreationParameter*> Parameters) : AudioOutputDevice(Parameters) { |
180 |
if (((DeviceCreationParameterString*)Parameters["NAME"])->ValueAsString().size() >= jack_client_name_size()) |
if (((DeviceCreationParameterString*)Parameters["NAME"])->ValueAsString().size() >= jack_client_name_size()) |
181 |
throw LinuxSamplerException("JACK client name too long"); |
throw Exception("JACK client name too long"); |
182 |
|
|
183 |
if ((hJackClient = jack_client_new(((DeviceCreationParameterString*)Parameters["NAME"])->ValueAsString().c_str())) == 0) |
if ((hJackClient = jack_client_new(((DeviceCreationParameterString*)Parameters["NAME"])->ValueAsString().c_str())) == 0) |
184 |
throw AudioOutputException("Seems Jack server not running."); |
throw AudioOutputException("Seems Jack server not running."); |
257 |
} |
} |
258 |
|
|
259 |
String AudioOutputDeviceJack::Version() { |
String AudioOutputDeviceJack::Version() { |
260 |
String s = "$Revision: 1.19 $"; |
String s = "$Revision: 1.20 $"; |
261 |
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 |
262 |
} |
} |
263 |
|
|