linux_alsa_helloworld

Simple audio playback example using ALSA
git clone https://0xdd.org/code/linux_alsa_helloworld.git
Log | Files | Refs | README | LICENSE

Makefile (422B)


      1 # 2018 David DiPaola
      2 # licensed under CC0 (public domain, see https://creativecommons.org/publicdomain/zero/1.0/)
      3 
      4 BIN = audio_helloworld
      5 
      6 _CFLAGS = -Wall -Wextra \
      7 	$(CFLAGS)
      8 _LIBS = \
      9 	-lasound
     10 
     11 .PHONY: all
     12 all: $(BIN)
     13 
     14 .PHONY: clean
     15 clean:
     16 	rm -rf $(BIN) sample.raw
     17 
     18 sample.raw: sample.ogg
     19 	ffmpeg -v 0 -i $< -f s16le -acodec pcm_s16le -ac 1 -ar 44100 $@
     20 
     21 $(BIN): main.c sample.raw
     22 	$(CC) $(_CFLAGS) $< $(_LIBS) -o $@
     23