volume control #1043
-
Hi, Only mods: uncommented copier.copy(filler) to get both channels, It is working, but the volume is low, and the volume control is not working. I get the same sound level whatever I set, for example (0.01 volume is the same as 1) One more question: is it possible to get lower latency? The main source is a buffer, or a codec? regards, |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
In the example the volume.begin() is missing, therefore you don't see any impact! The stream A2DP examples add an additional layer of buffers with the corresponding lag. However don't expect a big difference: A2DP seems to have a big lag because if all the internal bufferung where we do not have any influence. ps. I also corrected the bug in the A2DPStream which was setting the initial volume a little too low and removed the VolumeStream from the example to use the built in volume functionality of the A2DP library. I am aware, that this is not adressing your issue, but it helps to simplify the example. If you don't upgrade, I recommend that you also call a2dpStream,setVolume(1.0) in your sketch. |
Beta Was this translation helpful? Give feedback.
-
I tried the upgradede streams example. |
Beta Was this translation helpful? Give feedback.
-
It seems that this example got completely messed up. I committed the correction that brings it up to what it is supposed to do... |
Beta Was this translation helpful? Give feedback.
-
The base-i2s-a2dp is working now, thank you. Is there a way to add volume control (increasing the volume) to the mic input i2s in the base api? Boosting the a2dp output is not the same. I hacked the NumberFormatConverterStreamT class to get higher volume, it's working, but not really elegant solution. :-) One more question: how to use filler in the base api? (either on i2s or a2dp, in this case no difference) |
Beta Was this translation helpful? Give feedback.
-
You can still add the VolumeStream to the chain. |
Beta Was this translation helpful? Give feedback.
In the example the volume.begin() is missing, therefore you don't see any impact!
The stream A2DP examples add an additional layer of buffers with the corresponding lag.
Therefore I am recommending to use the basic API examples instead for A2DP
However don't expect a big difference: A2DP seems to have a big lag because if all the internal bufferung where we do not have any influence.
ps. I also corrected the bug in the A2DPStream which was setting the initial volume a little too low and removed the VolumeStream from the example to use the built in volume functionality of the A2DP library. I am aware, that this is not adressing your issue, but it helps to simplify the example. If you don't…