Skip to content

Commit 168af58

Browse files
committed
Update StreamingController.pm
Slight change to PR#1383. Delay caching the replay gain value until after the play() command has been issued in order to close a small timing window where the new value could potentially be retrieved before the previous song has finished. Signed-off-by: SamY <syahres@gmail.com>
1 parent c9adb8c commit 168af58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Slim/Player/StreamingController.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,8 +1301,6 @@ sub _Stream { # play -> Buffering, Streaming
13011301
if ($song->currentTrackHandler()->can('onStream')) {
13021302
$song->currentTrackHandler()->onStream($player, $song);
13031303
}
1304-
1305-
$player->replayGain($replayGain); # store this for status queries
13061304

13071305
my %params = (
13081306
'paused' => $paused,
@@ -1318,6 +1316,8 @@ sub _Stream { # play -> Buffering, Streaming
13181316

13191317
$startedPlayers += $player->play( \%params );
13201318

1319+
$player->replayGain($replayGain); # store this for status queries
1320+
13211321
$reportsTrackStart ||= $player->reportsTrackStart();
13221322
}
13231323

0 commit comments

Comments
 (0)