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)
|