[alsa-devel] On non-rewindability of resamplers

Raymond Yau superquad.vortex2 at gmail.com
Sat Apr 26 03:32:28 CEST 2014


2014-04-25 22:09 GMT+08:00 Alexander E. Patrakov <patrakov at gmail.com>:

> 25.04.2014 12:19, David Henningsson wrote:
>
>> I understand that you have a mathematically perfect approach to this, as
>> well as other algorithms. This would indeed be the best goal, but given
>> an imperfect world, where we're forced to choose between
>>   1) no rewinding at all
>>   2) imperfect rewinding in the sense that it sometimes can produce
>> hearable artifacts
>>
>> ...I'm not sure 1) is always the right choice...
>>
>
> Understood. But IMHO (2) with a warning would be better than the current
> situation of (2) without any indication of the problem.


Does extplug or ioplug plugin support rewind ?

http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_external_plugins.html

The filter-type plugin is a plugin to convert the PCM signals from the
input and feeds to the output. Thus, this plugin always needs a slave PCM
as its output.

The plugin can modify the format and the channels of the input/output PCM.
It can *not* modify the sample rate (because of simplicity reason).

1) DCA plugin convert 6 channel to compress audio at fixed sample rate

seem only allow sequential write and no random write
2)  The I/O-type plugin is a PCM plugin to work as the input or output
terminal point, i.e. as a user-space PCM driver.

mmap_rw specifies whether the plugin behaves in the pseudo mmap mode. When
this value is set to 1, the plugin creates always a local buffer and
performs read/write calls using this buffer as if it's mmapped.

does this mean ioplug can have its own local buffer which is different from
the slave ?

e.g. a52_pointer seem use delay of the slave

3) Do pulseaudio keep a copy of client 's buffer ?

 when do pulseauido mix two or more client's buffer ( before write to the
sound card or after receive data from client )

seem pulse plugin is not rewindable too


More information about the Alsa-devel mailing list