Re: strange code in pcm_route.c for 3 byte formats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Maciej S. Szmigiero wrote:
> While reading alsa-lib sources I've spotted some strange code in
> src/pcm/pcm_route.c:
>        /* 3 bytes formats? */
>        route->params.use_getput =
>                (snd_pcm_format_physical_width(src_format) + 7) / 3 == 3 ||
>                (snd_pcm_format_physical_width(dst_format) + 7) / 3 == 3;

"(x + n-1) / n" is "divide by n while rounding up".

"/ 3" should have been "/ 8".


Regards,
Clemens
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux