From: "John L. Utz III" <jutz@dmx.com>
To: Guilherme Longo <grlongo.ireland@gmail.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: Controling wave amplitude using alsa api !! (pcm interface ???????)
Date: Tue, 04 Aug 2009 10:08:12 -0700 [thread overview]
Message-ID: <4A786AFC.3030809@dmx.com> (raw)
In-Reply-To: <4A7863EB.5090207@gmail.com>
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@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
next prev parent reply other threads:[~2009-08-04 17:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-04 15:18 [PATCH 3/3] ASoC: add machine driver for i.mx27_visstrim_m10 board javier Martin
2009-08-04 16:38 ` Controling wave amplitude using alsa api !! (pcm interface ???????) Guilherme Longo
2009-08-04 17:08 ` John L. Utz III [this message]
2009-08-05 11:35 ` Guilherme Longo
2009-08-04 19:54 ` [PATCH 3/3] ASoC: add machine driver for i.mx27_visstrim_m10 board Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A786AFC.3030809@dmx.com \
--to=jutz@dmx.com \
--cc=alsa-devel@alsa-project.org \
--cc=grlongo.ireland@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox