aboutsummaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJean-Yves Avenard <[email protected]>2018-03-19 14:57:07 +0100
committerPaul Adenot <[email protected]>2018-03-19 14:57:07 +0100
commit789eaaa3b0d77b55e110353972d6713889f510ea (patch)
treefbeb48958ab83c329193f37c54133c9bc68aac4a /CMakeLists.txt
parentc88a484e1aac878419946334c49d35d6948beec7 (diff)
downloadcubeb-789eaaa3b0d77b55e110353972d6713889f510ea.tar.gz
cubeb-789eaaa3b0d77b55e110353972d6713889f510ea.zip
Multi-channels support for windows/mac/linux (#426)
* Add QUAD and QUAD_LFE layouts. * Remove dual mono layout. It makes no sense to have a case for those as the data structure used (a bitmask) do not allow to represent this channel layout (a channel can only be present once). As such it was a non-functional layout * Fix up cubeb_pulse compilation using C++ keyword. * Remove the concept of preferred layout. Channel layout is derived by the content being played. The concept of preferred layout is meaningless. Either we have a layout defined, or we don't. There's no in-between. So we remove it. * Remove CHANNEL_MONO concept. * Add cubeb_sample_size convenience method. * Rework cubeb_mixer. This completely replace the existing remixer which had serious limitations: 1- Had no memory bound checks 2- Could only downmix 5.1 and 7.1 to stereo. This mixer allows to convert from any sane layout to any other and work directly on interleaved samples. This cubeb_mixer doesn't have an API compatible with the previous one. This commit is non-fonctional, and was split for ease of review. * Fix remixing on mac, windows and pulse backend. * Make cubeb_mixer creation infallible. Rather than ignore nonsensical layouts, we attempt to play it according to the stream channels count instead. The audio data will be played as-is, dropping the extra channels or inserting silence where needed. * User proper sample size when calculating offsets. Should the user data be of a different type to what the AudioUnit output is set to, we would have written outside the end of our allocated buffer. * Fix input mixing and clarify frames vs samples terminology * If a layout is unknown or invalid, always treat it as plain stereo or mono.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt22
1 files changed, 1 insertions, 21 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8b8e6f8..cdb00f9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -59,6 +59,7 @@ add_library(cubeb
src/cubeb_panner.cpp
src/cubeb_log.cpp
src/cubeb_strings.c
+ src/cubeb_utils.cpp
$<TARGET_OBJECTS:speex>)
target_include_directories(cubeb
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>
@@ -262,27 +263,6 @@ if(BUILD_TESTS)
cubeb_add_test(latency test_latency)
cubeb_add_test(ring_array)
- add_executable(test_mixer test/test_mixer.cpp src/cubeb_mixer.cpp)
- if(USE_AUDIOUNIT)
- target_compile_definitions(test_mixer PRIVATE USE_AUDIOUNIT)
- endif()
- target_include_directories(test_mixer PRIVATE ${gtest_SOURCE_DIR}/include)
- target_include_directories(test_mixer PRIVATE src)
- target_link_libraries(test_mixer PRIVATE cubeb gtest_main)
- add_test(mixer test_mixer)
- add_sanitizers(test_mixer)
- install(TARGETS test_mixer DESTINATION ${CMAKE_INSTALL_PREFIX})
-
cubeb_add_test(utils)
cubeb_add_test(ring_buffer)
-
- if(USE_AUDIOUNIT)
- add_executable(test_deadlock test/test_deadlock.cpp)
- target_include_directories(test_deadlock PRIVATE ${gtest_SOURCE_DIR}/include)
- target_include_directories(test_deadlock PRIVATE src)
- target_link_libraries(test_deadlock PRIVATE cubeb gtest_main)
- add_test(deadlock test_deadlock)
- add_sanitizers(test_deadlock)
- install(TARGETS test_deadlock DESTINATION ${CMAKE_INSTALL_PREFIX})
- endif()
endif()