]> git.alsa-project.org Git - alsa-utils.git/commit
aplay: Refactor playback code
authorDaniel Baluta <daniel.baluta@nxp.com>
Tue, 8 Aug 2017 22:05:59 +0000 (01:05 +0300)
committerTakashi Iwai <tiwai@suse.de>
Wed, 9 Aug 2017 08:38:41 +0000 (10:38 +0200)
commitdba6db92284a56d933cfa538f1a4fd7ecc175a62
treeaab3fc56befd7e344267ea4b1f5e6874ed97c39e
parent3d44e2bc159e354bba71592efaf12066742879e5
aplay: Refactor playback code

This introduces read_header function which tries
to read the header of an audio file in order to determine
its type.

This has the following effects:
(1) makes code easier to read
(2) don't abort if file size is less than expected header

(2), allows us to play small files with size smaller than any
supported audio file headers.

Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
aplay/aplay.c