L-uu / MusicToSoundpad

Simple C application to seamlessly play Spotify songs in Soundpad.
1 stars 0 forks source link

Failed to add sound #4

Closed Cyconi closed 10 hours ago

Cyconi commented 2 months ago

image It always says failed to add sound even though it does add. It will pause and if i try to play again it will pause it and readd it to soundpad

L-uu commented 2 months ago

Are you using the steam, paid version of soundpad with the latest version of MusicToSoundpad? Soundpad updated recently so I'll do some testing soon and see if I can reproduce this issue. Last time I tested it worked no problem.

L-uu commented 2 months ago

I've found a way to reproduce a similar looking issue, it seems to happen when I chose a song that is included multiple times or have duplicates of in my Soundpad library. I think I know where the issue is occuring and I'll run some testing soon. Thanks for reporting an issue!

Cyconi commented 2 months ago

Are you using the steam, paid version of soundpad with the latest version of MusicToSoundpad? Soundpad updated recently so I'll do some testing soon and see if I can reproduce this issue. Last time I tested it worked no problem.

Im using the steam version and the lastest MusicToSoundpad image im also not running any betas

L-uu commented 2 months ago

The issue seems to occur when there is a certain number of entries in your Soundpad library. I'll work on a fix soon.

Cyconi commented 2 months ago

The issue seems to occur when there is a certain number of entries in your Soundpad library. I'll work on a fix soon.

ok thank you! let me know once the fix is out.

L-uu commented 2 months ago

The issue seems to be in the "pipes.c" file. I'm using a fixed buffer size for requests and responses. One you have enough sounds in your Soundpad library, data is lost as the response from getSongIndex (or something else) exceeds the buffer. Might be a good idea to switch to dynamic memory allocation but this can't be rushed as it can cause memory leaks in the program.

L-uu commented 2 months ago

I've made a few changes that should be good enough for now, but I will work on the fixes explained above soon. For now these changes should do to at least maintain functionality under these conditions, although it's not 100% bug free yet. It should still work in most cases. I'll leave this issue open for now until all the necessary changes are made. Thanks again for your input!

Cyconi commented 2 months ago

oki thank you very much