Skip to content

Commit 57b9b5d

Browse files
authored
cmake build errors (#1972)
1 parent a614f90 commit 57b9b5d

File tree

22 files changed

+27
-83
lines changed

22 files changed

+27
-83
lines changed

src/AudioTools/AudioCodecs/CodecMTS.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ class MTSDecoder : public AudioDecoder {
364364
int elementaryPID =
365365
((pmt[cursor + 1] & 0x1F) << 8) | (pmt[cursor + 2] & 0xFF);
366366
LOGI("-- Stream Type: 0x%02X(%d) [%s] for Elementary PID: 0x%04X(%d)",
367-
streamType, streamType, toStr(streamType), elementaryPID,
367+
(int)streamType, (int)streamType, toStr(streamType), elementaryPID,
368368
elementaryPID);
369369

370370
if (isStreamTypeActive(streamType)) {

src/AudioTools/CoreAudio/AudioStreams.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,8 +1343,7 @@ class InputMerge : public AudioStream {
13431343

13441344
/// Adds a new input stream with 1 channel
13451345
void add(Stream &in, int channelCount, float weight = 1.0) {
1346-
MergeRecord rec(in, channelCount, weight);
1347-
;
1346+
MergeRecord rec(&in, channelCount, weight);
13481347
records.push_back(rec);
13491348
total_channel_count += channelCount;
13501349
}
@@ -1382,6 +1381,7 @@ class InputMerge : public AudioStream {
13821381
Stream *stream = nullptr;
13831382
int channels = 0;
13841383
float weight = 1.0;
1384+
MergeRecord() = default;
13851385
MergeRecord(Stream *str, int ch, float w) {
13861386
stream = str;
13871387
channels = ch;

tests-cmake/CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0")
77
project(tests)
88
set (CMAKE_CXX_STANDARD 11)
99
set (DCMAKE_CXX_FLAGS "-Werror" )
10-
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
11-
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
12-
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
13-
endif()
10+
# add_compile_options(-Wstack-usage=1024)
1411

1512
include(FetchContent)
1613

tests-cmake/codec/CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ cmake_minimum_required(VERSION 3.20)
44
project(tests-codec)
55
set (CMAKE_CXX_STANDARD 11)
66
set (DCMAKE_CXX_FLAGS "-Werror" )
7-
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
8-
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
9-
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
10-
endif()
7+
# add_compile_options(-Wstack-usage=1024)
118

129

1310
include(FetchContent)

tests-cmake/codec/aac-faad/CMakeLists.txt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ cmake_minimum_required(VERSION 2.34)
33
# set the project name
44
project(aac-faad)
55
set (CMAKE_CXX_STANDARD 11)
6-
set (DCMAKE_CXX_FLAGS "-Werror")
7-
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
8-
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
9-
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
10-
endif()
6+
set (DCMAKE_CXX_FLAGS -Werror )
7+
# add_compile_options(-Wstack-usage=1024)
8+
119
include(FetchContent)
1210

1311
# Build with arduino-audio-tools
@@ -27,11 +25,11 @@ endif()
2725
add_executable (aac-faad aac-faad.cpp)
2826

2927
# set preprocessor defines
30-
target_compile_definitions(aac-faad PUBLIC -DARDUINO -DUSE_PORTAUDIO -DIS_DESKTOP -DANALYSIS)
28+
target_compile_definitions(aac-faad PUBLIC -DARDUINO -DIS_DESKTOP -DANALYSIS)
3129

3230
# OS/X might need this setting for core audio
3331
#target_compile_definitions(portaudio PUBLIC -DPA_USE_COREAUDIO=1)
3432

3533
# specify libraries
36-
target_link_libraries(aac-faad portaudio arduino_emulator libfaad arduino-audio-tools)
34+
target_link_libraries(aac-faad arduino_emulator libfaad arduino-audio-tools)
3735

tests-cmake/codec/aac-faad/aac-faad.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "Arduino.h"
22
#include "AudioTools.h"
33
#include "AudioTools/AudioCodecs/CodecAACFAAD.h"
4-
#include "AudioTools/AudioLibs/PortAudioStream.h"
4+
//#include "AudioTools/AudioLibs/PortAudioStream.h"
55
#include "audio.h"
66

77
using namespace audio_tools;

tests-cmake/codec/aac-fdk-encode/CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ cmake_minimum_required(VERSION 3.20)
44
project(aac-fdk-encode)
55
set (CMAKE_CXX_STANDARD 11)
66
set (DCMAKE_CXX_FLAGS "-Werror")
7-
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
8-
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
9-
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
10-
endif()
7+
# add_compile_options(-Wstack-usage=1024)
118

129
include(FetchContent)
1310

tests-cmake/codec/aac-fdk/CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ cmake_minimum_required(VERSION 3.20)
44
project(aac-fdk)
55
set (CMAKE_CXX_STANDARD 11)
66
set (DCMAKE_CXX_FLAGS "-Werror")
7-
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
8-
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
9-
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
10-
endif()
7+
# add_compile_options(-Wstack-usage=1024)
118
include(FetchContent)
129

1310
# Build with arduino-audio-tools

tests-cmake/codec/aac-helix/CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ cmake_minimum_required(VERSION 3.20)
44
project(aac-helix)
55
set (CMAKE_CXX_STANDARD 11)
66
set (DCMAKE_CXX_FLAGS "-Werror")
7-
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
8-
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
9-
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
10-
endif()
7+
# add_compile_options(-Wstack-usage=1024)
118
include(FetchContent)
129

1310
# Build with arduino-audio-tools

tests-cmake/codec/container-avi-movie/CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ project(container-avi-movie)
55
set (CMAKE_CXX_STANDARD 11)
66
set (DCMAKE_CXX_FLAGS "-Werror")
77

8-
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
9-
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
10-
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
11-
endif()
8+
# add_compile_options(-Wstack-usage=1024)
129
include(FetchContent)
1310

1411
# Add Portaduio for desktop build

0 commit comments

Comments
 (0)