Mercurial > hg > svcore
comparison base/PlayParameters.cpp @ 863:1f98e28f70c6 tonioni
Toward using a sample mixer (with arbitrary frequency target) instead of dssi player plugin
author | Chris Cannam |
---|---|
date | Tue, 07 Jan 2014 10:57:28 +0000 |
parents | e802e550a1f2 |
children | 9196cff56abe |
comparison
equal
deleted
inserted
replaced
859:13803edd513d | 863:1f98e28f70c6 |
---|---|
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_playSampleId != pp->getPlaySampleId()) { |
47 m_playPluginId = pp->getPlayPluginId(); | 47 m_playSampleId = pp->getPlaySampleId(); |
48 emit playPluginIdChanged(m_playPluginId); | 48 emit playSampleIdChanged(m_playSampleId); |
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\" sampleId=\"%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_playSampleId) |
72 .arg(extraAttributes); | 66 .arg(extraAttributes); |
73 if (m_playPluginConfiguration != "") { | 67 stream << "/>\n"; |
74 stream << ">\n " << indent << m_playPluginConfiguration | |
75 << "\n" << indent << "</playparameters>\n"; | |
76 } else { | |
77 stream << "/>\n"; | |
78 } | |
79 } | 68 } |
80 | 69 |
81 void | 70 void |
82 PlayParameters::setPlayMuted(bool muted) | 71 PlayParameters::setPlayMuted(bool muted) |
83 { | 72 { |
116 emit playParametersChanged(); | 105 emit playParametersChanged(); |
117 } | 106 } |
118 } | 107 } |
119 | 108 |
120 void | 109 void |
121 PlayParameters::setPlayPluginId(QString id) | 110 PlayParameters::setPlaySampleId(QString id) |
122 { | 111 { |
123 if (m_playPluginId != id) { | 112 if (m_playSampleId != id) { |
124 m_playPluginId = id; | 113 m_playSampleId = id; |
125 emit playPluginIdChanged(id); | 114 emit playSampleIdChanged(id); |
126 emit playParametersChanged(); | 115 emit playParametersChanged(); |
127 } | 116 } |
128 } | 117 } |
129 | 118 |
130 void | 119 void |
131 PlayParameters::setPlayPluginConfiguration(QString configuration) | 120 PlayParameters::setPlayPluginConfiguration(QString configuration) |
132 { | 121 { |
122 //!!! need to parse out sample id from e.g. configuration == | |
123 //!!! <plugin program="piano"/> | |
124 /* | |
133 if (m_playPluginConfiguration != configuration) { | 125 if (m_playPluginConfiguration != configuration) { |
134 m_playPluginConfiguration = configuration; | 126 m_playPluginConfiguration = configuration; |
135 // cerr << "PlayParameters(" << this << "): setPlayPluginConfiguration to \"" << configuration << "\"" << endl; | 127 // cerr << "PlayParameters(" << this << "): setPlayPluginConfiguration to \"" << configuration << "\"" << endl; |
136 emit playPluginConfigurationChanged(configuration); | 128 emit playPluginConfigurationChanged(configuration); |
137 emit playParametersChanged(); | 129 emit playParametersChanged(); |
138 } | 130 } |
131 */ | |
139 } | 132 } |
140 | 133 |
141 | 134 |