All of lore.kernel.org
 help / color / mirror / Atom feed
* This changes in MINIMAL FULL DUPLEX  is not enought!
@ 2002-03-29 21:48 pavelni
  2002-03-31  5:36 ` Howard Abrams
  0 siblings, 1 reply; 2+ messages in thread
From: pavelni @ 2002-03-29 21:48 UTC (permalink / raw)
  To: alsa-devel

These changes in MINIMAL FULL DUPLEX AP is not enought!
I did this changes before, but was not able to get loop
from input to output, althought I have programed the same application
with using OSS before. So I little experiment to solve the problem.  
  I set length of buffer at 44100 and tryed what happend. First it
recorded first buffer length. Then it  played the same length. And
that is all. Then no sound recorded and no sound played. Is it
somebody able to solve this problem to get final version of MINIMAL
FULL DUPLEX?                                 Thanks
                                     Pavel
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));

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-03-31  5:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-29 21:48 This changes in MINIMAL FULL DUPLEX is not enought! pavelni
2002-03-31  5:36 ` Howard Abrams

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.