player: drain sinks completely before changing sink rate
commita2386146b7132533f3b8e2041e85eceff4aeab84
authorEric Wong <e@80x24.org>
Sun, 14 Aug 2022 21:24:54 +0000 (14 21:24 +0000)
committerEric Wong <e@80x24.org>
Sun, 14 Aug 2022 22:58:43 +0000 (14 22:58 +0000)
treee86001843466c7911d9b75ad4ec5f58b20bbe257
parent2cfb6b0a1a92bbfd1811a15893ac9563f027c0c4
player: drain sinks completely before changing sink rate

For users of the CPU-saving bypass mode (e.g. "format rate=bypass"),
this fixes a bug when enqueueing a 44.1kHz immediately after a
48kHz file (or vice-versa).

Note: gapless playback with different rates/channels between
tracks has never been supported with bypass mode enabled.
Bypass only allows opportunistic gapless when sequential tracks
have the same format.
lib/dtas/player.rb