Open elroropiroro opened 1 year ago
Please use code formatting, see https://python-sounddevice.readthedocs.io/en/0.4.5/CONTRIBUTING.html#reporting-problems
Please use code formatting, see https://python-sounddevice.readthedocs.io/en/0.4.5/CONTRIBUTING.html#reporting-problems
My mistake, I already updated the topic, please review it.
Thanks for the update!
I guess you'll have to somehow stop the process
and then re-create it with the new URL. Otherwise, your changes to currently_playing
will have no effect.
using the example code "play a web stream", I am trying to press a button to change the URL to use, however, the current stream does not stop or does not change in this case.
I have tried using the API "stop", "abort", "CallbackStop" but it only stops the script which is the last thing I want.
So, what I am looking for is to play several web pages stream without stopping the script using buttons.
web stream list
here is where I create the list of stations to use and a loop to change them using pushbuttons:
NEXT = next station PREV = previous station COUNTRY = choose country to stream those stations
This is the example code adapted to what I am trying to do. I have been using the functions "stop" or "abort" to stop the stream and repeat the loop with the new URL. However, testing the functionality of the buttons, in this case the NEXT, the value of "currently_playing" does change, but when I get to the stop() function the whole script stops and I don't know how to make it just interrupt the stream and start again with the new URL as a normal radio.