564 |
*/ |
*/ |
565 |
String LSCPServer::AddChannel() { |
String LSCPServer::AddChannel() { |
566 |
dmsg(2,("LSCPServer: AddChannel()\n")); |
dmsg(2,("LSCPServer: AddChannel()\n")); |
567 |
|
LockRTNotify(); |
568 |
SamplerChannel* pSamplerChannel = pSampler->AddSamplerChannel(); |
SamplerChannel* pSamplerChannel = pSampler->AddSamplerChannel(); |
569 |
|
UnlockRTNotify(); |
570 |
LSCPResultSet result(pSamplerChannel->Index()); |
LSCPResultSet result(pSamplerChannel->Index()); |
571 |
return result.Produce(); |
return result.Produce(); |
572 |
} |
} |
608 |
String LSCPServer::GetEngineInfo(String EngineName) { |
String LSCPServer::GetEngineInfo(String EngineName) { |
609 |
dmsg(2,("LSCPServer: GetEngineInfo(EngineName=%s)\n", EngineName.c_str())); |
dmsg(2,("LSCPServer: GetEngineInfo(EngineName=%s)\n", EngineName.c_str())); |
610 |
LSCPResultSet result; |
LSCPResultSet result; |
611 |
|
LockRTNotify(); |
612 |
try { |
try { |
613 |
Engine* pEngine = EngineFactory::Create(EngineName); |
Engine* pEngine = EngineFactory::Create(EngineName); |
614 |
result.Add("DESCRIPTION", pEngine->Description()); |
result.Add("DESCRIPTION", pEngine->Description()); |
618 |
catch (LinuxSamplerException e) { |
catch (LinuxSamplerException e) { |
619 |
result.Error(e); |
result.Error(e); |
620 |
} |
} |
621 |
|
UnlockRTNotify(); |
622 |
return result.Produce(); |
return result.Produce(); |
623 |
} |
} |
624 |
|
|
1249 |
String LSCPServer::SetAudioOutputDevice(uint AudioDeviceId, uint uiSamplerChannel) { |
String LSCPServer::SetAudioOutputDevice(uint AudioDeviceId, uint uiSamplerChannel) { |
1250 |
dmsg(2,("LSCPServer: SetAudiotOutputDevice(AudioDeviceId=%d, SamplerChannel=%d)\n",AudioDeviceId,uiSamplerChannel)); |
dmsg(2,("LSCPServer: SetAudiotOutputDevice(AudioDeviceId=%d, SamplerChannel=%d)\n",AudioDeviceId,uiSamplerChannel)); |
1251 |
LSCPResultSet result; |
LSCPResultSet result; |
1252 |
|
LockRTNotify(); |
1253 |
try { |
try { |
1254 |
SamplerChannel* pSamplerChannel = pSampler->GetSamplerChannel(uiSamplerChannel); |
SamplerChannel* pSamplerChannel = pSampler->GetSamplerChannel(uiSamplerChannel); |
1255 |
if (!pSamplerChannel) throw LinuxSamplerException("Invalid sampler channel number " + ToString(uiSamplerChannel)); |
if (!pSamplerChannel) throw LinuxSamplerException("Invalid sampler channel number " + ToString(uiSamplerChannel)); |
1261 |
catch (LinuxSamplerException e) { |
catch (LinuxSamplerException e) { |
1262 |
result.Error(e); |
result.Error(e); |
1263 |
} |
} |
1264 |
|
UnlockRTNotify(); |
1265 |
return result.Produce(); |
return result.Produce(); |
1266 |
} |
} |
1267 |
|
|
1268 |
String LSCPServer::SetAudioOutputType(String AudioOutputDriver, uint uiSamplerChannel) { |
String LSCPServer::SetAudioOutputType(String AudioOutputDriver, uint uiSamplerChannel) { |
1269 |
dmsg(2,("LSCPServer: SetAudioOutputType(String AudioOutputDriver=%s, SamplerChannel=%d)\n",AudioOutputDriver.c_str(),uiSamplerChannel)); |
dmsg(2,("LSCPServer: SetAudioOutputType(String AudioOutputDriver=%s, SamplerChannel=%d)\n",AudioOutputDriver.c_str(),uiSamplerChannel)); |
1270 |
LSCPResultSet result; |
LSCPResultSet result; |
1271 |
|
LockRTNotify(); |
1272 |
try { |
try { |
1273 |
SamplerChannel* pSamplerChannel = pSampler->GetSamplerChannel(uiSamplerChannel); |
SamplerChannel* pSamplerChannel = pSampler->GetSamplerChannel(uiSamplerChannel); |
1274 |
if (!pSamplerChannel) throw LinuxSamplerException("Invalid sampler channel number " + ToString(uiSamplerChannel)); |
if (!pSamplerChannel) throw LinuxSamplerException("Invalid sampler channel number " + ToString(uiSamplerChannel)); |
1300 |
catch (LinuxSamplerException e) { |
catch (LinuxSamplerException e) { |
1301 |
result.Error(e); |
result.Error(e); |
1302 |
} |
} |
1303 |
|
UnlockRTNotify(); |
1304 |
return result.Produce(); |
return result.Produce(); |
1305 |
} |
} |
1306 |
|
|