Ticket #788: pa_nonflat_vol_restore.patch
| File pa_nonflat_vol_restore.patch, 1.5 KB (added by samr7, 2 years ago) |
|---|
-
src/pulsecore/sink-input.c
old new 1222 1222 if (pa_sink_input_get_state(i) == PA_SINK_INPUT_CORKED) 1223 1223 pa_assert_se(i->sink->n_corked-- >= 1); 1224 1224 1225 if (i->sink->flags & PA_SINK_FLAT_VOLUME) 1225 if (i->sink->flags & PA_SINK_FLAT_VOLUME) { 1226 1226 /* We might need to update the sink's volume if we are in flat 1227 1227 * volume mode. */ 1228 1228 pa_sink_set_volume(i->sink, NULL, FALSE, FALSE); 1229 } else { 1230 /* Copy the current volume to the reference ratio, which 1231 might be used if the move target is FLAT_VOLUME */ 1232 i->reference_ratio = i->volume; 1233 } 1229 1234 1230 1235 pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i->sink), PA_SINK_MESSAGE_START_MOVE, i, 0, NULL) == 0); 1231 1236 … … 1321 1326 1322 1327 /* We might need to update the sink's volume if we are in flat volume mode. */ 1323 1328 pa_sink_set_volume(i->sink, NULL, FALSE, i->save_volume); 1329 } else { 1330 set_real_ratio(i, &i->volume); 1331 1332 /* Copy the new soft_volume to the thread_info struct */ 1333 pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_SET_SOFT_VOLUME, NULL, 0, NULL) == 0); 1324 1334 } 1325 1335 1326 1336 pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i->sink), PA_SINK_MESSAGE_FINISH_MOVE, i, 0, NULL) == 0);
