Scope of snd_pcm_hw_params_alloca() ?

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

 



I've spent a couple of days pining this down.

snd_pcm_hw_params_alloca() is part of the user API -right?  But accomplished 
as a #define in pcm.h.

However if it is called inside a function, and the pointer stored for future 
use, after leaving the function the allocation seems to have gone, and 
attempting thereafter to use the pointer to access the hwparams space in 
another API function results in seg-fault.

This seems rather counter-intuitive (ie unexpected) to someone who has no 
knowledge of the inner workings, but simply uses the API; the allocation 
disappears without having been specifically free'd or released in any way.  I 
know that calling it globally gets round the problem, but certainly I could 
do without all the debug needed to discover that.

Comments?

Alan

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/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