Changeset View
Changeset View
Standalone View
Standalone View
src/volumeobject.h
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 40 | public: | |||
---|---|---|---|---|---|
44 | template <typename PAInfo> | 44 | template <typename PAInfo> | ||
45 | void updateVolumeObject(PAInfo *info) | 45 | void updateVolumeObject(PAInfo *info) | ||
46 | { | 46 | { | ||
47 | updatePulseObject(info); | 47 | updatePulseObject(info); | ||
48 | if (m_muted != info->mute) { | 48 | if (m_muted != info->mute) { | ||
49 | m_muted = info->mute; | 49 | m_muted = info->mute; | ||
50 | emit mutedChanged(); | 50 | emit mutedChanged(); | ||
51 | } | 51 | } | ||
52 | if (pa_cvolume_equal(&m_volume, &info->volume) != 0) { | 52 | if (!pa_cvolume_equal(&m_volume, &info->volume)) { | ||
53 | m_volume = info->volume; | 53 | m_volume = info->volume; | ||
54 | emit volumeChanged(); | 54 | emit volumeChanged(); | ||
55 | emit channelVolumesChanged(); | 55 | emit channelVolumesChanged(); | ||
56 | } | 56 | } | ||
57 | QStringList infoChannels; | 57 | QStringList infoChannels; | ||
58 | infoChannels.reserve(info->channel_map.channels); | 58 | infoChannels.reserve(info->channel_map.channels); | ||
59 | for (int i = 0; i < info->channel_map.channels; ++i) { | 59 | for (int i = 0; i < info->channel_map.channels; ++i) { | ||
60 | infoChannels << QString::fromUtf8(pa_channel_position_to_pretty_string(info->channel_map.map[i])); | 60 | infoChannels << QString::fromUtf8(pa_channel_position_to_pretty_string(info->channel_map.map[i])); | ||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |