Commit graph

36 commits

Author SHA1 Message Date
Wim Taymans
6249b00b9a audioconvert: add volume ops
Add volume helpers and use this for the monitor output ports so
that we can add volumes to the monitor output signal as well.
2021-02-05 15:08:26 +01:00
Wim Taymans
abe73c9146 meson: use global b_pie to build PIE executables 2021-01-14 16:29:32 +01:00
Wim Taymans
c9354c238f Add -fPIE to installed executables
Fixes #570
2021-01-13 19:40:37 +01:00
Wim Taymans
28f60eaf6f spa: install the spa-resample tool 2020-09-23 11:37:16 +02:00
Simon McVittie
8dcf76f661 audioconvert tests: Default to using an installed libspa-support
This makes installed-tests (see commit b852b58f) do the right thing.
For build-time testing, spa/plugins/audioconvert/meson.build overrides
this with the SPA_PLUGIN_DIR environment variable, and for ad-hoc
testing by developers, pw-uninstalled.sh sets the necessary variables.

Signed-off-by: Simon McVittie <smcv@debian.org>
2020-09-14 18:16:49 +00:00
Simon McVittie
b852b58f82 Optionally install examples and tests
This makes it easier to test PipeWire in its "as-installed" state,
for example in an OS distribution.

The .test metadata files in ${datadir}/installed-tests/${package} are
a convention taken from GNOME's installed-tests initiative, allowing a
generic test-runner like gnome-desktop-testing to discover and run tests
in an automatic way.

The installation path ${libexecdir}/installed-tests/${package} is also
a convention borrowed from GNOME's installed-tests initiative.

In addition to the automated tests, I've installed example executables
in the same place, for manual testing. They could be separated into
a different directory if desired, but they seem like they have more
similarities with the automated tests than differences: both are there
to test that PipeWire works correctly, and neither should be relied on
for production use. Some examples are installed in deeper subdirectories
to avoid name clashes.

Signed-off-by: Simon McVittie <smcv@debian.org>
2020-06-16 17:58:02 +00:00
Wim Taymans
95906ca52e audioconvert: fix compilation 2020-04-04 20:03:11 +02:00
Wim Taymans
6937ec5e63 audioconvert: compile c version with right flags 2020-04-03 18:12:04 +02:00
Wim Taymans
0d1cef6b3a audioconvert: move some things around
To make it easier to add other implementations later.
Improve selection of resampler function
2020-04-03 18:03:42 +02:00
Wim Taymans
a81e269a7e neon: fix neon detection and compilation 2020-04-03 13:30:08 +02:00
Wim Taymans
527dc89365 fmt-ops: add neon optimizations for format conversion 2020-03-30 10:59:21 -04:00
Wim Taymans
67a5dd35be resample: add neon optimizations 2020-03-27 08:27:11 -04:00
Wim Taymans
3a911dfe3b fmt-ops: add avx2 optimized version
Only one optimized version but the sse2 version are compiled with
the avx2 flags so that they get optimized better.
2020-03-16 16:11:29 +01:00
Wim Taymans
6eca935e61 also test optimized versions 2020-03-16 13:08:33 +01:00
Wim Taymans
83f2e890ad tools: add generic resampler tool
Add a tool that can convert the sample rate of an input file and
write it to an output file. This tool can be used to test the
resampler.
2020-02-13 16:46:03 +01:00
Wim Taymans
65caf8832c spa: install in versioned directory
So that we can run old and new plugins side by side.
2020-01-29 15:51:41 +01:00
Wim Taymans
d8eb7ce81f audioconvert: fix avx flags 2019-10-17 09:35:24 +02:00
Wim Taymans
0d35f44fd9 tests: add channelmix test 2019-08-29 14:05:02 +02:00
Wim Taymans
6f8268df40 audioconvert: remove speex resampler
It's slower and less accurate then the native one.
2019-08-07 13:06:14 +02: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
Wim Taymans
9364f64b10 adapter: move to SPA plugin
Move the adapter code to a SPA plugin and make the adapter module
use the plugin instead.
2019-07-10 18:04:59 +02:00
Wim Taymans
d8e399dee9 audioconvert: pass state to functions
Pass some state to convert and channelmix functions. This makes it
possible to select per channel optimized convert functions but
also makes it possible to implement noise shaping later.
Pass the channelmix matrix and volume in the state.
Handle specialized 2 channel s16 -> f32 conversion
2019-03-29 17:39:59 +01:00
Wim Taymans
d260cb19be audioconvert: compile c version separately
Also compile the c versions in a separate module with their own
flags.
2019-03-28 21:07:53 +01:00
Wim Taymans
e7ef13e310 audioconvert: add avx optimizations 2019-03-28 16:45:57 +01:00
Wim Taymans
7f041f4098 audioconvert: improve benchmark
Also include the simd versions in the benchmark
Fix some issues found by new test
2019-03-28 13:26:06 +01:00
Wim Taymans
c8d3d475bb audioconvert: handle more optimizations
Compile an optimized library for the given CPU with the right flags,
then link it with the main library.
2019-03-27 17:58:48 +01:00
Wim Taymans
9c8913437b audioconvert: add simple and faster resampler
Add a sinc based resampler that, unlike speex, avoids memcpy and
works directly on the source data. It also allows for ssse3
optimizations and aligned loads. It will later switch to table
interpolation when doing variable rate.
2019-03-26 12:58:26 +01:00
Wim Taymans
6f586602af audioconvert: add unit test for format conversion
Add unit test for fmt conversion and fix some bugs
Add empty fmt-ops benchmark
2019-01-23 15:59:54 +01:00
Wim Taymans
a6ad8f747f remove spalib 2018-08-14 15:29:25 +02:00
Wim Taymans
ca898a00db work on separating port mixers
Make it possible to assign an arbitary node as the port mixer.
Also remove dynamically added ports.
Improve negotiation and allocation on the mixer ports
Add some more SSE optimisations
Move float mixer from the audio dsp to the port
Remove pw_node_get_free_port() and do things more explicitly.
Handle mixer ports in client-node
2018-07-31 12:23:35 +02:00
Wim Taymans
e869d5bcb0 splitter: add channel splitter
Splits a buffer with multiple non-interleaved channels to multiple
buffers, each with 1 channel.
2018-04-13 20:00:30 +02:00
Wim Taymans
d88b88444d resample: use speex resampler for now 2018-04-10 16:54:15 +02:00
Wim Taymans
b3b47d3fe9 more work on audioconvert
Implement audioconvert as a complex element of fmtconver,
channelmix and resample.
Make copying resample just to test.
Plug the converter into pw_stream.
2018-04-10 15:54:29 +02:00
Wim Taymans
142ef38df9 stream: more work on converter 2018-04-06 18:39:40 +02:00
Wim Taymans
0b4cef586f audioconvert: improvements 2018-04-03 16:29:36 +02:00
Wim Taymans
2cfb206d7c add audioconvert beginnings 2018-04-03 16:29:36 +02:00