|
a/upmpd/renderctl.cxx |
|
b/upmpd/renderctl.cxx |
|
... |
|
... |
84 |
const MpdStatus &mpds = m_dev->getMpdStatus();
|
84 |
const MpdStatus &mpds = m_dev->getMpdStatus();
|
85 |
|
85 |
|
86 |
int volume = m_desiredvolume >= 0 ? m_desiredvolume : mpds.volume;
|
86 |
int volume = m_desiredvolume >= 0 ? m_desiredvolume : mpds.volume;
|
87 |
if (volume < 0)
|
87 |
if (volume < 0)
|
88 |
volume = 0;
|
88 |
volume = 0;
|
89 |
char cvalue[30];
|
|
|
90 |
sprintf(cvalue, "%d", volume);
|
|
|
91 |
status["Volume"] = cvalue;
|
89 |
status["Volume"] = SoapArgs::i2s(volume);
|
92 |
//sprintf(cvalue, "%d", percentodbvalue(volume));
|
90 |
//status["VolumeDB"] = SoapArgs::i2s(percentodbvalue(volume));
|
93 |
//status["VolumeDB"] = cvalue;
|
|
|
94 |
status["Mute"] = volume == 0 ? "1" : "0";
|
91 |
status["Mute"] = volume == 0 ? "1" : "0";
|
95 |
return true;
|
92 |
return true;
|
96 |
}
|
93 |
}
|
97 |
|
94 |
|
98 |
bool UpMpdRenderCtl::getEventData(bool all, std::vector<std::string>& names,
|
95 |
bool UpMpdRenderCtl::getEventData(bool all, std::vector<std::string>& names,
|
|
... |
|
... |
287 |
|
284 |
|
288 |
int volume = getvolume_i();
|
285 |
int volume = getvolume_i();
|
289 |
if (isDb) {
|
286 |
if (isDb) {
|
290 |
volume = percentodbvalue(volume);
|
287 |
volume = percentodbvalue(volume);
|
291 |
}
|
288 |
}
|
292 |
char svolume[30];
|
|
|
293 |
sprintf(svolume, "%d", volume);
|
|
|
294 |
data.addarg("CurrentVolume", svolume);
|
289 |
data.addarg("CurrentVolume", SoapArgs::i2s(volume));
|
295 |
return UPNP_E_SUCCESS;
|
290 |
return UPNP_E_SUCCESS;
|
296 |
}
|
291 |
}
|
297 |
|
292 |
|
298 |
int UpMpdRenderCtl::listPresets(const SoapArgs& sc, SoapData& data)
|
293 |
int UpMpdRenderCtl::listPresets(const SoapArgs& sc, SoapData& data)
|
299 |
{
|
294 |
{
|