cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding sound optimization in AVAS

Aishwaryaum
Associate II

Hello all,

A very good morning, I hope you all have the good day.

I am developing the AVAS project taking the base code(shown in the snippet) from the AutoDevKit.

Here my requirement is I need to increase the sound from speed 0 to 20kmph and sound should decrease from 21 to 30kmph. For this requirement I need to increase and decrease the sound gradually. Initially I was using playsound() API where gain is fixed so I was not able to increase or decrease the sound. Now I am using playsoundwithgain() API, where I am changing the gain with respect to the speed this is affecting the quality of sound and I am getting so much of noise.

So I wanted to know

1. How to increase and decrease the sound linearly which API I need to use?.

2. Which parameter should be varied with respect to speed whether volume or gain or something something else has to be done.

It will be very useful to me if I get suggestions on my issues.

Aishwaryaum_0-1727416129427.png

Thanks & Regards,

Aishwarya UM

 

1 REPLY 1
Max VIZZINI
ST Employee

Hi,

I would like to remind that this application is just an example therefore there are no proper API, the code is just in the main() function.

The sound increase in term of speed is obtained by skipping samples in playback, therefore the steps are discrete and not linear.

The volume is increased/decreased by multiplying / dividing by 2 the samples, therefore again the steps are discrete and not linear / continuous.

Have a look to what is possible with the current implementation in the youtube video:

https://www.youtube.com/watch?v=yanj0O5g5Zg&t=330s&pp=ygUXYXZhcyBzdG1pY3JvZWxlY3Ryb25pY3M%3D

Considering we are not developing further this AVAS example for the moment, we could introduce an engineering company to support your developments.

Best Regards,

AutoDevKit Team