Wim Taymans
00d8d1472d
channelmix: fix 7.1 to quad downmix
2021-03-01 19:51:14 +01:00
Wim Taymans
00e52ec167
resample: in drain, feed silence in all channels
2021-03-01 18:09:24 +01:00
Wim Taymans
5ae286702e
audioconvert: make sure we update the flags
...
When we get a param update, update with the new flags.
2021-03-01 17:01:46 +01:00
Wim Taymans
d5d8150e05
fmtconvert: prefer planar formats when possible
...
It's easier to convert to and from.
2021-02-26 21:14:35 +01:00
Wim Taymans
50437029a3
channelmix: improve debug, add passthrough state
2021-02-26 21:12:11 +01:00
Wim Taymans
e2181c582d
audioconvert: fix channel remapping some more
...
See #461
2021-02-26 18:40:04 +01:00
Wim Taymans
6ce3705f5e
fmtconvert: fix channel remapping
2021-02-25 17:41:50 +01:00
Wim Taymans
d080cd4819
channelmix: fix 7.1 to stereo and 3.1 downmix
2021-02-25 16:18:40 +01:00
Wim Taymans
44919c83fc
audioconvert: keep better track of param changes
...
Keep track of the param changes with the user counter. Make sure to
flip the serial switch whenever a change is pending. Previously
we copied the param from the channelmixer or follower but that
did not always result in a serial change.
Fixes #764
2021-02-19 09:57:59 +01:00
Wim Taymans
c7b7afa664
audioadapter: fix enum of properties
...
Keep track of the subelement we're iterating in the result index upper
bits. Use enum_sync to iterate each param and switch to the next
element when we run out of params.
See !468
2021-02-17 09:59:00 +01:00
Wim Taymans
ca10c6470f
audioconvert: use sizeof for position size
...
And make the position field a little larger
2021-02-16 15:07:40 +01:00
Frédéric Danis
0061ddd6be
audioconvert: Fix buffer overflow
...
This was introduced by commit c160a063b9
2021-02-16 14:56:17 +01:00
Wim Taymans
91610bd1a9
merger: emit params changed event when reconfiguring
...
The props param changes when the number of channels changes.
2021-02-16 12:34:59 +01:00
Wim Taymans
c160a063b9
audioconvert: handle unexpected channel positions
2021-02-16 12:34:59 +01:00
Wim Taymans
ef98361630
audioconvert: when we reconfigure, emit param changed event
...
When we reconfigure the node, the Props param changes with the
new number of channels.
2021-02-16 12:34:59 +01:00
Wim Taymans
d6afdda898
audioadapter: enumerate node params from follower as well
...
Enumerate the params from the follower as well.
Configure params on the follower and converter.
When follower params changes, emit event.
See !460
2021-02-15 15:43:03 +01:00
Wim Taymans
e7aa15e475
audioadapter: only check port params when changed
2021-02-15 15:39:39 +01:00
Wim Taymans
6c02fd663a
merger: handle monitor mute as well
2021-02-05 17:41:56 +01:00
Wim Taymans
11900bbd67
audioconvert: add missing file
2021-02-05 17:29:43 +01:00
Wim Taymans
1511f19f70
audioconvert: handle monitor volumes
...
Implement monitor volumes in the merger. There are two volumes,
the channel volume and the monitor volume. The monitor volume
is always applied.
By default the monitor volume will now follow the main volume of
the node. This can be disabled with a monitor.channel-volumes
property.
See #674
2021-02-05 17:12:51 +01:00
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
972e740519
Don't advertize formats we don't yet support
...
We don't handle the reverse endian formats yet so make sure we
don't advertize them.
2021-02-05 12:12:44 +01:00
Wim Taymans
47b6ce84b2
channelmix: initialize with float
2021-02-02 11:01:01 +01:00
Wim Taymans
be6410909f
audioadapter: remove some unused code
2021-02-01 15:16:39 +01:00
Wim Taymans
88727afbd2
resample: take already queued sample into account
...
When asking for samples, take into account the amount of samples
we already have converted.
2021-01-18 15:09:54 +01:00
Wim Taymans
51d44e9154
test: improve resampler test
...
Test with different amount of input samples.
2021-01-18 15:08:23 +01:00
Wim Taymans
19be555fa6
audioadapter: run the converter after follower drained
...
When the follower drained, rerun the converter again to let it drain
as well.
2021-01-18 10:29:50 +01:00
Wim Taymans
6b0abd2057
channelmix: Improve unknown channel layout handling
...
Clamp position to valid range. so that AUX becomes UNKNOWN.
If we have one mono source channel and unknown destination, copy it
to all destination channels.
If we have one mono destination channel and unknown source layout,
average all channels.
Otherwise, pair source and dest channels.
See #538
2021-01-15 17:51:07 +01:00
Wim Taymans
d7ff7d098b
audioadapter: don't emit xrun when drained
2021-01-15 09:46:17 +01:00
Wim Taymans
a8faad9f17
fmt: support f32p -> s24s conversion
...
As used by MAudio Fasttrack Pro
See rhbz#916017
2021-01-14 17:58:54 +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
540011f1e3
test-resample: fix unit test
...
Caller should not have to resubmit old samples anymore.
Fixes #551
2021-01-09 10:55:51 +01:00
Wim Taymans
d1f9966a77
resample: implement methods we now call
2021-01-08 17:43:13 +01:00
Wim Taymans
7f007b6bca
resample: tweak the resampler to keep delay number of samples
...
Instead of requiring the upstream node to resubmit the delayed
samples, keep the samples ourselves. The benefit is probably too
small to measure but it simplifies things a lot.
2021-01-08 16:35:26 +01:00
Wim Taymans
7e9ab8b457
resample: first resample the data, then apply the new rate
...
Else we might not have enough input samples for the new rate.
2021-01-08 13:17:06 +01:00
Wim Taymans
461e3db741
tests: fix some leaks
...
See #497
2020-12-21 20:07:02 +01:00
Wim Taymans
32c015d01e
tests: free resample after usage
...
See #497
2020-12-21 19:52:35 +01:00
Wim Taymans
3c7699980f
tests: make arrays a bit larger
...
See #479
2020-12-21 19:38:53 +01:00
Wim Taymans
a25f1a6a1d
acp: pass channelmap around
...
so that we can use it as a default in channelmix
2020-12-18 17:18:53 +01:00
Wim Taymans
05e06f16ba
audioconvert: improve channel remap some more
...
See #461
2020-12-16 12:53:11 +01:00
Wim Taymans
3803055403
audioconvert: remap channels only once
...
for planar formats, we should not remap twice or we undo the
remapping.
See #461
2020-12-16 09:53:29 +01:00
Wim Taymans
0e910a9d03
audioconvert: correctly remap in fmtconvert
...
Only remap channels on the planar buffers.
See #472
2020-12-15 09:47:37 +01:00
Wim Taymans
0f528dc73c
splitter: place destination address in tmp array
...
We then remap the tmp array to the destination array.
Fixes #477
2020-12-14 09:49:44 +01:00
Haochen Tong
7dd69651b8
test-audioconvert: fix test failure after 7d73f0b8
2020-12-10 14:30:28 +01:00
Wim Taymans
7d73f0b8d0
audioconvert: use some defines for the max ports
2020-12-09 20:32:44 +01:00
Wim Taymans
4e7be858e4
node: Add ParamBegin/End
...
Use these commands to mark the begin and end of a series of Param
enumerations and configuration, like when doing format negotiation. The
idea is that the device can remain open while we do this.
Use this in adapter when negotiating a format.
2020-12-09 17:10:52 +01:00
Wim Taymans
78e7a45e6e
audioconvert: remap channels
...
We also need to remap channels for the splitter and merger.
Remember the port-config format and its channel layout. Internally,
we use a canonical channel layout which is simply all channels sorted
by id. Remap the channels accordingly.
Fixes #445
2020-12-07 14:21:21 +01:00
Wim Taymans
2d8a7809f1
audioconvert: set port-config flags
2020-12-07 14:20:56 +01:00
Wim Taymans
136fc028a5
prefer S24 over S16 formats
...
Prefer the higher quality over performance.
Fixes #457
2020-12-06 10:37:40 +01:00