Should this

# only support track gain for remote streams
if ($track->remote) {
return preventClipping( $track->replay_gain() ||
$prefs->client($client)->get('remoteReplayGain'), $track->replay_peak()
);
}

be

if ($track->remote && client($client)->get('remoteReplayGain'))

To avoid the preventClipping() call when the pref is set to zero?

If you look at preventClipping() you'll see that it'll do no more than check that value (if it was zero). We _could_ of course do this. But we could at the same time check for replay_peak as well. And we should then do it for all the other calls to preventClipping() as well. But this doesn't make sense: as the call is so cheap we can keep all those checks in one place - which is preventClipping(). Saves us a lot of code duplication.

--

Michael
_______________________________________________
Touch mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/touch

Reply via email to