Compare commits
2 commits
b625df9191
...
642d90e9b6
Author | SHA1 | Date | |
---|---|---|---|
642d90e9b6 | |||
8a30821f32 |
7 changed files with 101 additions and 12 deletions
6
Makefile
6
Makefile
|
@ -1,5 +1,5 @@
|
||||||
SRCS := AudioLib/main.c
|
SRCS := AudioLib/main.c
|
||||||
INCLUDES := -Iaudio/include
|
INCLUDES := -Iaudio/
|
||||||
|
|
||||||
BUILDDIR = .build
|
BUILDDIR = .build
|
||||||
TARGET := libaudio-test
|
TARGET := libaudio-test
|
||||||
|
@ -13,7 +13,7 @@ CFLAGS = --std=gnu99 -Wall
|
||||||
all: $(TARGET)
|
all: $(TARGET)
|
||||||
|
|
||||||
$(TARGET): $(OBJS) | audiolib
|
$(TARGET): $(OBJS) | audiolib
|
||||||
$(CC) `$(PKGCONFIG) --libs ao` -Laudio/.build/ -Laudio/.build/libmad -Laudio/.build/speexdsp -o $(TARGET) $(OBJS) -laudio -lmad -lspeexresampler -lm
|
$(CC) `$(PKGCONFIG) --libs ao` -Laudio/.build/ -Laudio/.build/libmad -Laudio/.build/speexdsp -Laudio/.build/libfaad2 -o $(TARGET) $(OBJS) -laudio -lmad -lspeexresampler -lfaad2 -lm
|
||||||
|
|
||||||
audiolib:
|
audiolib:
|
||||||
(cd audio; make)
|
(cd audio; make)
|
||||||
|
@ -26,7 +26,7 @@ $(OBJS): | $(BUILDDIR)
|
||||||
$(BUILDDIR):
|
$(BUILDDIR):
|
||||||
mkdir -p $(BUILDDIR)/AudioLib
|
mkdir -p $(BUILDDIR)/AudioLib
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean audiolib
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rm $(OBJS)
|
-rm $(OBJS)
|
||||||
|
|
17
Readme.md
17
Readme.md
|
@ -106,6 +106,22 @@ Currently not a lot of elements are implemented, but these here are:
|
||||||
- What it does: Takes MP3 frames from demuxer and decodes them to 16 Bit audio samples
|
- What it does: Takes MP3 frames from demuxer and decodes them to 16 Bit audio samples
|
||||||
- Dependencies: modified `libmad` in `deps/mp3`
|
- Dependencies: modified `libmad` in `deps/mp3`
|
||||||
|
|
||||||
|
### Demuxer: ADTS
|
||||||
|
|
||||||
|
- Include: `audio_demuxer_adts.h`
|
||||||
|
- Create: `audio_demuxer_adts();`
|
||||||
|
- What it does: Finds sync marker in input data stream and assembles complete AAC Frames to be emitted to decoder
|
||||||
|
|
||||||
|
### Decoder: AAC
|
||||||
|
|
||||||
|
- Include: `audio_decoder_aac.h`
|
||||||
|
- Create: `audio_decoder_aac();`
|
||||||
|
- What it does: Takes AAC frames from demuxer and decodes them to 16 Bit audio samples
|
||||||
|
- Dependencies: modified `libfaad2` in `deps/aac`
|
||||||
|
|
||||||
|
You can configure the AAC decoder and disable for example HE-AAC (called SBR there) by editing
|
||||||
|
`config.h` in `deps/aac`.
|
||||||
|
|
||||||
### Filter: Resample
|
### Filter: Resample
|
||||||
|
|
||||||
- Include: `audio_filter_resample.h`
|
- Include: `audio_filter_resample.h`
|
||||||
|
@ -198,7 +214,6 @@ A list of filters, demuxers and decoders that are planned to be implemented in t
|
||||||
|
|
||||||
- Demuxer: ISO MPEG 4 Containers (mp4/mov)
|
- Demuxer: ISO MPEG 4 Containers (mp4/mov)
|
||||||
- Demuxer: OGG (for Vorbis and Opus)
|
- Demuxer: OGG (for Vorbis and Opus)
|
||||||
- Decoder: AAC
|
|
||||||
- Decoder: FLAC
|
- Decoder: FLAC
|
||||||
- Decoder: OPUS
|
- Decoder: OPUS
|
||||||
- Decoder: Vorbis
|
- Decoder: Vorbis
|
||||||
|
|
|
@ -5,12 +5,14 @@ SRCS := \
|
||||||
audio_source_testtone.c \
|
audio_source_testtone.c \
|
||||||
audio_demuxer_mp3.c \
|
audio_demuxer_mp3.c \
|
||||||
audio_decoder_mp3.c \
|
audio_decoder_mp3.c \
|
||||||
|
audio_demuxer_adts.c \
|
||||||
|
audio_decoder_aac.c \
|
||||||
audio_filter_param_eq.c \
|
audio_filter_param_eq.c \
|
||||||
audio_filter_resample.c \
|
audio_filter_resample.c \
|
||||||
audio_sink_file.c \
|
audio_sink_file.c \
|
||||||
audio_sink_libao.c
|
audio_sink_libao.c
|
||||||
|
|
||||||
INCLUDES := -Iinclude
|
INCLUDES := -Iinclude `pkg-config --cflags ao`
|
||||||
|
|
||||||
BUILDDIR = .build
|
BUILDDIR = .build
|
||||||
TARGET := $(BUILDDIR)/libaudio.a
|
TARGET := $(BUILDDIR)/libaudio.a
|
||||||
|
@ -18,9 +20,9 @@ OBJS := $(addprefix $(BUILDDIR)/, $(patsubst %.c,%.o, $(SRCS)))
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
AR = ar
|
AR = ar
|
||||||
CFLAGS = --std=gnu99 -Wall
|
CFLAGS = --std=gnu99 -Wall -Os
|
||||||
|
|
||||||
all: $(TARGET) $(BUILDDIR)/libmad/libmad.a $(BUILDDIR)/speexdsp/libspeexresampler.a
|
all: $(TARGET) $(BUILDDIR)/libmad/libmad.a $(BUILDDIR)/speexdsp/libspeexresampler.a $(BUILDDIR)/libfaad2/libfaad2.a
|
||||||
|
|
||||||
$(TARGET): $(OBJS)
|
$(TARGET): $(OBJS)
|
||||||
$(AR) -cr $(TARGET) $(OBJS)
|
$(AR) -cr $(TARGET) $(OBJS)
|
||||||
|
@ -31,7 +33,10 @@ $(BUILDDIR)/libmad/libmad.a:
|
||||||
$(BUILDDIR)/speexdsp/libspeexresampler.a:
|
$(BUILDDIR)/speexdsp/libspeexresampler.a:
|
||||||
(cd deps/resampler; make BUILDDIR=$(abspath $(BUILDDIR)/speexdsp))
|
(cd deps/resampler; make BUILDDIR=$(abspath $(BUILDDIR)/speexdsp))
|
||||||
|
|
||||||
$(BUILDDIR)/%.o: %.c include/%.h
|
$(BUILDDIR)/libfaad2/libfaad2.a:
|
||||||
|
(cd deps/aac; make BUILDDIR=$(abspath $(BUILDDIR)/libfaad2))
|
||||||
|
|
||||||
|
$(BUILDDIR)/%.o: %.c %.h
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@
|
$(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
$(OBJS): | $(BUILDDIR)
|
$(OBJS): | $(BUILDDIR)
|
||||||
|
@ -46,3 +51,4 @@ clean:
|
||||||
-rm $(TARGET)
|
-rm $(TARGET)
|
||||||
(cd deps/mp3; make BUILDDIR=$(abspath $(BUILDDIR)/libmad) clean)
|
(cd deps/mp3; make BUILDDIR=$(abspath $(BUILDDIR)/libmad) clean)
|
||||||
(cd deps/resampler; make BUILDDIR=$(abspath $(BUILDDIR)/speexdsp) clean)
|
(cd deps/resampler; make BUILDDIR=$(abspath $(BUILDDIR)/speexdsp) clean)
|
||||||
|
(cd deps/aac; make BUILDDIR=$(abspath $(BUILDDIR)/libfaad2) clean)
|
68
audio/deps/aac/Makefile
Normal file
68
audio/deps/aac/Makefile
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
SRCS := \
|
||||||
|
bits.c \
|
||||||
|
cfft.c \
|
||||||
|
common.c \
|
||||||
|
decoder.c \
|
||||||
|
drc.c \
|
||||||
|
drm_dec.c \
|
||||||
|
error.c \
|
||||||
|
filtbank.c \
|
||||||
|
hcr.c \
|
||||||
|
huffman.c \
|
||||||
|
ic_predict.c \
|
||||||
|
is.c \
|
||||||
|
lt_predict.c \
|
||||||
|
mdct.c \
|
||||||
|
mp4.c \
|
||||||
|
ms.c \
|
||||||
|
output.c \
|
||||||
|
pns.c \
|
||||||
|
ps_dec.c \
|
||||||
|
ps_syntax.c \
|
||||||
|
pulse.c \
|
||||||
|
rvlc.c \
|
||||||
|
sbr_dct.c \
|
||||||
|
sbr_dec.c \
|
||||||
|
sbr_e_nf.c \
|
||||||
|
sbr_fbt.c \
|
||||||
|
sbr_hfadj.c \
|
||||||
|
sbr_hfgen.c \
|
||||||
|
sbr_huff.c \
|
||||||
|
sbr_qmf.c \
|
||||||
|
sbr_syntax.c \
|
||||||
|
sbr_tf_grid.c \
|
||||||
|
specrec.c \
|
||||||
|
ssr_fb.c \
|
||||||
|
ssr_ipqf.c \
|
||||||
|
ssr.c \
|
||||||
|
syntax.c \
|
||||||
|
tns.c
|
||||||
|
|
||||||
|
|
||||||
|
BUILDDIR = .build
|
||||||
|
TARGET := $(BUILDDIR)/libfaad2.a
|
||||||
|
OBJS := $(addprefix $(BUILDDIR)/, $(patsubst %.c,%.o, $(SRCS)))
|
||||||
|
|
||||||
|
CC = gcc
|
||||||
|
AR = ar
|
||||||
|
CFLAGS = --std=gnu99 -Wall -Os
|
||||||
|
INCLUDES = -I.
|
||||||
|
|
||||||
|
all: $(TARGET)
|
||||||
|
|
||||||
|
$(TARGET): $(OBJS)
|
||||||
|
$(AR) -cr $(TARGET) $(OBJS)
|
||||||
|
|
||||||
|
$(BUILDDIR)/%.o: %.c config.h
|
||||||
|
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
|
||||||
|
|
||||||
|
$(OBJS): | $(BUILDDIR)
|
||||||
|
|
||||||
|
$(BUILDDIR):
|
||||||
|
mkdir -p $(BUILDDIR)
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-rm $(OBJS)
|
||||||
|
-rm $(TARGET)
|
|
@ -29,7 +29,7 @@
|
||||||
/* Allow decoding of Digital Radio Mondiale (DRM) */
|
/* Allow decoding of Digital Radio Mondiale (DRM) */
|
||||||
#undef DRM_SUPPORT
|
#undef DRM_SUPPORT
|
||||||
|
|
||||||
/* Define DISABLE_SBR if you want to disable SBR decoding. */
|
/* Define DISABLE_SBR if you want to disable SBR decoding. (HE-AAC) */
|
||||||
#undef DISABLE_SBR
|
#undef DISABLE_SBR
|
||||||
|
|
||||||
/* Define SBR_LOW_POWER if you want only low power SBR decoding without PS. */
|
/* Define SBR_LOW_POWER if you want only low power SBR decoding without PS. */
|
||||||
|
|
|
@ -17,7 +17,7 @@ OBJS := $(addprefix $(BUILDDIR)/, $(patsubst %.c,%.o, $(SRCS)))
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
AR = ar
|
AR = ar
|
||||||
CFLAGS = --std=gnu99 -Wall
|
CFLAGS = --std=gnu99 -Wall -Os
|
||||||
|
|
||||||
all: $(TARGET)
|
all: $(TARGET)
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ OBJS := $(addprefix $(BUILDDIR)/, $(patsubst %.c,%.o, $(SRCS)))
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
AR = ar
|
AR = ar
|
||||||
CFLAGS = --std=gnu99 -Wall
|
CFLAGS = --std=gnu99 -Wall -Os
|
||||||
|
|
||||||
all: $(TARGET)
|
all: $(TARGET)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue