Invalid: Portaudio on Linux (Ubuntu 15.04) with Alsa
PCSX and its plugins were a fresh (yesterday) build from GIT

I tried to use Portaudio (SDL is crashing with memory corruption mostly upon starting a game)

Portaudio gives the following error:

Expression 'alsa_snd_pcm_hw_params_set_rate_near( pcm, hwParams, &setRate, NULL )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3201
Expression 'paUnanticipatedHostError' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2053
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->playback, outParams, self->primeBuffers, hwParamsPlayback, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2722
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2843
* SPU2-X: PortAudio error: Unanticipated host error

This change solves it for me but I'm not sure whether that will cause other problems:

diff --git a/plugins/spu2-x/src/SndOut.h b/plugins/spu2-x/src/SndOut.h
index 9dbfe33..502cc8d 100644
--- a/plugins/spu2-x/src/SndOut.h
+++ b/plugins/spu2-x/src/SndOut.h
@@ -32,7 +32,7 @@ static const int SndOutVolumeShift32 = 16-SndOutVolumeShift; // shift up, not do
 // Samplerate of the SPU2. For accurate playback we need to match this
 // exactly.  Trying to scale samplerates and maintain SPU2's Ts timing accuracy
 // is too problematic. Smile
-static const int SampleRate = 48000;
+static const int SampleRate = 44100;
 extern int FindOutputModuleById( const wchar_t* omodid );

Sponsored links

This was 9 months ago, but it seems like an external problem with Portaudio or ALSA. If this is still an issue, we can reopen it.

Thank you for your report.
This bug report has now been marked as Invalid since it either was not reproducible, not a valid bug or otherwise unacceptable for fixing.

This thread will now be closed and moved in the Invalid/rejected/duplicate bug reports subforum.

Users browsing this thread: 1 Guest(s)