made dec talk work again, fixed so pitch and tempo can work with random chosen, example playb, train

This commit is contained in:
2024-08-05 21:37:42 +02:00
parent dc8b4badd0
commit e29eb32a91
3 changed files with 8 additions and 6 deletions
@@ -57,7 +57,7 @@ class FFmpegAudioPlayer():
self.Master.Logger.debug("~FFmpegAudioPlayer()")
self.Stop()
def PlayURI(self, uri, position, rubberband = None, *args):
def PlayURI(self, uri, position, rubberband = None, dec_params = None, *args):
if position:
PosStr = str(datetime.timedelta(seconds = position))
Command = ["/usr/bin/ffmpeg", "-ss", PosStr, "-i", uri, "-acodec", "pcm_s16le", "-ac", "1", "-ar", str(int(self.SampleRate)), "-f", "s16le", "-vn", *args]
@@ -65,6 +65,9 @@ class FFmpegAudioPlayer():
Command = ["/usr/bin/ffmpeg", "-i", uri, "-acodec", "pcm_s16le", "-ac", "1", "-ar", str(int(self.SampleRate)), "-f", "s16le", "-vn", *args]
self.Playing = True
if dec_params:
Command += dec_params
if rubberband:
Command += ["-filter:a"]
rubberCommand = ""