Colecovision sound stutters
-
OK I did a test, downloaded 4.1 retro pie image and installed onto a new freshly formatted card.
Enabled the coleco emulator. Added a few roms my goto is donkey kong. Played perfect no sound issues.
Updated script to latest as of right now, 4.1.12 updated everything and tried again, sounds is messed up. So something changed.A few versions back I cant remember say 4.1.8 ish when it finished a script update, after you shutdown the PI using the menu to shutdown system it started to say a problem with the coleco missing something then shutdown.
Running a RP3.
-
@raymate thanks. I will try and reproduce and debug it.
-
Over the past couple of days, I've been thinking here and there on what changes might have been implemented in RetroPie since the last time I successfully used CoolCV, which was about two weeks ago. While there are no doubt many changes that I'm not aware of, the automatic USB mount addition came to mind. Although it was introduced in December, I was using the fstab method at the time and only decided to use auto mount last week when I was redoing my setup. After looking at the CoolCV release page to see if anyone there was having issues, this post stood out as also mentioning the use of external USB. Is it possible the new USB auto mount is different in any way from the fstab method that could affect performance?
-
@mediamogul i dont have mine on a usb mount and it lags directly on the sd card too. I also tried different versions of the emulator. Same issue. Really slow and laggy
-
-
@mediamogul I don't think that can be related.
-
@mediamogul nope. Two ways it doesnt work for me are having the es_systems.cfg point to my sd card or my hard drive. I dont use that method at all.
-
Pardon my language, but shucks.
-
Hi there. I'm the one who posted the same concern as this on the CoolCV support forum. I did a fresh install of Retropie 4.1 and installed the CoolCV script from the retropie setup. I then updated CoolCV to the latest version manually. I tested games running from the microSD card and a manual USB mount and as long as I dont update the Retropie setup script CoolCV performs fine. As soon as I update the Retropie setup script everything messes up.
Hope this helps.
-
@svc123 said in Colecovision sound stutters:
I did a fresh install of Retropie 4.1 and installed the CoolCV script from the retropie setup. I then updated CoolCV to the latest version manually. I tested games running from the microSD card and a manual USB mount and as long as I dont update the Retropie setup script CoolCV performs fine. As soon as I update the Retropie setup script everything messes up.
I agree with svc, I recently updated the CoolCV core manually and I have encountered no slowdown or stutter whatsoever. RPi3, RetroPie 4.1.12. Is my assumption correct that at this time, when you update the CoolCV core through the RetroPie GUI, you do not get the very latest version, which is v0.6.4? I say this because after updating through RPi, the multi-keypress input binding option did not work for me, but after manually updating with the binary from coolcv_v0.6.4_all.zip, it did work. Not to mention, the byte count of the binary from the zip is bigger than the latest one I was able to obtain through the GUI.
Can we get the RPi update script pointed at the very latest release?
Sorry if these are newbiesque questions, I'm still learning RPi.
Thanks,
-Dave -
-
I recently built a Retropie box from image on a SD card with a Pi 3 B and can confirm the CoolCV sound issue. I've updated to Retropie 4.1.14 and manually updated CoolCV to the latest with no difference. The game slows slightly when there is lot's of sound and although the sound stutters, it doesn't seem to be related to CPU load. I thought I would see the CPU load spiking when there was stuttering sound but the load actually reduces. While playing Ladybug with it's short sfx sounds, CPU was sitting around 25-27%. When it plays it's little tune where the audio is continuous, CPU would drop to 18-20%.
Darren
-
Any updates on this, its still unplayable, keep updating each week with the hope it's fixed
:( miss the coleco
-
The author of CoolCV is aware of the situation and has shown possible recent interest in updating the software with a few new features. If that happens, I'm sure he will address this slow down on the Pi as well. Be sure to watch this space for updates.
-
@mediamogul Good stuff, thanks for the info and reply
-
I have been debugging this, and it is the sdl2.0.5 update that has caused the issue.
Unfortunately as it is closed source, I am unable to debug it further (at least debugging coolcv), and don't know what in SDL2 would have affected it as other SDL2 apps seem ok.(Changed my mind - I can debug SDL of course) -
-
It's quite likely it's an issue with SDL2.0.5 (SDL 2.0.5 has had heaps of problems on the rpi) - I am going to try and git bisect it, but this will take some time.
If I find the commit in SDL, I will revert it or backport any fix if there is one. If I can't (and the coolcv author cannot work around it), I may be forced to switch back to SDL2.0.4 again...
-
I have found the commit that causes the issue (this references our git mirror, not the original repository)
commit f0a9a821497b8e9d3e2496a5c5ab844cdddc5e4c Author: Sam Lantinga <slouken@libsdl.org> Date: Wed Oct 12 22:25:19 2016 -0700 Work-around for a hang when USB devices are unplugged, contributed by James Zipperer diff --git a/src/audio/alsa/SDL_alsa_audio.c b/src/audio/alsa/SDL_alsa_audio.c index 3fdbd82..574d51b 100644 --- a/src/audio/alsa/SDL_alsa_audio.c +++ b/src/audio/alsa/SDL_alsa_audio.c @@ -314,9 +314,20 @@ ALSA_PlayDevice(_THIS) swizzle_alsa_channels(this, this->hidden->mixbuf, frames_left); while ( frames_left > 0 && SDL_AtomicGet(&this->enabled) ) { - /* !!! FIXME: This works, but needs more testing before going live */ - /* ALSA_snd_pcm_wait(this->hidden->pcm_handle, -1); */ - int status = ALSA_snd_pcm_writei(this->hidden->pcm_handle, + int status; + + /* This wait is a work-around for a hang when USB devices are + unplugged. Normally it should not result in any waiting, + but in the case of a USB unplug, it serves as a way to + join the playback thread after the timeout occurs */ + status = ALSA_snd_pcm_wait(this->hidden->pcm_handle, 1000); + if (status == 0) { + /*fprintf(stderr, "ALSA timeout waiting for available buffer space\n");*/ + SDL_OpenedAudioDeviceDisconnected(this); + return; + } + + status = ALSA_snd_pcm_writei(this->hidden->pcm_handle, sample_buf, frames_left); if (status < 0) {
I will see if this has been changed in newer versions and either revert or update.
-
Please can you update retropie-setup and update coolcv and let me know if that sorts it (I reverted the problematic commit in sdl2).
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.