Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
/* ----------------------------------------------------------------------
** Determine the number of input and output channels that the current
** audio layout has
** ------------------------------------------------------------------- */
if (g_start_Audio)
{
while ((outframes = snd_pcm_writei(playback_handle, rdbuf, inframes)) < 0)
{
if (outframes == -EAGAIN)
continue;
snd_pcm_prepare(playback_handle);
}
}
else
{
break;
}
}
return 0;
}
void *threading_process1(void* nothing )
{
snd_pcm_hw_params_t *hw_params;
int err,size=SAMPS_PER_TICK;
unsigned int tmp;
snd_pcm_uframes_t frames;
int frame_size;
int sample_rate = header.samplerate;
buffer_size = 8 *size;
snd_pcm_t *device;
Spell out your words, and do NOT bump your own thread; this is a forum of VOLUNTEERS...we help when we can/if we can/if we want to; doing that is fairly rude. You posted a follow-up begging for help after ONE MINUTE???
You didn't post ANY useful details about your problem (like version/distro of Linux, where you got the code, what you're typing in to generate that error, etc.), so don't be surprised when people can't help you. Post details.
/* ----------------------------------------------------------------------
** Determine the number of input and output channels that the current
** audio layout has
** ------------------------------------------------------------------- */
if (g_start_Audio)
{
while ((outframes = snd_pcm_writei(playback_handle, rdbuf, inframes)) < 0)
{
if (outframes == -EAGAIN)
continue;
snd_pcm_prepare(playback_handle);
}
}
else
{
break;
}
}
return 0;
}
void *threading_process1(void *nothing )
{
snd_pcm_hw_params_t *hw_params;
int err,size=SAMPS_PER_TICK;
unsigned int tmp;
snd_pcm_uframes_t frames;
int frame_size;
int sample_rate = header.samplerate;
buffer_size = 8 *size;
snd_pcm_t *device;
am using :
Linux panda-desktop 3.2.0-1412-omap4 #16-Ubuntu SMP PREEMPT Tue Apr 17 19:38:42 UTC 2012 armv7l armv7l armv7l GNU/Linux
compiler doesnt througing errore
but when execute:
./out2 YedutaNilichindhiChoodu_16000.wav
ASSERTION:'pcm && params'
its not playing wave file.
my_program is to play wavefile using threads
am using :
Linux panda-desktop 3.2.0-1412-omap4 #16-Ubuntu SMP PREEMPT Tue Apr 17 19:38:42 UTC 2012 armv7l armv7l armv7l GNU/Linux
compiler doesnt througing errore
Do you mean the program compiles without error? What kind of machine are you running this on, and what version of Ubuntu are you using?
Quote:
but when execute:
./out2 YedutaNilichindhiChoodu_16000.wav
ASSERTION:'pcm && params'
its not playing wave file. my_program is to play wavefile using threads
First, are you sure the wav file you're trying to play isn't corrupted? Can you play it with another player, and are you sure your sound hardware/speakers are working correctly? There are thread/sound related bugs on the Ubuntu forums, too: https://bugs.launchpad.net/ubuntu/+s...io/+bug/932096
..but you still haven't said what version of Ubuntu, what kind of hardware, desktop GUI, etc., so we don't know if you're using pulseaudio or ALSA.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.