May 5, 2012 at 9:10 PM
Edited May 5, 2012 at 9:13 PM
This thread identifies an issue that I'm having that I mistakenly reported in http://pcsxr.codeplex.com/discussions/233228 (Sound Problems with Linux). There is also an open Issue at http://pcsxr.codeplex.com/workitem/9779 that may be related.
On 32-bit Arch Linux, I'm experiencing a sound problem with this excellent emulator that causes audio to crackle and pop reliably when using the packaged OpenGL plugin as well as Pete's XGL2 plugin and less-reliably (but never-the-less occasionally) with
the XVideo graphics plugin. The audio problems occur using PCSXR's packaged SDL audio plugin as well on its packaged ALSA and OpenAL plugins (I didn't try OSS), although they manifest slightly differently with the popping being much, much worse with the ALSA
plugin and the popping being replaced with scratched-CD-like audio "skips" with OpenAL.
My video card is an NVidia GeForce 8500 GT, which has 512MB of memory. My CPU is an Intel Core 2 Quad CPU Q6600 with four cores, each at 2.40 Ghz, and I have 3 gigs of RAM. My sound card is in integrated HDA_Intel card, which is fairly garbage, but I don't
usually have sound issues like this. dario86 has been kind enough to help me as well as he could and has informed me that these specs are well above the minimum required for running PCSXR smoothly, and I should note that the popping and crackling does not
become more or less prevalent when starting PCSXR with max or minimum settings using the OpenGL plugins, nor do I get any indication of any slow-down or frame-skipping at maximum graphical settings, which leads me to believe that the performance of my computer
might not be the problem.
Crackling and popping occurs not only when sounds are playing (with several pops per second using the SDL sound plugin), but more rarely (and less-reliably) during periods of total silence, such as loading screens. Visual analysis of recorded waveforms (examples
further on) taken during these periods of silence show me that at least some of these audible pops are not simply audio drops but are (glitched) sounds all their own.
At first, I thought that using the XVideo plugin (per dario86's suggestion) resolved the audio issues entirely, but, after noticing occasional, isolated pops in periods of silence, I did testing using the Playstation BIOS's boot sound and recorded a couple
of examples where the popping was clearly audible during the sound (although it was also perfect sometimes). Using the XVideo problem almost entirely eliminates this problem during regular play, but perhaps the fact that the problem still exists when using
the XVideo plugin will help lead to some resolution.
I do not have this problem with any other software, including the pSX emulator. Never-the-less, I've heard pops like these before as latency issues that I've had to and been able to resolve with other emulators or when processing audio (underruns when using
JACK to record music). That doesn't explain, though, why raising or lowering my video settings or running intensive software in the background (recording the following examples) doesn't seem to affect the popping, or why there are pops during periods of silence
(clearly not drops, although they could be drop-related).
For any interested developers, here are some recorded examples of sound comparing use of the XVideo plugin (used as a control for the most part, since it sounds perfect 99% of the time) and the packaged OpenGL plugin (where popping is clearly heard). All
of these examples are using the SDL sound plugin, although I can record examples using the ALSA and OpenAL plugins upon request; I described their respective issues earlier, and they're probably related.
Playstation BIOS sound
XVideo control: http://dl.dropbox.com/u/13106097/pcsxr_sound/xv_sdl_bios.wav
XVideo second try (with pops): http://dl.dropbox.com/u/13106097/pcsxr_sound/xv_sdl_bios_2.wav
XVideo third try (with pops): http://dl.dropbox.com/u/13106097/pcsxr_sound/xv_sdl_bios_3.wav
OpenGL (with pops): http://dl.dropbox.com/u/13106097/pcsxr_sound/opengl_sdl_bios.wav
pSX emulator with sound latency set slightly too low (40 ms instead of 41ms for my system): http://dl.dropbox.com/u/13106097/pcsxr_sound/psx_bios_latency.wav
XVideo control: http://dl.dropbox.com/u/13106097/pcsxr_sound/xv_sdl_tenchu_opening.wav
OpenGL (extended to show pops during a loading screen at 54 second mark, which do not reliably occur at any point but which sometimes randomly occur): http://dl.dropbox.com/u/13106097/pcsxr_sound/opengl_sdl_tenchu_opening.wav
XVideo control: http://dl.dropbox.com/u/13106097/pcsxr_sound/xv_sdl_tenchu_dialog.wav
OpenGL (with pops): http://dl.dropbox.com/u/13106097/pcsxr_sound/opengl_sdl_tenchu_dialog.wav
Tenchu stage music:
XVideo control: http://dl.dropbox.com/u/13106097/pcsxr_sound/xv_sdl_tenchu_music.wav
OpenGL (with pops): http://dl.dropbox.com/u/13106097/pcsxr_sound/opengl_sdl_tenchu_music.wav
MegaMan 8 from boot (Capcom splash logo) to first stage music, skipping scenes:
XVideo with minor pops on silent loading screens (I started recording while a long series of pops was playing before the Capcom splash) and during the Capcom splash: http://dl.dropbox.com/u/13106097/pcsxr_sound/xv_sdl_megaman_8.wav
OpenGL with pops, including on some silent loading screens (but not all, as usual, nor does it always occur on the same screens). As with XVideo, there were pops while the disc was loading before the Capcom splash, but I captured more of them this time: http://dl.dropbox.com/u/13106097/pcsxr_sound/opengl_sdl_megaman_8.wav
If any developer visually analyses these examples (which shows that the pops during silence are clearly not drops, which would be weird during silence), ignore the DC offset and audibly-imperceptible noise, both of which are a result of my stringing a cable
from my soundcard's output to its line input. These examples illustrate clearly what I hear when I play PCSXR normally, and recording these examples on the same machine that PCSXR is playing on did not affect the frequency of crackles or pops, which is one
more thing causing me to wonder if this problem has anything to do with latency.
I should note that my sound card has a power-save mode enabled (that I've been unable to disable in the past) which causes an audible pop when the soundcard is powered on, which happens almost every time that I start any media-playing program, including
emulators. PCSXR is the only software, though, that gives me intermittent pops. That being said, I know nothing about how this emulator works sound-wise, and so maybe it's possible that the audio pops during periods of silence ~are~ latency-related and, for
some reason, when the audio is dropping, my sound card is being released and reacquired?
It'd be nice to be able to try PCSXR with a much higher sound latency (selectable latency is a feature in many emulators, although, for all I know, this could be impossible or extremely tedious to implement in PCSXR) to see if the problems are resolved.
Thank you so much for all of your work with PCSXR, devs. I believe that emulation doesn't get the respect that it deserves as an extremely important part of gaming culture: preservation of our beloved art form freed from the corporate re-releases on things
like compilation discs, Xbox Live, and the Virtual Console. Gaming hardware from the past all will fail, but these games that developers have put their sweat and blood into and which we've all enjoyed during the best times of our lives will live on due to
the work of unpaid hobbyists that share their code for the world to own forever. You guys are my heroes, and thank you, dario86, for your personal help regarding this issue.