1

Topic: Sound problem

I guess this isn't a minor bug, which explains why I'm posting a new topic..

I'm running the 0.2.1 Linux version of teewars, and I'm having some problems with the sound not working at all in teewars. This is the output while loading the game:

[client]: starting...
[config/load]: loading default.cfg
Expression 'SetApproximateSampleRate( pcm, hwParams, sr )' failed in '/home/camilla/projects/teewars/021/baselib/src/external/portaudio/pa_linux_alsa.c', line: 1114
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->playback, outParams, self->primeBuffers, hwParamsPlayback, &realSr )' failed in '/home/camilla/projects/teewars/021/baselib/src/external/portaudio/pa_linux_alsa.c', line: 1668
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in '/home/camilla/projects/teewars/021/baselib/src/external/portaudio/pa_linux_alsa.c', line: 1789
[audio_stream]: portaudio error: Invalid sample rate
...loading of all the .wav files..

Additional information might be that I'm running alsa-driver-1.0.14, on Gentoo Linux. I'm guessing that I'm not the only one that has been experiencing this bug, so I hope there's an easy solution to this wink

And I must say, this is a great game! Even without any sound working I really find it entertaining, and quite addictive.

2

Re: Sound problem

I have exactly the same problem and output.
Source mage GNU/Linux and 1.0.14a.

3

Re: Sound problem

If i find a computer with the problem I will look into it hmm Perhaps I can run a live-cd and test it some how. Could be sound card/driver related aswell

4

Re: Sound problem

apax wrote:

I guess this isn't a minor bug, which explains why I'm posting a new topic..

I'm running the 0.2.1 Linux version of teewars, and I'm having some problems with the sound not working at all in teewars. This is the output while loading the game:

[client]: starting...
[config/load]: loading default.cfg
Expression 'SetApproximateSampleRate( pcm, hwParams, sr )' failed in '/home/camilla/projects/teewars/021/baselib/src/external/portaudio/pa_linux_alsa.c', line: 1114
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->playback, outParams, self->primeBuffers, hwParamsPlayback, &realSr )' failed in '/home/camilla/projects/teewars/021/baselib/src/external/portaudio/pa_linux_alsa.c', line: 1668
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in '/home/camilla/projects/teewars/021/baselib/src/external/portaudio/pa_linux_alsa.c', line: 1789
[audio_stream]: portaudio error: Invalid sample rate
...loading of all the .wav files..

Additional information might be that I'm running alsa-driver-1.0.14, on Gentoo Linux. I'm guessing that I'm not the only one that has been experiencing this bug, so I hope there's an easy solution to this wink

And I must say, this is a great game! Even without any sound working I really find it entertaining, and quite addictive.

Try to play around with this: http://alsa.opensrc.org/index.php/.asou … s_On_Input

Could help.

5

Re: Sound problem

matricks wrote:
apax wrote:

I guess this isn't a minor bug, which explains why I'm posting a new topic..

I'm running the 0.2.1 Linux version of teewars, and I'm having some problems with the sound not working at all in teewars. This is the output while loading the game:

[client]: starting...
[config/load]: loading default.cfg
Expression 'SetApproximateSampleRate( pcm, hwParams, sr )' failed in '/home/camilla/projects/teewars/021/baselib/src/external/portaudio/pa_linux_alsa.c', line: 1114
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->playback, outParams, self->primeBuffers, hwParamsPlayback, &realSr )' failed in '/home/camilla/projects/teewars/021/baselib/src/external/portaudio/pa_linux_alsa.c', line: 1668
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in '/home/camilla/projects/teewars/021/baselib/src/external/portaudio/pa_linux_alsa.c', line: 1789
[audio_stream]: portaudio error: Invalid sample rate
...loading of all the .wav files..

Additional information might be that I'm running alsa-driver-1.0.14, on Gentoo Linux. I'm guessing that I'm not the only one that has been experiencing this bug, so I hope there's an easy solution to this wink

And I must say, this is a great game! Even without any sound working I really find it entertaining, and quite addictive.

Try to play around with this: http://alsa.opensrc.org/index.php/.asou … s_On_Input

Could help.

Hi, I have the same problem ( http://www.wklej.org/id/87fa66a8c8 ), but it doesn't helps sad I'm using Arch Linux and alsa. Any other way, to repair it?

Sorry for my english wink

6

Re: Sound problem

tried several thing, but no go. using ArchLinux too. Only way to get sound under linux is to use wine with the win32 binaries :ugly:

7

Re: Sound problem

Aye. Maybe they should use SDL or something.
I have the same problem. When i put the line above tu convert sample rate in .asoundrc it still doesn't work sad((

Playing this game is awsome, without sound its bad sad

#teewars.fr @ Qnet

8

Re: Sound problem

same prob here

----------------------

[46fbe53a][client]: starting...
[46fbe53a][config/load]: loading default.cfg
Expression 'SetApproximateSampleRate( pcm, hwParams, sr )' failed in '/home/camilla/projects/teewars/023/baselib/src/external/portaudio/pa_linux_alsa.c', line: 1114
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->playback, outParams, self->primeBuffers, hwParamsPlayback, &realSr )' failed in '/home/camilla/projects/teewars/023/baselib/src/external/portaudio/pa_linux_alsa.c', line: 1668
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in '/home/camilla/projects/teewars/023/baselib/src/external/portaudio/pa_linux_alsa.c', line: 1789
[46fbe53a][audio_stream]: portaudio error: Invalid sample rate

----------------

using arch linux with alsa drivers

sad

9

Re: Sound problem

Common problem. Will be fixed in upcoming releases.
http://ix.teewars.com/trac/wiki/CommonProblems

10

Re: Sound problem

Thought I'd mention this, since I had a similar problem to you guys and have managed to fix it. The error message output I received was similar to that mentioned above and also included: Expression 'ret' failed as the top most error.

The problem is with portaudio (specifically the pa_linux_alsa.c code) which is compiled into the teewars binary. To fix this you will need to download the teewars, bam source code (see documentation on compiling teewars from source) and the latest portaudio source code ( www.portaudio.com ).

What you are doing here is essentially updating the pa_linux_alsa.c code with to the latest version which fixes this issue.

1. Extract the teewars source code (in its own directory - ./teewars-0.3.3-src)
2. Extract the portaudio source code  (in its own directory - ./portaudio)
3. Copy pa_linux_alsa.c and overwrite the version in teewars. - cp ./portaudio/src/hostapi/alsa/pa_linux_alsa.c ./teewars-0.3.3-src/src/engine/external/portaudio
4. Copy pa_linux_alsa.h and overwrite the verion in teewars. - cp ./portaudio/include/pa_linux_alsa.h ./teewars-0.3.3-src/src/engine/external/portaudio
5. Then proceed with the instructions for compiling teewars the usual way (see documentation section)

For reference:-
Distro: Gentoo Linux 2.6.22 amd64
Teewars version: 0.3.3
Portaudio version: v19_20071207

Hope that helps someone :-)