Searching audio amplitude for a graphic audio interface.

Discussion on the (deprecated) VideoLAN Server application as well as the miniSAPserver stream announcer. This is not about VLC!
Forum rules
Please do not post VLC related questions in this forum category. See the Forum Rules for more information.
Ronald

Searching audio amplitude for a graphic audio interface.

Postby Ronald » 08 Apr 2005 14:07

I'm doing a graphic audio interface, representing audio amplitude in times, that i'll integrate with VLC.
I've found the audio volume (Pi_soft ), but is there audio amplitude in a type, a function, or a variable ?
(Audio_format_t) input doesn't comport audio amplitude...
Does VLC calculate the average of audio amplitude somewhere?
Thx to everybody who can help me.
++

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Postby dionoea » 08 Apr 2005 15:46

you should look at the visualisation code source. I bet it uses the amplitude somewhere (in modules/visualisation in the VLC trunk)
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

CorteX

same Problem

Postby CorteX » 18 Apr 2005 13:34

I ve built VLC, on a mac OSX.
I'm checking modules to find audio amplitude and any parameter on audio.
Someone may have an idea of how does VLC work on audio reading and if it's possible to extract amplitude (variable) or anything else.
I'm waiting for an answer, don't hesitate if you have an idea...
thx

CorteX

help plz

Postby CorteX » 25 May 2005 16:14

Ok i've found some interesting things about amplitude.
In p_aout_instance, p_buffer has a place in all effects in visualization. But
the number, I print (p_buffer whois is a unsigned char* ) in a new windows, doesn't seem to be amplitude.
Does anybody knows the calcul I should do to convert p_buffer in an average of amplitude?
I really need help.

CorteX

Postby CorteX » 26 May 2005 10:37

no one knows?

Guest

Postby Guest » 27 May 2005 10:51

ok, perhaps I ven't be clear.
I reformulated my question:
How to convert the variable p_buffer (p_aout->output.p_fifo->p_buffer) into a new variable, like i_amplitude. I_amplitude should show the amplitude like in spectrum effect (visualization) for a bargraphe.

I'm looking some fourcc documentation, but I don't find.

Guest

OH --please stay polite-- --please stay polite--...

Postby Guest » 03 Jun 2005 10:49

Look's like this is my topic.

you can post here if you want dam.... :roll:
OK I've found a solution for my prob. I post it if someone need it :



- First add in "typedef struct aout_output_t" a new part: int i_amplitude.

Then in effects.c (modules/visualization/visual). Write in the spectrum fonction:

(int i_value ;
int i_sas ;)

for(i = 0; i< i_nb_bands ; i = i+2)
{
i_sas = peaks + peaks[i+1];
i_value = i_value + i_sas;
}


i_amplitude = i_value ;

This will add all the peaks of the spectre in i_amplitude.
I've copy this fonction in the random fonction. Then, in the random fonction, i've get off all the lines, which don't serve for calculate i_amplitude. I don't matter random vizualisation.

Finally, I've done with interface builder a bargraphe, which depends of i_amplitude.

This is an way to do it. But you can ameliorate it easily.
++


Return to “VideoLAN Server and miniSAPserver”

Who is online

Users browsing this forum: No registered users and 30 guests