@@ -4,60 +4,25 @@ project(liteplayer_core)
4
4
set (TOP_DIR "${CMAKE_SOURCE_DIR} /.." )
5
5
6
6
# cflags: OS_LINUX, OS_ANDROID, OS_APPLE, OS_RTOS
7
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -fPIC -std=gnu99 -Wall -Werror -DOS_APPLE" )
7
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -fPIC -std=gnu99 -Wall -Werror -DOS_APPLE" )
8
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -fPIC -std=c++11 -Wall -Werror -DOS_APPLE" )
8
9
9
10
# include files
10
11
include_directories (${TOP_DIR} /thirdparty/sysutils/include )
11
12
include_directories (${TOP_DIR} /include )
12
13
13
14
# liteplayer files
14
- set (CODECS_SRC
15
- ${TOP_DIR} /thirdparty/codecs/mp3-mad/bit.c
16
- ${TOP_DIR} /thirdparty/codecs/mp3-mad/decoder.c
17
- ${TOP_DIR} /thirdparty/codecs/mp3-mad/fixed.c
18
- ${TOP_DIR} /thirdparty/codecs/mp3-mad/frame.c
19
- ${TOP_DIR} /thirdparty/codecs/mp3-mad/huffman.c
20
- ${TOP_DIR} /thirdparty/codecs/mp3-mad/layer12.c
21
- ${TOP_DIR} /thirdparty/codecs/mp3-mad/layer3.c
22
- ${TOP_DIR} /thirdparty/codecs/mp3-mad/stream.c
23
- ${TOP_DIR} /thirdparty/codecs/mp3-mad/synth.c
24
- ${TOP_DIR} /thirdparty/codecs/mp3-mad/timer.c
25
- ${TOP_DIR} /thirdparty/codecs/mp3-mad/version .c
26
- ${TOP_DIR} /thirdparty/codecs/aac-helix/aacdec.c
27
- ${TOP_DIR} /thirdparty/codecs/aac-helix/aactabs.c
28
- ${TOP_DIR} /thirdparty/codecs/aac-helix/bitstream.c
29
- ${TOP_DIR} /thirdparty/codecs/aac-helix/buffers.c
30
- ${TOP_DIR} /thirdparty/codecs/aac-helix/dct4.c
31
- ${TOP_DIR} /thirdparty/codecs/aac-helix/decelmnt.c
32
- ${TOP_DIR} /thirdparty/codecs/aac-helix/dequant.c
33
- ${TOP_DIR} /thirdparty/codecs/aac-helix/fft.c
34
- ${TOP_DIR} /thirdparty/codecs/aac-helix/filefmt.c
35
- ${TOP_DIR} /thirdparty/codecs/aac-helix/huffman.c
36
- ${TOP_DIR} /thirdparty/codecs/aac-helix/hufftabs.c
37
- ${TOP_DIR} /thirdparty/codecs/aac-helix/imdct.c
38
- ${TOP_DIR} /thirdparty/codecs/aac-helix/noiseless.c
39
- ${TOP_DIR} /thirdparty/codecs/aac-helix/pns.c
40
- ${TOP_DIR} /thirdparty/codecs/aac-helix/sbr.c
41
- ${TOP_DIR} /thirdparty/codecs/aac-helix/sbrfft.c
42
- ${TOP_DIR} /thirdparty/codecs/aac-helix/sbrfreq.c
43
- ${TOP_DIR} /thirdparty/codecs/aac-helix/sbrhfadj.c
44
- ${TOP_DIR} /thirdparty/codecs/aac-helix/sbrhfgen.c
45
- ${TOP_DIR} /thirdparty/codecs/aac-helix/sbrhuff.c
46
- ${TOP_DIR} /thirdparty/codecs/aac-helix/sbrimdct.c
47
- ${TOP_DIR} /thirdparty/codecs/aac-helix/sbrmath.c
48
- ${TOP_DIR} /thirdparty/codecs/aac-helix/sbrqmf.c
49
- ${TOP_DIR} /thirdparty/codecs/aac-helix/sbrside.c
50
- ${TOP_DIR} /thirdparty/codecs/aac-helix/sbrtabs.c
51
- ${TOP_DIR} /thirdparty/codecs/aac-helix/stproc.c
52
- ${TOP_DIR} /thirdparty/codecs/aac-helix/tns.c
53
- ${TOP_DIR} /thirdparty/codecs/aac-helix/trigtabs.c)
15
+ file (GLOB CODECS_SRC src
16
+ ${TOP_DIR} /thirdparty/codecs/pvmp3/src/*.cpp
17
+ ${TOP_DIR} /thirdparty/codecs/pvaac/*.cpp
18
+ )
54
19
set (LITEPLAYER_SRC
55
20
${CODECS_SRC}
56
21
${TOP_DIR} /src/esp_adf/audio_element.c
57
22
${TOP_DIR} /src/esp_adf/audio_event_iface.c
58
- ${TOP_DIR} /src/audio_decoder/mp3_mad_wrapper .c
23
+ ${TOP_DIR} /src/audio_decoder/mp3_pvmp3_wrapper .c
59
24
${TOP_DIR} /src/audio_decoder/mp3_decoder.c
60
- ${TOP_DIR} /src/audio_decoder/aac_helix_wrapper .c
25
+ ${TOP_DIR} /src/audio_decoder/aac_pvaac_wrapper .c
61
26
${TOP_DIR} /src/audio_decoder/aac_decoder.c
62
27
${TOP_DIR} /src/audio_decoder/m4a_decoder.c
63
28
${TOP_DIR} /src/audio_decoder/wav_decoder.c
@@ -71,19 +36,23 @@ set(LITEPLAYER_SRC
71
36
${TOP_DIR} /src/liteplayer_debug.c
72
37
${TOP_DIR} /src/liteplayer_main.c
73
38
${TOP_DIR} /src/liteplayer_listplayer.c
74
- ${TOP_DIR} /src/liteplayer_ttsplayer.c)
39
+ ${TOP_DIR} /src/liteplayer_ttsplayer.c
40
+ )
75
41
add_library (liteplayer_core STATIC ${LITEPLAYER_SRC} )
76
42
target_compile_options (liteplayer_core PRIVATE
77
- -Wno-error=int-to-pointer-cast
78
- #platform: __arm__/__amd64__, __GNUC__
79
43
-D__amd64__
80
- #libmad: LITEPLAYER_CONFIG_MAD_FPM_64BIT/LITEPLAYER_CONFIG_MAD_FPM_ARM/LITEPLAYER_CONFIG_MAD_FPM_DEFAULT
81
- -DLITEPLAYER_CONFIG_MAD_FPM_DEFAULT
82
- #helix-aac: don't config it if sbr isn't needed for rtos devices
44
+ -DLITEPLAYER_CONFIG_SINK_FIXED_S16LE
83
45
-DLITEPLAYER_CONFIG_AAC_SBR
84
- #sink: don't config it if sink support S24LE/S32LE
85
- -DLITEPLAYER_CONFIG_SINK_FIXED_S16LE)
86
- target_include_directories (liteplayer_core PRIVATE ${TOP_DIR} /thirdparty/codecs ${TOP_DIR} /src)
46
+ -DOSCL_IMPORT_REF= -DOSCL_EXPORT_REF= -DOSCL_UNUSED_ARG=\(void\)
47
+ -Wno-error=unused-value -Wno-error=unused-function -Wno-error=narrowing
48
+ )
49
+ target_include_directories (liteplayer_core PRIVATE
50
+ ${TOP_DIR} /thirdparty/codecs
51
+ ${TOP_DIR} /thirdparty/codecs/pvmp3/include
52
+ ${TOP_DIR} /thirdparty/codecs/pvmp3/src
53
+ ${TOP_DIR} /thirdparty/codecs/pvaac
54
+ ${TOP_DIR} /src
55
+ )
87
56
88
57
# sysutils files
89
58
set (SYSUTILS_SRC
@@ -94,5 +63,6 @@ set(SYSUTILS_SRC
94
63
${TOP_DIR} /thirdparty/sysutils/source /cutils/memdbg.c
95
64
${TOP_DIR} /thirdparty/sysutils/source /cutils/mlooper.c
96
65
${TOP_DIR} /thirdparty/sysutils/source /cutils/mqueue.c
97
- ${TOP_DIR} /thirdparty/sysutils/source /cutils/ringbuf.c)
66
+ ${TOP_DIR} /thirdparty/sysutils/source /cutils/ringbuf.c
67
+ )
98
68
add_library (sysutils STATIC ${SYSUTILS_SRC} )
0 commit comments