TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: ALL
from: R.WIESER
date: 2020-01-23 08:39:00
subject: Re: Rephrasing my ALSA qu

Jim,

> No. The value of dir is set by the function - that's why you pass
> it the address of dir. It's returned value for the function
> "snd_pcm_hw_params_set_rate_near" is

Here at my end a "val" of 8000 with "dir" being given a positive number
causes a seconds long delay, "val" returns 8001 and "dir" returns 0.   Using
a "dir" of zero doesn't cause a delay and "var" and "dir" stay unchanged.
Using a negative "dir" doesn't causes a delay either, "val" returns 7999 and
"dir" returns 0.

In other words, here that "dir" argument goes, just like the "val" one, in
BOTH directions.   Interresting, no ? :-(

> I haven't edited the sample code you referenced - so 44100

Can you do that now ?    Maybe testing different a negative and positive
value for "dir" too ?

>> But I wondered if my, or rather Geany's calling of gcc missed
>> a "clear declared variables" flag (which is why I specifically
>> mentioned what I was using, and how).
>
> gcc -c simple_alsa_play.c
> gcc -o simple_alsa_play simple_alsa_play.o -lasound

Nope, no extra setting used.

I think we can conclude that the ALSA version you are using on the PC seems
to be different from mine on the RPi.

Do you have an RPi that you can re-do the check on ?    The result from that
would mean a lot more.

Regards,
Rudy Wieser

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.