Fix #483: workaround MPV failing to begin playback of track with new sample rate on Windows

This commit is contained in:
Drew Weymouth
2024-12-21 12:40:56 -08:00
parent 7c774c65ed
commit e8737f47b3
3 changed files with 49 additions and 3 deletions
+5
View File
@@ -311,6 +311,11 @@ func (p *Player) Continue() error {
return nil
}
func (p *Player) ForceRestartPlayback() error {
p.mpv.SetProperty("pause", mpv.FORMAT_FLAG, true)
return p.mpv.SetProperty("pause", mpv.FORMAT_FLAG, false)
}
// Get the current status of the player.
func (p *Player) GetStatus() player.Status {
if !p.initialized {