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?
ALSA Mixer control
Re: ALSA Mixer control
What code are you using to change the ALSA volume level ?
Europaeus sum !
Amare memorentes atque deflentes ad mortem silenter labimur.
Amare memorentes atque deflentes ad mortem silenter labimur.
Re: ALSA Mixer control
Hi Vuott,
I found this link and I did a English translate to get a better understanding of how to change ALSA volume levels.
https://www.gambas-it.org/wiki/index.ph ... er_di_ALSA
I hope this is helpful?
I found this link and I did a English translate to get a better understanding of how to change ALSA volume levels.
https://www.gambas-it.org/wiki/index.ph ... er_di_ALSA
I hope this is helpful?
Re: ALSA Mixer control
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.
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 !
Amare memorentes atque deflentes ad mortem silenter labimur.
Amare memorentes atque deflentes ad mortem silenter labimur.
Re: ALSA Mixer control
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.
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.
Re: ALSA Mixer control
In ALSA A.P.I.:
https://www.alsa-project.org/alsa-doc/a ... er_8h.html
https://www.alsa-project.org/alsa-doc/a ... mixer.html
Ehmmm... but... do you know C language ?
How do you do this?
Europaeus sum !
Amare memorentes atque deflentes ad mortem silenter labimur.
Amare memorentes atque deflentes ad mortem silenter labimur.
Re: ALSA Mixer control
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?
From the desktop (Volume, Audio Mixer, Output Devices, Advanced).
I set the latency offset directly from the mixer from within Ubuntu as within this image, I hope this is helpful?
From the desktop (Volume, Audio Mixer, Output Devices, Advanced).
- Attachments
-
- ALSA mixer.png (29.86 KiB) Viewed 1833 times
Re: ALSA Mixer control
Darn, we should find out how (the specific external ALSA function) that program handles latency.
We should read its source file.
Europaeus sum !
Amare memorentes atque deflentes ad mortem silenter labimur.
Amare memorentes atque deflentes ad mortem silenter labimur.
Re: ALSA Mixer control
So far, I’ve found this ALSA program to test latency:
https://www.alsa-project.org/wiki/Test_latency.c
https://git.alsa-project.org/?p=alsa-li ... /latency.c;
https://www.alsa-project.org/wiki/Test_latency.c
https://git.alsa-project.org/?p=alsa-li ... /latency.c;
Europaeus sum !
Amare memorentes atque deflentes ad mortem silenter labimur.
Amare memorentes atque deflentes ad mortem silenter labimur.
Re: ALSA Mixer control
I will take a look as these links, to get some idea of what is going on and see what is possible.