On Mon, 05 Jan 2004 09:26:21 +0000, Nick Ing-Simmons <[EMAIL PROTECTED]> wrote:

Arve Knudsen <[EMAIL PROTECTED]> writes:

patest_write_sine produces a noise but it isn't a sine wave (by ear there are some "sharp edges" in the waveform).

That is the potential killer ... remember one advantage of portaudio was the option to use a write() interface...

The blocking interface is fully implemented with the ALSA implementation, and I use it daily. It would seem there are problems with the OSS one, but its development branch after all :)


patest_sine_formats hangs apparently forever.
Sounds weird. Works perfectly with my setup. Can you tell me which one of
the underlying host APIs (JACK/OSS/ALSA) is being used?

Can you tell me how to tell?


You can use something like this to print the API name:
printf("Host API: %s\n", Pa_GetHostApiInfo(Pa_GetDefaultHostApi())->name);
Unless I explicitly disable it, OSS shows up as default.

I just tested the
OSS implementation for the first time, and it behaves as you describe. I
cannot help you with OSS or JACK I'm afraid, as I concentrate on the ALSA
bit. I don't know what the current state of OSS and JACK support is, but I
don't think they've been as regularly updated as the ALSA one. My
recommendation, for now, would be to configure PortAudio to compile with
only ALSA support. Then the ALSA host API should be used by default, and
things should work better I think.

Worse:


 1019  make clean
 1020  make distclean
 1021  rm config.cache
 1022  rm config.status
 1023  ./configure --without-jack --without-oss
 1024  make
 1025  bin/patest_sine_formats

[EMAIL PROTECTED]:~/portaudio> !1025
bin/patest_sine_formats
PortAudio Test: output Signed 16 Bit
An error occured while using the portaudio stream
Error number: -9997
Error message: Invalid sample rate

My ALSA card is quite capable of doing 44100

Can you verify that the ALSA API is in use, after configuring out OSS and JACK? I cannot see why this test should fail, granted your card supports the given samplerate. If you could be bothered, perhaps you could add some debug output to function SetApproximateSampleRate at pa_linux_alsa/pa_linux_alsa.c: 1575? Ie. you could verify that the correct samplerate is indeed passed to ALSA-lib, and that ALSA-lib rejects it.

This is using a v19 snapshot:
-rw-rw-r-- 1 nick users 486933 2004-01-04 11:25 /home/nick/tgzs/pa_snapshot_v19.tar.gz


Time/date are GMT.

Adding jack back in makes no difference.
Adding oss back in gives same fail.

So it seems that it is using oss and it is broken,
can't say I am surprised - if you recall the original message
was prompted as I was moving to native ALSA 'cos OSS emulation
was flakey.

I think v19 PortAudio OSS still needs some work, I'm experiencing similar problems.

Regards

Arve Knudsen


------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click _______________________________________________ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to