HaikuArchives / StreamRadio

Haiku-native application to search for and listen to internet radio stations.
8 stars 11 forks source link

Only run one stream at a time #15

Closed Begasus closed 4 years ago

Begasus commented 4 years ago

Even if it's able to run multiple streams, it doesn't make sense to launch 2 (or more) streams simultaneous ...

jsteinaker commented 4 years ago

I was thinking the same. It's an easy fix, but before getting into it, can someone imagine an use case for playing multiple streams at the same time in StreamRadio? I don't want to remove what might be a feature for someone.

To me, it's useless, but...

humdingerb commented 4 years ago

Not that I personally do this, but you said if someone can imagine a use case... :) One could listen to a spoken word channel's audio book reading and have a movie soundtrack channel as a background with a low volume. (BTW, "Cinemix" is a nice channel)

jsteinaker commented 4 years ago

That's what I was talking about. Definitely a valid use case, specially considering StreamRadio has separate volume controls for each station and respects them. Considering that's way easier to write the program just for one stream at a time, I guess the original author had his reasons for this.

Perhaps I could add a setting to change the behaviour of the program and support both ways. I personally find counter-intuitive that when you're playing a stream and double click on a different one the first one doesn't stop, maybe because that's the way almost every audio playing software has worked since the beginning of times.

I'll take a look at Cinemix :)

humdingerb commented 4 years ago

Yes, I suppose a tickable menu item "Allow parallel playback" would be OK.

jsteinaker commented 4 years ago

I'm giving it a try at jsteinaker/Haiku-Radio@b838739acffccbe1346524d7caaa3e1d3abda8fa

Apparently it's working. The setting is stored in the config file.

I still don't know how to make the menu "tickable". I'll try to find it in the docs tomorrow, but if you point me in the right direction would be great. For the moment, the menu just says "Toggle Allow Parallel Playback", which is confusing.

humdingerb commented 4 years ago

See the Haiku Book or BeBook on SetMarked()

jsteinaker commented 4 years ago

Thanks for the pointer. I've updated the code, it's on the pull request waiting for aproval. Can someone give it a try?

Vidrep commented 4 years ago

Seems to work. Can this ticket be closed now?

humdingerb commented 4 years ago

We sure can!

@jsteinaker: when you've fixed an existing issue, you can add a "Fixes #15" to have github automatically close that issue when the PR is merged.