Closed dentex closed 7 years ago
My mistake...
player = audiotools.player.Player(output, 'RG_NO_REPLAYGAIN', auto_enqueue_test())
must be:
player = audiotools.player.Player(output, 'RG_NO_REPLAYGAIN', auto_enqueue_test)
(without the parenthesis).
Hello. I'm trying to use this library as a back-end for a media player based on a Raspberry Pi and some physical hardware. No problem so far playing a single file:
and then
player.stop()
orplayer.pause()
as needed.But what if I want to enqueue the subsequent audio files form the same directory?
I found that with
audiotools.open_directory(MY_DIR_PATH)
I can iterate over the audio files in that dir. So I used theauto_enqueue_test()
function to doplayer.open(filename)
on every item in the iterable. Every opening operation unfortunately stops the current playing mp3 and skips to the next...Is there any solution?
PS: also, the
next_track_callback
it seems to be called as soon as I instantiate the player, not when the playing track is completed. But probably I'm missing something, because when I instantiate the player there's no audio playing...Thanks for any help.