Eric Peters wrote: > Clemens Ladisch wrote: > > Eric Peters wrote: > >>In some other messages on this list there was the hint to set this > >>threshhold larger than the max_buffer_size and then the device shouldn't > >>start automatically. So I've done. But unfortunately the playback starts > >>again automatically. > > > > What are the contents of /proc/asound/card?/pcm0p/sub0/sw_params during > > playback? > > start_threshold: 2703204728 This is way too large. In fact, it's so large that, as a signed value, it's negative. Just use the boundary value, which is appropriate for 'almost infinity' values like this. > >>/* calculating the number of frames of a buffer and a period */ > >>buffer_frames = buffer_time * sample_rate; > >>period_frames = period_time * sample_rate; > > > > Is this correct? Aren't the xxx_time variables in microseconds? > > I don't know. ;-) > How is a frame defined? It's the amount of data that is transferred in one sample period. It's more than one sample when there is more than one channel. The buffer_time/period_time variables are in microseconds, while the sample_rate uses seconds (Hz = 1/s), so you would have to divide by 1000000 for the calculation to make sense. > > ..., but it is common to use just the boundary value instead of > > some explicitly calculated value. > > The boundary value in the output above? How can I determine this value > in my application? snd_pcm_sw_params_get_boundary() HTH Clemens ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-devel