- if (!(o = pa_context_set_source_volume_by_index(c, index, &cstate->cvolume, set_source_volume_cb, NULL))) {
+ cvolume = m_sink_states.value(index);
+ cvolume->values[channel] = volume;
+ if (!(o = pa_context_set_source_volume_by_index(c, index, cvolume, set_source_volume_cb, NULL))) {