ALSA Mixer control

Post

Posted
Rating:
#1 (In Topic #1172)
Regular
GrantXTV is in the usergroup ‘Regular’
 Hi All,

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?
Online now: No Back to the top

Post

Posted
Rating:
#2
Regular
vuott is in the usergroup ‘Regular’
What code are you using to change the ALSA volume level ?

Europaeus sum !

<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Online now: No Back to the top

Post

Posted
Rating:
#3
Regular
GrantXTV is in the usergroup ‘Regular’
Hi Vuott,

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?
Online now: No Back to the top

Post

Posted
Rating:
#4
Regular
vuott is in the usergroup ‘Regular’
Ah, yes, I wrote that page.

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>
Online now: No Back to the top

Post

Posted
Rating:
#5
Regular
GrantXTV is in the usergroup ‘Regular’
 Yes, it is in the receiver part, controlling the main mixer level.

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.
Online now: No Back to the top

Post

Posted
Rating:
#6
Regular
vuott is in the usergroup ‘Regular’

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)?
In ALSA A.P.I.:

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 ?



GrantXTV said

I found I can fix this by setting a -1500 ms latency offset via ALSA mixer.
How do you do this?

Europaeus sum !

<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Online now: No Back to the top

Post

Posted
Rating:
#7
Regular
GrantXTV is in the usergroup ‘Regular’
No, I have worked with C in the passed in editing code, but my programming history is in BASIC, Such as Spectrum Basic, QBasic, PICBasic, Visual Basic and now Gambas.

I set the latency offset directly from the mixer from within Ubuntu as within this image, I hope this is helpful?
<IMG src=""> </IMG>

From the desktop (Volume, Audio Mixer, Output Devices, Advanced).

Image

(Click to enlarge)

Online now: No Back to the top

Post

Posted
Rating:
#8
Regular
vuott is in the usergroup ‘Regular’

GrantXTV said

 I hope this is helpful?
Darn, we should find out how (the specific external ALSA function) that program handles latency.
We should read its source file.  :|

Europaeus sum !

<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Online now: No Back to the top

Post

Posted
Rating:
#9
Regular
vuott is in the usergroup ‘Regular’

Europaeus sum !

<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Online now: No Back to the top

Post

Posted
Rating:
#10
Regular
GrantXTV is in the usergroup ‘Regular’
I will take a look as these links, to get some idea of what is going on and see what is possible.
Online now: No Back to the top
1 guest and 0 members have just viewed this.