[alsa-devel] Sample format changes by plugin while playing

Robert Tiemann rtie at gmx.de
Fri Apr 20 09:15:15 CEST 2018



On 04/19/2018 04:34 PM, Ricard Wanderlof wrote:

> I'm curious about this. Do you have a need to reconfigure the sample rate 
> and format while a stream is playing? We had such a use case a while ago, 

Sort of. The input format, however, is fixed in my case. The output
format may be different and must be recovered from the audio stream.
Infrequently, the output format will change while the input format
remains the same.

You can think about it as a compression scheme. I'd like to play such
audio streams without touching any players, that's why I thought about
writing an ALSA plugin for this.

> but ALSA sets up the stream configuration (sample rate etc) when the
> stream is opened (hw_params()) and it doesn't seem to be possible to
> reconfigure it on the fly

This is probably something that my plugin would have to do with its
slave. If this would possible during playback without disrupting the
player, then I'd take this route.


More information about the Alsa-devel mailing list