|
a/upmpd/rendering.cxx |
|
b/upmpd/rendering.cxx |
|
... |
|
... |
79 |
// </InstanceID>
|
79 |
// </InstanceID>
|
80 |
// </Event>
|
80 |
// </Event>
|
81 |
|
81 |
|
82 |
bool UpMpdRenderCtl::rdstateMToU(unordered_map<string, string>& status)
|
82 |
bool UpMpdRenderCtl::rdstateMToU(unordered_map<string, string>& status)
|
83 |
{
|
83 |
{
|
84 |
const MpdStatus &mpds = m_dev->m_mpdcli->getStatus();
|
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];
|
89 |
char cvalue[30];
|
90 |
sprintf(cvalue, "%d", volume);
|
90 |
sprintf(cvalue, "%d", volume);
|
91 |
status["Volume"] = cvalue;
|
91 |
status["Volume"] = cvalue;
|
92 |
// sprintf(cvalue, "%d", percentodbvalue(volume));
|
92 |
//sprintf(cvalue, "%d", percentodbvalue(volume));
|
93 |
// status["VolumeDB"] = cvalue;
|
93 |
//status["VolumeDB"] = cvalue;
|
94 |
status["Mute"] = volume == 0 ? "1" : "0";
|
94 |
status["Mute"] = volume == 0 ? "1" : "0";
|
95 |
return true;
|
95 |
return true;
|
96 |
}
|
96 |
}
|
97 |
|
97 |
|
98 |
bool UpMpdRenderCtl::getEventData(bool all, std::vector<std::string>& names,
|
98 |
bool UpMpdRenderCtl::getEventData(bool all, std::vector<std::string>& names,
|