Permalink
Browse files

Add test target in the Makefile

  • Loading branch information...
1 parent 4b05aad commit 0e47966939c632c7381a9406a67affd3ebf35f74 @teknoraver committed Jun 2, 2010
Showing with 30 additions and 1 deletion.
  1. +30 −1 Makefile
View
@@ -27,7 +27,7 @@ $(TARGET): $(LIBS) au_channel.h adts.h aacplusenc.c
done
$(CC) $(CFLAGS) -o $(TARGET) aacplusenc.c $(LDFLAGS)
-.PHONY: clean
+.PHONY: clean test
clean:
rm -f $(ofiles) $(TARGET) config.* test-*
for i in $(SUBDIRS) ; do \
@@ -39,5 +39,34 @@ install: all
cp aacplusenc $(INSTDIR)/bin
strip -s -R.comment $(INSTDIR)/bin/aacplusenc
+MONO:=pan=1:0.5:0.5:channels=1
+MPLAYER:=mplayer -msglevel all=0:statusline=5
+AO:=-ao pcm:fast:file
+
+test: all
+ $(MPLAYER) -af lavcresample=32000:$(MONO) $(AO)=test32m.wav test.wav
+ $(MPLAYER) -af lavcresample=44100:$(MONO) $(AO)=test44m.wav test.wav
+ $(MPLAYER) -af lavcresample=48000:$(MONO) $(AO)=test48m.wav test.wav
+
+ $(MPLAYER) -af lavcresample=32000 $(AO)=test32s.wav test.wav
+ $(MPLAYER) -af lavcresample=44100 $(AO)=test44s.wav test.wav
+ $(MPLAYER) -af lavcresample=48000 $(AO)=test48s.wav test.wav
+
+ ./aacplusenc test32m.wav test32m.aac 18
+ ./aacplusenc test44m.wav test44m.aac 40
+ ./aacplusenc test48m.wav test48m.aac 40
+
+ ./aacplusenc test32s.wav test32s.aac 18
+ ./aacplusenc test44s.wav test44s.aac 48
+ ./aacplusenc test48s.wav test48s.aac 48
+
+ $(MPLAYER) test32m.aac
+ $(MPLAYER) test44m.aac
+ $(MPLAYER) test48m.aac
+
+ $(MPLAYER) test32s.aac
+ $(MPLAYER) test44s.aac
+ $(MPLAYER) test48s.aac
+
config.mak:
./configure

0 comments on commit 0e47966

Please sign in to comment.