Re: Starting the device manually

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



James Courtier-Dutton wrote:
> Eric Peters wrote:
>> Dear all,
>>
>> I'm a bit confused by the alsa documentation. I want to fill up a buffer
>> of a alsa device with snd_pcm_writei and then if the buffer is full, I
>> want to be able to start the playback manually. By looking to the
>> documentation, I found the method snd_pcm_sw_params_set_start_threshold.
>> 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. Here are the lines of code, I'm setting the
>> buffer_size and period_size and the start threshhold:
>>
>>   
> Why would you actually want to do what you describe. (You certainly can 
> do it with ALSA, but as to why you would want to, is another thing 
> entirely)
> It is normally better to get the buffers running, sending silence 
> samples to the buffer, and then introduce your sound when you want to.
> One can accurately determine the delay or latency of the buffer, so 
> accurately timing samples is not a problem.
> One uses a callback approach to send sound to the card. A good example 
> of this callback approach is an application called jackd.
> http://jackaudio.org/
> 
> James
> 

Thank you James for your answer,

but unfortunately it isn't a real simple application. So it wouldn't be 
possible to start the device with silence samples. But I will take this 
approach into account to make it better. :-)

Best regards,
Eric

-------------------------------------------------------------------------
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

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux