From: Stefan Schoenleitner <dev.c0debabe@gmail.com>
To: Raymond Yau <superquad.vortex2@gmail.com>
Cc: ALSA Development Mailing List <alsa-devel@alsa-project.org>
Subject: Re: "Resource temporarily unavailable" while reading although poll returns POLLIN event
Date: Thu, 22 Apr 2010 12:15:29 +0200 [thread overview]
Message-ID: <4BD021C1.5060705@gmail.com> (raw)
In-Reply-To: <v2q4f3252891004211941xcdf33e7enbda0c2a8dcfe9609@mail.gmail.com>
Raymond Yau wrote:
> 2010/4/21 Stefan Schoenleitner <dev.c0debabe@gmail.com>
>> If it helps, I pasted the source code here so that you can view it nicely:
>> http://pastebin.com/fCicqctq
>>
> which sound card are you using ?
>
> The program did not run on my two sound card since you are using 160 frames
> and mono
>
> are you using "pulse" device for testing since only pulse device return the
> error messages "could not read from capture device: Resource temporarily
> unavailable" ?
Yes, I am using pulseaudio since my hardware sound card (an audigy 2)
does not support the period size I'm using.
The error message above is is from my own program (line 444):
-----------------------------------------------------------------
if ((ret=snd_pcm_readi(capture_device, buffer, 160))<0)
{
if (ret == -EPIPE)
{
fprintf(stderr, "XRUN while reading from capture device: %s\n",
snd_strerror(ret));
snd_pcm_prepare(capture_device);
snd_pcm_start(capture_device);
}
else
{
fprintf(stderr, "could not read from capture device: %s\n",
snd_strerror(ret));
exit(EXIT_FAILURE);
}
}
-----------------------------------------------------------------
cheers,
stefan
prev parent reply other threads:[~2010-04-22 10:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-21 11:28 "Resource temporarily unavailable" while reading although poll returns POLLIN event Stefan Schoenleitner
2010-04-21 16:15 ` Stefan Schoenleitner
2010-04-21 17:18 ` Jaroslav Kysela
2010-04-22 10:09 ` Stefan Schoenleitner
2010-04-23 4:10 ` Raymond Yau
2010-04-24 1:32 ` Raymond Yau
2010-04-24 14:38 ` Stefan Schoenleitner
2010-04-24 23:43 ` Raymond Yau
2010-04-26 7:52 ` Stefan Schoenleitner
2010-04-27 0:35 ` Raymond Yau
2010-04-26 1:46 ` Raymond Yau
2010-04-26 8:19 ` Stefan Schoenleitner
2010-04-26 11:10 ` Raymond Yau
2010-04-22 4:28 ` Raymond Yau
2010-04-22 10:49 ` Stefan Schoenleitner
2010-04-23 7:45 ` Raymond Yau
2010-04-23 11:16 ` Stefan Schoenleitner
2010-04-22 2:41 ` Raymond Yau
2010-04-22 10:15 ` Stefan Schoenleitner [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=4BD021C1.5060705@gmail.com \
--to=dev.c0debabe@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=superquad.vortex2@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 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.