aboutsummaryrefslogtreecommitdiff
path: root/tinyplay.c
AgeCommit message (Collapse)Author
2012-10-22tinyplay: Add missing header file <string.h>Gabriel M. Beddingfield
2012-05-04tinyplay: add multichannel supportSimon Wilson
Improve the reading of the RIFF WAVE header so that unrecognised chunks are skipped, which means that extra chunks are not played as if they were audio data. This ensures that all channels for multichannel playback line up correctly. Change-Id: Ifdb3cb73b3c0bf41a1e271068d263cd01116616c
2012-02-13tinyplay: Use buffer size in bytes instead of framesAxel Castaneda Gonzalez
pcm_write expects to receive buffer size given in bytes, but tinyplay sends as a parameter the size in frames, which causes audio sample data loss for some scenarios where more than 2 channels are used. For example: When using 6 channels and 1024 as period size: -On tinyplay side size=4096 (buffer_size) -On pcm_write (pcm.c) x.frames = count / (pcm->config.channels * pcm_format_to_bits(pcm->config.format) / 8); x.frames = 4096 / (6 * 16/8) x.frames = 341.33 (decimal part is discarded, 4 bytes are lost every pcm_write) -- In this case, 4 bytes are lost, which causes a shift of the channels. Use buffer size in bytes in order to avoid this problem. Signed-off-by: Axel Castaneda Gonzalez <x0055901@ti.com>
2012-02-08tinycap, tinyplay, tinymix: Add extra parameters.Gabriel M. Beddingfield
Command-line arguments are added for: tinyplay and tinycap: -D n -- card number -p n -- period size -n n -- number of periods per buffer tinymix: -D n -- card number Signed-off-by: Gabriel M. Beddingfield <gabrbedd@ti.com>
2012-02-08tinycap, tinyplay: Check *argv before dereferencing.Gabriel M. Beddingfield
In several places, argv is incremented and *argv is dereferenced without checking to see if it is valid to do so. This could lead to a buffer overrun if the user provides invalid parameters. This patch generally changes this: if (strcmp(*argv, "-r") == 0) { argv++; rate = atoi(*argv); } argv++; To this: if (strcmp(*argv, "-r") == 0) { argv++; if (*argv) rate = atoi(*argv); } if (*argv) argv++; Signed-off-by: Gabriel M. Beddingfield <gabrbedd@ti.com>
2011-08-09tinyplay: fix segfault caused by missing device argumentSimon Wilson
2011-08-09tinyplay: add support for device parameterChris Kelly
Change-Id: I8f04a5dec575bf20459968fb1f181071ae856ed0
2011-08-05Ensure threasholds are zeroed before opening pcmSimon Wilson
Fixes tinyplay and tinycap after a recent change to allow threasholds to be set in the pcm module.
2011-06-03Fix issues with tinyplaySimon Wilson
- Add to Android.mk - Add "all" rule to Makefile - Remove redundant old play code from tinyplay.c - Add error checking to tinyplay
2011-06-02Add tinyplay utility to play PCM riff/wave filesSimon Wilson