Mercurial > hg > svcore
comparison base/PlayParameters.cpp @ 874:862fe7b20df7 tony_integration
Merge from tonioni branch
author | Chris Cannam |
---|---|
date | Tue, 28 Jan 2014 15:01:54 +0000 |
parents | 3a3541b357fe |
children |
comparison
equal
deleted
inserted
replaced
862:786ee8d1f30e | 874:862fe7b20df7 |
---|---|
41 m_playGain = pp->getPlayGain(); | 41 m_playGain = pp->getPlayGain(); |
42 emit playGainChanged(m_playGain); | 42 emit playGainChanged(m_playGain); |
43 changed = true; | 43 changed = true; |
44 } | 44 } |
45 | 45 |
46 if (m_playPluginId != pp->getPlayPluginId()) { | 46 if (m_playClipId != pp->getPlayClipId()) { |
47 m_playPluginId = pp->getPlayPluginId(); | 47 m_playClipId = pp->getPlayClipId(); |
48 emit playPluginIdChanged(m_playPluginId); | 48 emit playClipIdChanged(m_playClipId); |
49 changed = true; | |
50 } | |
51 | |
52 if (m_playPluginConfiguration != pp->getPlayPluginConfiguration()) { | |
53 m_playPluginConfiguration = pp->getPlayPluginConfiguration(); | |
54 emit playPluginConfigurationChanged(m_playPluginConfiguration); | |
55 changed = true; | 49 changed = true; |
56 } | 50 } |
57 | 51 |
58 if (changed) emit playParametersChanged(); | 52 if (changed) emit playParametersChanged(); |
59 } | 53 } |
62 PlayParameters::toXml(QTextStream &stream, | 56 PlayParameters::toXml(QTextStream &stream, |
63 QString indent, | 57 QString indent, |
64 QString extraAttributes) const | 58 QString extraAttributes) const |
65 { | 59 { |
66 stream << indent; | 60 stream << indent; |
67 stream << QString("<playparameters mute=\"%1\" pan=\"%2\" gain=\"%3\" pluginId=\"%4\" %6") | 61 stream << QString("<playparameters mute=\"%1\" pan=\"%2\" gain=\"%3\" clipId=\"%4\" %6") |
68 .arg(m_playMuted ? "true" : "false") | 62 .arg(m_playMuted ? "true" : "false") |
69 .arg(m_playPan) | 63 .arg(m_playPan) |
70 .arg(m_playGain) | 64 .arg(m_playGain) |
71 .arg(m_playPluginId) | 65 .arg(m_playClipId) |
72 .arg(extraAttributes); | 66 .arg(extraAttributes); |
73 if (m_playPluginConfiguration != "") { | 67 |
74 stream << ">\n " << indent << m_playPluginConfiguration | 68 stream << ">\n"; |
75 << "\n" << indent << "</playparameters>\n"; | 69 |
76 } else { | 70 if (m_playClipId != "") { |
77 stream << "/>\n"; | 71 // for backward compatibility |
72 stream << indent << " "; | |
73 stream << QString("<plugin identifier=\"%1\" program=\"%2\"/>\n") | |
74 .arg("sample_player") | |
75 .arg(m_playClipId); | |
78 } | 76 } |
77 | |
78 stream << indent << "</playparameters>\n"; | |
79 } | 79 } |
80 | 80 |
81 void | 81 void |
82 PlayParameters::setPlayMuted(bool muted) | 82 PlayParameters::setPlayMuted(bool muted) |
83 { | 83 { |
116 emit playParametersChanged(); | 116 emit playParametersChanged(); |
117 } | 117 } |
118 } | 118 } |
119 | 119 |
120 void | 120 void |
121 PlayParameters::setPlayPluginId(QString id) | 121 PlayParameters::setPlayClipId(QString id) |
122 { | 122 { |
123 if (m_playPluginId != id) { | 123 if (m_playClipId != id) { |
124 m_playPluginId = id; | 124 m_playClipId = id; |
125 emit playPluginIdChanged(id); | 125 emit playClipIdChanged(id); |
126 emit playParametersChanged(); | 126 emit playParametersChanged(); |
127 } | 127 } |
128 } | 128 } |
129 | |
130 void | |
131 PlayParameters::setPlayPluginConfiguration(QString configuration) | |
132 { | |
133 if (m_playPluginConfiguration != configuration) { | |
134 m_playPluginConfiguration = configuration; | |
135 // cerr << "PlayParameters(" << this << "): setPlayPluginConfiguration to \"" << configuration << "\"" << endl; | |
136 emit playPluginConfigurationChanged(configuration); | |
137 emit playParametersChanged(); | |
138 } | |
139 } | |
140 | |
141 |