]> git.alsa-project.org Git - alsa-utils.git/commit
speaker-test.c - fix sine generator on big-endian archs
authorTakashi Iwai <tiwai@suse.de>
Mon, 21 Apr 2008 13:19:27 +0000 (15:19 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 21 Apr 2008 13:19:27 +0000 (15:19 +0200)
commit6372f4acc2c9c06332e29b36a5375d3c4ded36f5
treed40da4999204aa52362d0882e3004ecf8a08d190
parent8802e85d41ab5fea1eb5bedf19a520373e483a67
speaker-test.c - fix sine generator on big-endian archs

speaker-test doesn't work well when you choose a little-endian format on a
big-endian processor, or the opposite. Yes, I know about plughw:, but for
debugging purposes it may not be an option. The following patch add proper
support for S32 and S16 support for but LE and BE processors:

- The "if (bits-per-sample)" construct was replaced by case (format).
- Support for S16_BE, S32_BE formats was added.
- S16_LE and S32_LE were made compatible with big-endian processors.
- NB: The pink noise generator wasn't changed (I'll do if this patch is OK).

From: Giuliano Pochini <pochini@shiny.it>
speaker-test/speaker-test.c