[alsa-devel] PCM -- no need to release params mem nor close handle?
I am looking at PCM interface manual http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html
It tells that there are an open and set_params functions but nothing about close(). Furthermore, the description of open() http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m.html#g8340c7dc0a... neither tells that. Ok, I have realized from the examples. However, even the examples demonstrate no params deallocation. You call the snd_pcm_hw_params_alloca(&hwparams) but never release the allocated memory. Why?
Thank you.
On Fri, 23 Mar 2007, intellij wrote:
I am looking at PCM interface manual http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html
It tells that there are an open and set_params functions but nothing about close(). Furthermore, the description of open() http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m.html#g8340c7dc0a... neither tells that. Ok, I have realized from the examples. However, even the examples demonstrate no params deallocation. You call the snd_pcm_hw_params_alloca(&hwparams) but never release the allocated memory. Why?
Do 'man alloca' and 'man malloc' and compare these two memory allocation functions.
Jaroslav
----- Jaroslav Kysela perex@suse.cz Linux Kernel Sound Maintainer ALSA Project, SUSE Labs
Thankyou,
I wondered about this myself.
point of clarity; if this bit of email illumination had been in the docs, nobody would have wondered. :-)
-----Original Message----- From: alsa-devel-bounces@alsa-project.org on behalf of Jaroslav Kysela Sent: Fri 3/23/2007 9:50 AM To: intellij Cc: alsa-devel@alsa-project.org Subject: Re: [alsa-devel] PCM -- no need to release params mem nor close handle?
On Fri, 23 Mar 2007, intellij wrote:
I am looking at PCM interface manual http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html
It tells that there are an open and set_params functions but nothing about close(). Furthermore, the description of open() http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m.html#g8340c7dc0a... neither tells that. Ok, I have realized from the examples. However, even the examples demonstrate no params deallocation. You call the snd_pcm_hw_params_alloca(&hwparams) but never release the allocated memory. Why?
Do 'man alloca' and 'man malloc' and compare these two memory allocation functions.
Jaroslav
----- Jaroslav Kysela perex@suse.cz Linux Kernel Sound Maintainer ALSA Project, SUSE Labs _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
participants (3)
-
intellij
-
Jaroslav Kysela
-
John Utz