Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/AudioTools/AudioCodecs/CodecMTS.h
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ class MTSDecoder : public AudioDecoder {
int elementaryPID =
((pmt[cursor + 1] & 0x1F) << 8) | (pmt[cursor + 2] & 0xFF);
LOGI("-- Stream Type: 0x%02X(%d) [%s] for Elementary PID: 0x%04X(%d)",
streamType, streamType, toStr(streamType), elementaryPID,
(int)streamType, (int)streamType, toStr(streamType), elementaryPID,
elementaryPID);

if (isStreamTypeActive(streamType)) {
Expand Down
4 changes: 2 additions & 2 deletions src/AudioTools/CoreAudio/AudioStreams.h
Original file line number Diff line number Diff line change
Expand Up @@ -1331,8 +1331,7 @@ class InputMerge : public AudioStream {

/// Adds a new input stream with 1 channel
void add(Stream &in, int channelCount, float weight = 1.0) {
MergeRecord rec(in, channelCount, weight);
;
MergeRecord rec(&in, channelCount, weight);
records.push_back(rec);
total_channel_count += channelCount;
}
Expand Down Expand Up @@ -1370,6 +1369,7 @@ class InputMerge : public AudioStream {
Stream *stream = nullptr;
int channels = 0;
float weight = 1.0;
MergeRecord() = default;
MergeRecord(Stream *str, int ch, float w) {
stream = str;
channels = ch;
Expand Down
5 changes: 1 addition & 4 deletions tests-cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0")
project(tests)
set (CMAKE_CXX_STANDARD 11)
set (DCMAKE_CXX_FLAGS "-Werror" )
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
endif()
# add_compile_options(-Wstack-usage=1024)

include(FetchContent)

Expand Down
5 changes: 1 addition & 4 deletions tests-cmake/codec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ cmake_minimum_required(VERSION 3.20)
project(tests-codec)
set (CMAKE_CXX_STANDARD 11)
set (DCMAKE_CXX_FLAGS "-Werror" )
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
endif()
# add_compile_options(-Wstack-usage=1024)


include(FetchContent)
Expand Down
12 changes: 5 additions & 7 deletions tests-cmake/codec/aac-faad/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ cmake_minimum_required(VERSION 2.34)
# set the project name
project(aac-faad)
set (CMAKE_CXX_STANDARD 11)
set (DCMAKE_CXX_FLAGS "-Werror")
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
endif()
set (DCMAKE_CXX_FLAGS -Werror )
# add_compile_options(-Wstack-usage=1024)

include(FetchContent)

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

# set preprocessor defines
target_compile_definitions(aac-faad PUBLIC -DARDUINO -DUSE_PORTAUDIO -DIS_DESKTOP -DANALYSIS)
target_compile_definitions(aac-faad PUBLIC -DARDUINO -DIS_DESKTOP -DANALYSIS)

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

# specify libraries
target_link_libraries(aac-faad portaudio arduino_emulator libfaad arduino-audio-tools)
target_link_libraries(aac-faad arduino_emulator libfaad arduino-audio-tools)

2 changes: 1 addition & 1 deletion tests-cmake/codec/aac-faad/aac-faad.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "Arduino.h"
#include "AudioTools.h"
#include "AudioTools/AudioCodecs/CodecAACFAAD.h"
#include "AudioTools/AudioLibs/PortAudioStream.h"
//#include "AudioTools/AudioLibs/PortAudioStream.h"
#include "audio.h"

using namespace audio_tools;
Expand Down
5 changes: 1 addition & 4 deletions tests-cmake/codec/aac-fdk-encode/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ cmake_minimum_required(VERSION 3.20)
project(aac-fdk-encode)
set (CMAKE_CXX_STANDARD 11)
set (DCMAKE_CXX_FLAGS "-Werror")
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
endif()
# add_compile_options(-Wstack-usage=1024)

include(FetchContent)

Expand Down
5 changes: 1 addition & 4 deletions tests-cmake/codec/aac-fdk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ cmake_minimum_required(VERSION 3.20)
project(aac-fdk)
set (CMAKE_CXX_STANDARD 11)
set (DCMAKE_CXX_FLAGS "-Werror")
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
endif()
# add_compile_options(-Wstack-usage=1024)
include(FetchContent)

# Build with arduino-audio-tools
Expand Down
5 changes: 1 addition & 4 deletions tests-cmake/codec/aac-helix/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ cmake_minimum_required(VERSION 3.20)
project(aac-helix)
set (CMAKE_CXX_STANDARD 11)
set (DCMAKE_CXX_FLAGS "-Werror")
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
endif()
# add_compile_options(-Wstack-usage=1024)
include(FetchContent)

# Build with arduino-audio-tools
Expand Down
5 changes: 1 addition & 4 deletions tests-cmake/codec/container-avi-movie/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ project(container-avi-movie)
set (CMAKE_CXX_STANDARD 11)
set (DCMAKE_CXX_FLAGS "-Werror")

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

# Add Portaduio for desktop build
Expand Down
5 changes: 1 addition & 4 deletions tests-cmake/codec/container-avi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ project(container-avi)
set (CMAKE_CXX_STANDARD 11)
set (DCMAKE_CXX_FLAGS "-Werror")

if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
endif()
# add_compile_options(-Wstack-usage=1024)

include(FetchContent)

Expand Down
5 changes: 1 addition & 4 deletions tests-cmake/codec/container-binary/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ cmake_minimum_required(VERSION 3.20)
project(container-binary)
set (CMAKE_CXX_STANDARD 11)
set (DCMAKE_CXX_FLAGS "-Werror")
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
endif()
# add_compile_options(-Wstack-usage=1024)
include(FetchContent)

# Build with arduino-audio-tools
Expand Down
5 changes: 1 addition & 4 deletions tests-cmake/codec/container-m4a/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ cmake_minimum_required(VERSION 3.20)
project(container-m4a)
set (CMAKE_CXX_STANDARD 11)
set (DCMAKE_CXX_FLAGS "-Werror")
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
endif()
# add_compile_options(-Wstack-usage=1024)
include(FetchContent)

# Build with arduino-audio-tools
Expand Down
5 changes: 1 addition & 4 deletions tests-cmake/codec/mp3-helix/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ project(mp3-helix)
set (CMAKE_CXX_STANDARD 11)
set (DCMAKE_CXX_FLAGS "-Werror")

if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
endif()
# add_compile_options(-Wstack-usage=1024)

include(FetchContent)

Expand Down
5 changes: 1 addition & 4 deletions tests-cmake/codec/mp3-metadata/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ cmake_minimum_required(VERSION 3.20)
project(mp3-metadata)
set (CMAKE_CXX_STANDARD 11)
set (DCMAKE_CXX_FLAGS "-Werror")
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
endif()
# add_compile_options(-Wstack-usage=1024)

# Build with arduino-audio-tools
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
Expand Down
5 changes: 1 addition & 4 deletions tests-cmake/codec/wav/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ project(wav-test)
set (CMAKE_CXX_STANDARD 11)
set (DCMAKE_CXX_FLAGS "-Werror")

if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
endif()
# add_compile_options(-Wstack-usage=1024)

include(FetchContent)

Expand Down
5 changes: 1 addition & 4 deletions tests-cmake/effects/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ project(effects)
set (CMAKE_CXX_STANDARD 11)
set (DCMAKE_CXX_FLAGS "-Werror")

if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
endif()
# add_compile_options(-Wstack-usage=1024)

# Add Portaduio for desktop build
add_compile_options(-DIS_DESKTOP)
Expand Down
5 changes: 1 addition & 4 deletions tests-cmake/filter-wav/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ project(filter-wav)
set (CMAKE_CXX_STANDARD 11)
set (DCMAKE_CXX_FLAGS "-Werror")

if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
endif()
# add_compile_options(-Wstack-usage=1024)

# Add Portaduio for desktop build
add_compile_options(-DIS_DESKTOP)
Expand Down
5 changes: 1 addition & 4 deletions tests-cmake/filter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ project(filter)
set (CMAKE_CXX_STANDARD 11)
set (DCMAKE_CXX_FLAGS "-Werror")

if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
endif()
# add_compile_options(-Wstack-usage=1024)

# Add Portaduio for desktop build
add_compile_options(-DIS_DESKTOP)
Expand Down
5 changes: 1 addition & 4 deletions tests-cmake/player-wav/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ project(player-wav)
set (CMAKE_CXX_STANDARD 11)
set (DCMAKE_CXX_FLAGS "-Werror")

if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
endif()
# add_compile_options(-Wstack-usage=1024)

# Add Portaduio for desktop build
add_compile_options(-DIS_DESKTOP)
Expand Down
5 changes: 1 addition & 4 deletions tests-cmake/resample/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ cmake_minimum_required(VERSION 3.20)
project(resample)
set (CMAKE_CXX_STANDARD 11)
set (DCMAKE_CXX_FLAGS "-Werror")
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
endif()
# add_compile_options(-Wstack-usage=1024)

# Build with arduino-audio-tools
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
Expand Down
5 changes: 1 addition & 4 deletions tests-cmake/url-test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ cmake_minimum_required(VERSION 3.20)
project(url-test)
set (CMAKE_CXX_STANDARD 11)
set (DCMAKE_CXX_FLAGS "-Werror")
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
endif()
# add_compile_options(-Wstack-usage=1024)

include(FetchContent)

Expand Down