Commit graph

17 commits

Author SHA1 Message Date
Wim Taymans
13b8c23767 Don't use SPA_AUDIO_MAX_CHANNELS directly
Make a MAX_CHANNELS define and use that one in code. This makes it
easier to change the constant later.
2025-10-21 09:43:06 +02:00
Wim Taymans
dd6c9de604 tests: set the flags on buffers correctly 2025-06-25 10:34:50 +02:00
Wim Taymans
5d2773a554 audioconvert: fix test
Enable upmix manually because we test that.
2023-03-22 15:41:06 +01:00
Barnabás Pőcze
934ab3036e treewide: use SPDX tags to specify copyright information
SPDX tags make the licensing information easy to understand and clear,
and they are machine parseable.

See https://spdx.dev for more information.
2023-02-16 10:54:48 +00:00
Wim Taymans
b9999b292d channelmix: improve mixing setup
Handle MONO layout as a real layout, not just like FC. This means it
does not share the FC mixing weights.
Only distribute and combine MONO channels when the target is also
MONO, enable normalization in this case.
Otherwise downmix and upmix the mono channels like any other channel,
which will make it respect the upmix and other settings.
Change some tests with this new way of doing things.

Fixes #3010
2023-02-06 21:05:23 +01:00
Wim Taymans
bb002a3eef test: add test for 6p1 to 5p1 with remapped REAR
See #2809
2022-11-09 09:41:21 +01:00
Wim Taymans
39bfc0cb56 test: add more 5p1 to 6p1 tests
See #2809
2022-11-09 09:24:03 +01:00
Wim Taymans
a500abaf90 tests: add some more 6p1 conversion tests
Also add a 6p1 to 5p1 downmix test.

See #2809
2022-11-08 18:10:11 +01:00
Pauli Virtanen
d82cd959e7 audioconvert: add different channel remap testcase 2022-07-18 20:33:05 +02:00
Wim Taymans
4eb81b13ac audioconvert: add test
Add test for F32_7p1_remapped to F32P_7p1_remapped

See #1324
2022-07-18 18:55:30 +02:00
Wim Taymans
08d918432f tests: add more audioconvert remap test
Add tests for all permutations of input/output remappings.
2022-07-06 20:57:04 +02:00
Wim Taymans
4036b8a3f0 tests: add audioconvert test
Add a little test framework for writing end-to-end audioconvert tests.
2022-07-06 19:20:16 +02:00
Pauli Virtanen
6bfe9a362c audioconvert: avoid crash on 64 channels + monitor enabled
this->monitor enabled adds an additional port in reconfigure_mode. If
there was already the maximum 64, this will crash.

Make maximum number of ports one larger than max channels to avoid
problems.
2022-06-23 09:11:25 +00:00
Peter Hutterer
49f3d5842e test: replace all spa_assert() macros with spa_assert_se()
These are tests, we never want those to be optimized away.
2021-07-27 10:24:44 +10:00
Peter Hutterer
7697ed0757 treewide: replace strcmp() == 0 with spa_streq()
This change is only done in source files for now, header files will be done
separately.
2021-05-18 22:10:27 +10:00
Haochen Tong
7dd69651b8
test-audioconvert: fix test failure after 7d73f0b8 2020-12-10 14:30:28 +01:00
Wim Taymans
f41720e7db Add PortConfig parameter
Add a new PortConfig parameter to configure ports of elements that
are marked with the SPA_NODE_FLAG_*_PORT_CONFIG. This is used to
configure the operation of the audioconver/audioadapter nodes and
how it should convert the internal format. We want to use the
Profile parameter only for cases where there is an enumeration of
values, like with device configuration.

Add unit tests for audioconvert and adapter to check if they handle
PortConfig correctly.

Make the media session use the PortConfig to dynamically configure
the device nodes.

Remove audio-dsp, it is not used anymore and can/should be implemented
with a simple audioconvert spa node now and some PortConfig.
2019-08-06 12:45:20 +02:00