Skip to content

How to build an Audio compressor with SPDIF (Toslink) Input / Output #2015

Answered by pschatzmann
wavoigt asked this question in Q&A
Discussion options

You must be logged in to vote

If you are ok with mono 16bits you can use the Compressor provided by the AudioEffects: if you have a stereo imput it mixes the input into mono and just provides 2 identical mono outputs.
If you want something else, I suggest that you implement your own Stereo Compressor Stream class: you can use the exististing implementation as starting point, just using a separate Compressor for each channel.

You could also try to implement your own logic chaining a VolumeMeter and VolumeStream and updating the volume based on what's provided by the meter.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@wavoigt
Comment options

@pschatzmann
Comment options

Answer selected by pschatzmann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants