ALSA Mixer control
Posted
#1
(In Topic #1172)
Regular

I have found some code to change the ALSA volume level and I am making good use of it, now I am looking for more of a general mixer code. One issue is I now have an audio offset delay from the video I am sending across by UDP, I found I can fix this by setting a -1500 ms latency offset via ALSA mixer.
How would I do this from within Gambas to remotely set the latency offset of a default audio device?
Posted
Regular

Europaeus sum !
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Posted
Regular

I found this link and I did a English translate to get a better understanding of how to change ALSA volume levels.
Impostare il volume principale del mixer di ALSA - Gambas-it.org - Wikipedia
I hope this is helpful?
Posted
Regular

I :? suppose you use that code in the 'receiving' program to change the level of ALSA mixer.
You would have to check whether there is a function in the Gambas resources, pertaining to the mixer, that also allows you to manage latency.
Europaeus sum !
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Posted
Regular

As for "a function in the Gambas resources", where would I start on this and where would I look to rework the mixer level for latency (if possible)?
As this is very new to me, working with the ALSA setup.
Posted
Regular

In ALSA A.P.I.:GrantXTV said
As for "a function in the Gambas resources", where would I start on this and where would I look to rework the mixer level for latency (if possible)?
ALSA project - the C library reference: /packaging/alsa-lib/include/mixer.h File Reference
ALSA project - the C library reference: Simple Mixer Interface
Ehmmm… but… do you know C language ?
How do you do this?GrantXTV said
I found I can fix this by setting a -1500 ms latency offset via ALSA mixer.
Europaeus sum !
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Posted
Regular

I set the latency offset directly from the mixer from within Ubuntu as within this image, I hope this is helpful?
<IMG src="">
From the desktop (Volume, Audio Mixer, Output Devices, Advanced).
Posted
Regular

Darn, we should find out how (the specific external ALSA function) that program handles latency.GrantXTV said
I hope this is helpful?
We should read its source file.
Europaeus sum !
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Posted
Regular

Test latency.c - AlsaProject
git.alsa-project.org Git - alsa-lib.git/blob - test/latency.c
Europaeus sum !
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Posted
Regular

1 guest and 0 members have just viewed this.




