mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
cleanup: Use uint*_t instead of u_int*_t everythwere
Use the standard uint{8,16,32,64}_t everywhere instead of the
non-standard u_int{8,16,32,64}_t.
This changes the types in the public headers and removes the u_int*_t
defines. This may break things. However, indentifiers ending with _t are
reserved by POSIX[1]; defining those can lead to undefined behavior.
So if you rely on alsa-lib defining those for you, then you want the
compiler to error so things can be fixed properly.
[1]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_02_02
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
885c64bcc4
commit
adab355f35
11 changed files with 146 additions and 156 deletions
|
|
@ -346,7 +346,7 @@ static int linear_init(void *obj, snd_pcm_rate_info_t *info)
|
|||
rate->func = linear_shrink;
|
||||
/* pitch is get_increment */
|
||||
}
|
||||
rate->pitch = (((u_int64_t)info->out.rate * LINEAR_DIV) +
|
||||
rate->pitch = (((uint64_t)info->out.rate * LINEAR_DIV) +
|
||||
(info->in.rate / 2)) / info->in.rate;
|
||||
rate->channels = info->channels;
|
||||
|
||||
|
|
@ -363,7 +363,7 @@ static int linear_adjust_pitch(void *obj, snd_pcm_rate_info_t *info)
|
|||
struct rate_linear *rate = obj;
|
||||
snd_pcm_uframes_t cframes;
|
||||
|
||||
rate->pitch = (((u_int64_t)info->out.period_size * LINEAR_DIV) +
|
||||
rate->pitch = (((uint64_t)info->out.period_size * LINEAR_DIV) +
|
||||
(info->in.period_size/2) ) / info->in.period_size;
|
||||
|
||||
cframes = input_frames(rate, info->out.period_size);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue