-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple files playing issue #54
Multiple files playing issue #54
Comments
Yes that's a problem a never managed to solve until now, playing multiple songs in row. It's a bug :( |
I am actually using an external Thread to call '.stop()' in XR3Player. |
If it's playing on a thread, did you try to .join() the threads so that they are all combined so when new files are added to the thread, so that they can all be stopped at the same time If the SteamplayerLister can trigger the files to open and play within the Status stopped then it will work, but the problem is that it's not possible to play files from within that |
The problem is we need a mechanism to know when the previous song ended which i have not implemented . |
I've now run into this issue in my own program. Will have to look into it cause it's a blocker for my use case :P |
Mmm i have solved that in the past in XR3Player.
I was using JavaFX and for each player i had a Thread Service. Everytime i
want to stop a song i was calling stop from a Thread different than the
main thread so it doesn't freezes.
O gosh i have solved all that in XR3Player i hope there is not bugs in new
Stream-Player library version.
…On Wed, 15 Apr 2020, 04:41 Andrew O., ***@***.***> wrote:
I've now run into this issue in my own program. Will have to look into it
cause it's a blocker for my use case :P
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#54 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE3OFQCLMD5GSKXXFB5PJDLRMUGDZANCNFSM4J2G322Q>
.
|
Thanks for the reply @goxr3plus :) In my case, I only have one player (StreamPlayer) instance. It's being instantiated with a SingleThreadExecutor (such as here). I don't know if this is relevant to your solution however, just wanted to give more details. To give more context of my application, the UI presents the user with a list of audio files. When an audio file is hovered on (by pressing up/down on the arrow keys), the song is played. When the user presses the up or down arrow key several times in a row, the UI freezes up and each song traversed is played a bit before changing to the next. You mentioned that you were calling stop from a different thread than the main thread so that it doesn't freeze. I tried calling stop (and open + play) from a
I'm not sure if you have any ideas on what could be going on in these two cases, but figured I'd mention it :) Also I just checked out https://github.com/goxr3plus/XR3Player, it looks amazing :D I'll try to inspect how it works and compare it to my (much simpler) application :) |
Hm thank you very much for mentioning those problems, i think you will need to go into deeper investigation of how this library works then. Do me one favor try the previous version, the 9.0.4 which had my old architecture and tell me if you face the same problem there. I have never tested the 10 version for multithreading issues, on the other side 9.0.4 is battle tested on XR3Player. Hey on XR3Plager have a look at this class to see exactly how i do it : Go on the method playSong line 2120. I know you will have problem with the logger there but i just need to know if we introduced any bug with the version 10 |
@AObuchow Tell me how it is going for you :) I just had a look on XR3Player and had nostalgia , i might restart working it on Java 14 with the latest and greatest features and add some streaming services :) |
Thanks so much for giving me a reference point :) I’ll try it out when I have a moment, sorry for the delayed reply! I really appreciate the detailed response. It helps a lot :) |
Things are going well! I just took a break from the asynchronous audio player bug and worked on other features of my audio-file manager :) I’ve also been dealing with another side project which needs to be completed by May 1st so that’s taking priority. I promise I’ll get back to it though so I can follow up with you :) As for continuing the development of XR3Player - YES!! I think that’s a great idea, it’s a really cool application and some of the Java 14 features look really nice to use (I’ve been meaning to try them out myself!) Looking forward to it :) |
Fix/playback dead lock (goxr3plus#54)
If multiple audio files are opened and played, they play one after each other, but it freezes the program where actions like .stop(), etc can't be used, which is a problem as now all files that are queued can't be stopped. Is there a way to fix this?
The text was updated successfully, but these errors were encountered: