Switch to unified view

a/upmpd/ohvolume.cxx b/upmpd/ohvolume.cxx
...
...
39
#include "ohvolume.hxx"
39
#include "ohvolume.hxx"
40
#include "mpdcli.hxx"
40
#include "mpdcli.hxx"
41
#include "upmpdutils.hxx"
41
#include "upmpdutils.hxx"
42
#include "renderctl.hxx"
42
#include "renderctl.hxx"
43
43
44
static const string millidbperstep("500");
45
44
static const string sTpProduct("urn:av-openhome-org:service:Volume:1");
46
static const string sTpProduct("urn:av-openhome-org:service:Volume:1");
45
static const string sIdProduct("urn:av-openhome-org:serviceId:Volume");
47
static const string sIdProduct("urn:av-openhome-org:serviceId:Volume");
46
48
47
OHVolume::OHVolume(UpMpd *dev, UpMpdRenderCtl *ctl)
49
OHVolume::OHVolume(UpMpd *dev, UpMpdRenderCtl *ctl)
48
    : UpnpService(sTpProduct, sIdProduct, dev), m_dev(dev), m_ctl(ctl)
50
    : UpnpService(sTpProduct, sIdProduct, dev), m_dev(dev), m_ctl(ctl)
...
...
71
73
72
    st["VolumeMax"] = "100";
74
    st["VolumeMax"] = "100";
73
    st["VolumeLimit"] = "100";
75
    st["VolumeLimit"] = "100";
74
    st["VolumeUnity"] = "100";
76
    st["VolumeUnity"] = "100";
75
    st["VolumeSteps"] = "100";
77
    st["VolumeSteps"] = "100";
76
    st["VolumeMilliDbPerSteps"] = "500";
78
    st["VolumeMilliDbPerSteps"] = millidbperstep;
77
    st["BalanceMax"] = "0";
79
    st["BalanceMax"] = "0";
78
    st["FadeMax"] = "0";
80
    st["FadeMax"] = "0";
79
    int volume = m_ctl->getvolume_i();
81
    int volume = m_ctl->getvolume_i();
80
    st["Volume"] = SoapArgs::i2s(volume);
82
    st["Volume"] = SoapArgs::i2s(volume);
81
    st["Mute"] = volume == 0 ? "1" : "0";
83
    st["Mute"] = volume == 0 ? "1" : "0";
...
...
108
{
110
{
109
    LOGDEB("OHVolume::charact." << endl);
111
    LOGDEB("OHVolume::charact." << endl);
110
    data.addarg("VolumeMax", "100");
112
    data.addarg("VolumeMax", "100");
111
    data.addarg("VolumeUnity", "100");
113
    data.addarg("VolumeUnity", "100");
112
    data.addarg("VolumeSteps", "100");
114
    data.addarg("VolumeSteps", "100");
113
    data.addarg("VolumeMilliDbPerStep", "500");
115
    data.addarg("VolumeMilliDbPerStep", millidbperstep);
114
    data.addarg("BalanceMax", "0");
116
    data.addarg("BalanceMax", "0");
115
    data.addarg("FadeMax", "0");
117
    data.addarg("FadeMax", "0");
116
    return UPNP_E_SUCCESS;
118
    return UPNP_E_SUCCESS;
117
}
119
}
118
120