Skip to contentSkip to conversation

dir parameter

DISCUSSION FAU 2 participants 3 messages Jul 18, 2002

lore
Share & tools
lore

FAU

author
#0 lore raw

Hi,
some functions take an int parameter called dir (e.g.:
snd_pcm_hw_params_set_rate()).
What is the meaning of that parameter?

Regards
FAU

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#1 lore raw
Quoted 3 lines

some functions take an int parameter called dir (e.g.:
snd_pcm_hw_params_set_rate()).
What is the meaning of that parameter?

its to let you know if the actual value set is above, below or equal to the one you asked for.

--p

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

author
#2 lore raw
Quoted 8 lines · Paul Davis
Quoted 3 lines

some functions take an int parameter called dir (e.g.:
snd_pcm_hw_params_set_rate()).
What is the meaning of that parameter?

its to let you know if the actual value set is above, below or equal to the one you asked for.

--p

But how could this be in this case:
int snd_pcm_hw_params_set_rate(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir);
dir is not a pointer?

By the way, my impression was that only functions with _near postfix are allowed

to choose a value
different to the requested one?

/FAU

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf