[CinCV TNG] [PATCH] Fixed compiler warning about depreciated alsa functions

Einar Rünkaru einarrunkaru at gmail.com
Sun Jul 2 17:21:59 CEST 2017



On 07/02/2017 02:48 PM, Johannes Sixt wrote:
> Am 30.06.2017 um 21:46 schrieb Einar Rünkaru:
>> Removed depreciated alsa API functions.
>> ---
>>   cinelerra/audioalsa.C | 4 ----
>>   1 file changed, 4 deletions(-)
>>
>> diff --git a/cinelerra/audioalsa.C b/cinelerra/audioalsa.C
>> index c38048b..1f86e19 100644
>> --- a/cinelerra/audioalsa.C
>> +++ b/cinelerra/audioalsa.C
>> @@ -285,12 +285,8 @@ int AudioALSA::set_params(snd_pcm_t *dsp,
>>   //printf("AudioALSA::set_params 10 %d %d\n", chunk_size, buffer_size);
>>       snd_pcm_sw_params_current(dsp, swparams);
>> -    size_t xfer_align = 1 /* 
>> snd_pcm_sw_params_get_xfer_align(swparams) */;
>> -    unsigned int sleep_min = 0;
>> -    err = snd_pcm_sw_params_set_sleep_min(dsp, swparams, sleep_min);
>>       int n = chunk_size;
>>       err = snd_pcm_sw_params_set_avail_min(dsp, swparams, n);
>> -    err = snd_pcm_sw_params_set_xfer_align(dsp, swparams, xfer_align);
>>       if(snd_pcm_sw_params(dsp, swparams) < 0)
>>       {
>>           fprintf(stderr, "AudioALSA::set_params: snd_pcm_sw_params 
>> failed\n");
> 
> Deprecated does not mean unusable or unnecessary. Why do we not need 
> these function calls?
> 

About snd_pcm_sw_params_set_xfer_align:
https://sourceforge.net/p/alsa/mailman/message/34860430/
https://github.com/jackaudio/tools/pull/7/commits/10792865e7e7f150546151d7f0a3c46468388444

About snd_pcm_sw_params_set_sleep_min:
https://mailman.videolan.org/pipermail/vlc-commits/2010-July/002759.html

Have you better ideas?

IMHO both were not useful for Cinelerra even before deperciation.

Einar


More information about the Cinelerra mailing list