Fix #483: workaround MPV failing to begin playback of track with new sample rate on Windows
This commit is contained in:
@@ -26,6 +26,8 @@ const (
|
||||
// arg3: bool (shuffle)
|
||||
cmdLoadItems
|
||||
cmdLoadRadioStation // arg: *mediaprovider.RadioStation, arg2: InsertQueueMode
|
||||
|
||||
cmdForceRestartPlayback
|
||||
)
|
||||
|
||||
type playbackCommand struct {
|
||||
@@ -144,6 +146,13 @@ func (c *playbackCommandQueue) LoadItems(items []mediaprovider.MediaItem, insert
|
||||
c.cmdAvailable.Signal()
|
||||
}
|
||||
|
||||
func (c *playbackCommandQueue) addCommand(command playbackCommand) {
|
||||
c.mutex.Lock()
|
||||
c.queue = append(c.queue, command)
|
||||
c.mutex.Unlock()
|
||||
c.cmdAvailable.Signal()
|
||||
}
|
||||
|
||||
func (c *playbackCommandQueue) filterCommandsAndAdd(excludeTypes []playbackCommandType, command playbackCommand) {
|
||||
c.mutex.Lock()
|
||||
j := 0
|
||||
|
||||
Reference in New Issue
Block a user