Re: Controling wave amplitude using alsa api !! (pcm interface ???????)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Guilherme Longo wrote:
> Hi all!
> 
> Mates, I am following the example PCM.C that I found at alsa web site. 
> its a sine wave generator.
> I am looking for a control that alsa provides to control the amplitude 
> of the wave.
> 
> As I could found so for, there is just frequency control... I didn't 
> find any amplitude control.

This line int pcm.c is not amplitude control?

unsigned int maxval = (1 << (snd_pcm_format_width(format) - 1)) - 1;

it's an int, so you probably need to alter this a bit to allow you to
have arbitrary control over the amplitude (ie: multiply by a float less
than 1.0)

HTH

johnu


> * I don't want to control the volume using alsamixer or even my sound... 
> I want to generate a wave with predefined amplitude.
> 
> Does anyone could give me a little help??
> 
> Thanks a lot!
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@xxxxxxxxxxxxxxxx
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 


_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux