summaryrefslogtreecommitdiff
path: root/libasound.c
diff options
context:
space:
mode:
authorJari Vetoniemi <mailroxas@gmail.com>2018-10-31 08:15:50 +0200
committerJari Vetoniemi <mailroxas@gmail.com>2018-10-31 08:15:50 +0200
commit484412b8704c147b7f343a19fefae44757e186b1 (patch)
tree67574ce770360a99c71a4d2835c9df9a1b091066 /libasound.c
parentd0005311720baa6883a2d5930b4f70b9e363dce4 (diff)
implement sw_param malloc and free
Diffstat (limited to 'libasound.c')
-rw-r--r--libasound.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libasound.c b/libasound.c
index 0f2ca45..c5662df 100644
--- a/libasound.c
+++ b/libasound.c
@@ -978,6 +978,20 @@ snd_pcm_sw_params_sizeof(void)
}
int
+snd_pcm_sw_params_malloc(snd_pcm_sw_params_t **ptr)
+{
+ // OpenAL-soft uses this :(
+ *ptr = calloc(1, sizeof(**ptr));
+ return (*ptr ? 0 : -1);
+}
+
+void
+snd_pcm_sw_params_free(snd_pcm_sw_params_t *ptr)
+{
+ free(ptr);
+}
+
+int
snd_pcm_sw_params_current(snd_pcm_t *pcm, snd_pcm_sw_params_t *params)
{
*params = pcm->sw;