albertz / music-player-core

Music player core Python module
BSD 2-Clause "Simplified" License
74 stars 22 forks source link

Issue with playback in some cases #7

Closed hemendra-srivastava closed 5 years ago

hemendra-srivastava commented 9 years ago

Hi, I am using musicplayer with gevent to develop a jukebox player.. I have run into an issue that I am unable to debug.

Sometimes when i pause the player, and then restart playing, the audio output begins to break and sometimes the speed of audio playback also increases. Further, after this, the player stops responding to actions.. (pause play volume)

Have you ever experienced such issues ? Do you have any idea how i could go about debugging this ? I'd greatly appreciate any help that i could get, as i find this player extremely useful for my purpose.

albertz commented 9 years ago

Hi! That sounds like an interesting project. And maybe even similar to my main goal when I developed this module. Is your project Open Source? Have you checked out my musicplayer project (not just this core module)?

Anyway, unfortunately, I haven't experienced something like that yet. What platform is that? (I'm mostly on OSX atm, but last time I checked, Linux worked also fine.)

Have you also tried the latest version from Git?

The non-responding-to-actions sounds like a locking problem. I had some of those earlier. In my musicplayer app, I have implemented a lock-detector which detects most of these problems and in those cases, dumps the stacks (native + Python). Of course you can also just attach with GDB/LLDB to your process when it hangs / does-not-respond-to-actions and look at all stacks of all threads. Can you post these stacks here?

About the increasing playback speed, that sounds strange. Maybe it's some problem with the fading-in/out code, but I'm not sure. Maybe it's also something in PortAudio itself or so. Or maybe the resampling code via FFmpeg somehow is buggy. You could try to select a different sample rate (player.outSamplerate = 96000 or so), and see if you get consistent different speed-change bugs.

hemendra-srivastava commented 9 years ago

Hi,

Thanks for your reply, first to answer your questions.. No, my product is part of a larger project for my company, and as such it is not open source. My company is based out of India and we are making a product for our local market. Though any changes that I make to your code, I will gladly contribute back..

Yes, I have seen your musicplayer project, my interest is in using musicplayer primarily as a audio playing library, I am testing it as a backend amongst other such options. The BSD license makes this a preferable option.

Your musicplayer project looks awesome, and does contain some features that I am interested in,

Music player core, is lightweight and easier to understand in a short time frame.. As such I will definitely be checking out musicplayer on my own. Frankly, this code is very good, and very useful as a starting point for addition..

As far as the problem goes, I am trying to reproduce it in simpler code, and so far have been unsuccessful, therefore it could be a more complex scenario emerging out of the rest of the code of the product, that is causing this. I will try to figure out the exact cause of the problem and get back to you. The issue though still persists in my larger codebase.

albertz commented 5 years ago

Hey, not sure if there is still a problem, or if this has become obsolete now. Closing for now. Please reopen or comment, if you still have some problem.