All of lore.kernel.org
 help / color / mirror / Atom feed
From: Howard Abrams <abramsh@acm.org>
To: Mark Rages <markrages@mlug.missouri.edu>
Cc: alsa-devel@alsa-project.org
Subject: Re: Simple ALSA capture/playback example and help wanted
Date: Thu, 28 Mar 2002 22:19:13 -0800	[thread overview]
Message-ID: <3CA40761.3010408@acm.org> (raw)
In-Reply-To: 20020328234942.B18690@mlug.missouri.edu

[-- Attachment #1: Type: text/plain, Size: 781 bytes --]



Mark Rages wrote:

> On Thu, Mar 28, 2002 at 09:05:31PM -0800, Howard Abrams wrote:
> 
>>Thanks Mark. I'll take a look at jack, but in the near-term, I
>>copied a sample from a link off your page. It must have been
>>from a earlier rev of the api, but it only required very minimal
>>changes to compile.
>>
>>The program I used was "A Minimal Full-Duplex Program", off the
>>page: http://www.op.net/~pbd/alsa-audio.html#duplexex
>>
> 
> Can you tell us what changes were required? It will help improve the
> documentation.


Sure, a diff is attached.


> Sorry, I don't have the expertise (or the appropriate soundcard)
> to help with your specific problem.
> 


Is Takashi Iwai on this list? He's credited in the source for the
driver. Anyone else have one of these cards?


h.

[-- Attachment #2: diff.txt --]
[-- Type: text/plain, Size: 1039 bytes --]

12c10
<          if ((snd_pcm_open ( &playback_handle, argv[1], SND_PCM_STREAM_PLAYBACK, 0)) < 0) {
---
>          if ((playback_handle = snd_pcm_open (argv[1], SND_PCM_STREAM_PLAYBACK, 0)) < 0) {
17c15
<          if ((snd_pcm_open ( &capture_handle, argv[1], SND_PCM_STREAM_CAPTURE, 0)) < 0) {
---
>          if ((capture_handle = snd_pcm_open (argv[1], SND_PCM_STREAM_CAPTURE, 0)) < 0) {
27c25
<          snd_pcm_hw_params_set_rate_near (playback_handle, hw_params, 44100, 0);
---
>          snd_pcm_hw_params_set_rate_near (playback_handle, hw_params, 44100);
35c33
<          snd_pcm_hw_params_set_rate_near (capture_handle, hw_params, 44100, 0);
---
>          snd_pcm_hw_params_set_rate_near (capture_handle, hw_params, 44100);
45,46c43,44
<                  snd_pcm_writei (playback_handle, pbuf, sizeof (pbuf));
<                  snd_pcm_readi (capture_handle, cbuf, sizeof (cbuf));
---
>                  snd_pcm_write (playback_handle, pbuf, sizeof (pbuf));
>                  snd_pcm_read (capture_handle, cbuf, sizeof (cbuf));

      reply	other threads:[~2002-03-29  6:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-29  2:24 Simple ALSA capture/playback example and help wanted Howard Abrams
2002-03-29  4:06 ` Mark Rages
2002-03-29  5:05   ` Howard Abrams
2002-03-29  5:49     ` Mark Rages
2002-03-29  6:19       ` Howard Abrams [this message]

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=3CA40761.3010408@acm.org \
    --to=abramsh@acm.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=markrages@mlug.missouri.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.