Samuel Thibault, le Tue 24 Mar 2009 23:43:41 +0100, a écrit :
> The alsa case is quite odd, we're getting 
> ioctl(5, SNDRV_PCM_IOCTL_READI_FRAMES, 0x7fc0937b1fc0) = -1 EPIPE (Broken 
> pipe)
> I haven't found why yet.

Ok, I've resorted to putting printks in the kernel, which got me to
snd_pcm_pre_start() which calls snd_pcm_playback_data where 

runtime->stop_threshold >= runtime->boundary

is not true because stop_threshold is 0x7fffffff, while
runtime->boundary is 0x4800000000000000.  The attached patch fixes it.

Samuel
--- chuck-1.2.0.8.dfsg/src/rtaudio.cpp.orig     2009-03-25 00:22:20.000000000 
+0100
+++ chuck-1.2.0.8.dfsg/src/rtaudio.cpp  2009-03-25 00:22:26.000000000 +0100
@@ -4047,7 +4047,7 @@
   snd_pcm_sw_params_alloca( &sw_params );
   snd_pcm_sw_params_current( handle, sw_params );
   snd_pcm_sw_params_set_start_threshold( handle, sw_params, *bufferSize );
-  snd_pcm_sw_params_set_stop_threshold( handle, sw_params, 0x7fffffff );
+  snd_pcm_sw_params_set_stop_threshold( handle, sw_params, LONG_MAX );
   snd_pcm_sw_params_set_silence_threshold( handle, sw_params, 0 );
   snd_pcm_sw_params_set_silence_size( handle, sw_params, INT_MAX );
   err = snd_pcm_sw_params( handle, sw_params );

Reply via email to