adalinbv / aax

AeonWave
Other
29 stars 2 forks source link

Generating sidetone #2

Open minghia opened 5 years ago

minghia commented 5 years ago

Is it possible with the aax library to introduce sidetone from the captured stream? Or am I better off finding a hardware solution?

adalinbv commented 5 years ago

AeonWave supports the chorus effect which can add a signal with a delay of at most 0.07 seconds. I'm not familiar enough with the specifics of a sidetone to be sure that would be enough to simulate it: http://adalin.com/manual/aax_chorus_effect.html

It also supports frequency filters with a resonance factor higher than 1.0 which can be used to simulate the feedback resonance: http://adalin.com/manual/aax_frequency_filter.html

Erik

adalinbv commented 5 years ago

Taking a crash coarse sidetone phenomenon: I take it you are talking about wanted sidetone rather than unwanted one.

You can register a Sensor at the mixer (or an audio-frame) and automaticall mix the captured stream with the rest of the audio, but you can also treat the capture device as a standalone device. In which case you can retrieve the captured buffers one by one and handle them yourself but also feed them back the an emitter object by using aaxEmitterAddBuffer() function as demonstrated in the testcapture.c test utility.

I hope that helps.

Erik

minghia commented 5 years ago

Would the latency be noticeable using this method? That's why I think a hardware solution to sidetone maybe preferable.

adalinbv commented 5 years ago

This will add a delay of at least one frame-time which depending on the refresh-rate may be a problem or not. The default is around 43Hz on most systems but it can be set to a higher frequency if desired.