Skip to content

Instantly share code, notes, and snippets.



Forked from armornick/playwav.c
Last active Apr 25, 2021
What would you like to do?
Play a sound with SDL2 added lots of print information and the ability to specify the wav file as first argument. Woohoo.
SRCS = $(wildcard *.c)
.PHONY: all
all: $(patsubst %.c,%,$(SRCS))
@echo found rules for: $^
%: %.c
gcc -I/usr/local/include -L/usr/local/lib $< -Wl,-rpath,/usr/local/lib -lSDL2 -lm -o $@
@echo built: $@
clean: $(patsubst %.c,%,$(SRCS))
rm $(patsubst %.c,%,$(SRCS))
@echo cleaned: $^
# gcc -I/usr/local/include -L/usr/local/lib $< -Wl,-rpath,/usr/local/lib -lSDL2 -lm -o $@
View raw

(Sorry about that, but we can’t show files that are this big right now.)


This comment has been minimized.

Copy link

@Ragbot Ragbot commented Apr 25, 2021

It just spits out a bunch of things when I start it with one of the audio files and just doesn't play any help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment