From ea83756fbedaac3120a5af90db17afe7286b99d5 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 27 May 2002 11:14:20 +0000 Subject: [PATCH] - removed snd_seq_create_event from seq.h. it's deprecated. the function itself still exists for compatibility but protected by DOC_HIDDEN. - a bit more comments about snd_seq_free_event. - since alsa.m4 used snd_seq_create_event for checking libasound, now it's replaced with snd_ctl_open. --- include/seq.h | 1 - src/seq/seq.c | 14 +++++++++++--- utils/alsa.m4 | 4 ++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/include/seq.h b/include/seq.h index f79eb8c8..9ebbaf24 100644 --- a/include/seq.h +++ b/include/seq.h @@ -490,7 +490,6 @@ int snd_seq_set_queue_timer(snd_seq_t *handle, int q, snd_seq_queue_timer_t *tim * \{ */ -snd_seq_event_t *snd_seq_create_event(void); int snd_seq_free_event(snd_seq_event_t *ev); ssize_t snd_seq_event_length(snd_seq_event_t *ev); int snd_seq_event_output(snd_seq_t *handle, snd_seq_event_t *ev); diff --git a/src/seq/seq.c b/src/seq/seq.c index df2a5f40..b94c06a2 100644 --- a/src/seq/seq.c +++ b/src/seq/seq.c @@ -2535,19 +2535,27 @@ int snd_seq_set_queue_timer(snd_seq_t *seq, int q, snd_seq_queue_timer_t * timer /*----------------------------------------------------------------*/ +#ifndef DOC_HIDDEN /** - * \brief create an event cell + * \brief (DEPRECATED) create an event cell * \return the cell pointer allocated + * + * create an event cell via malloc. the returned pointer must be released + * by the application itself via normal free() call, + * not via snd_seq_free_event(). */ snd_seq_event_t *snd_seq_create_event(void) { return (snd_seq_event_t *) calloc(1, sizeof(snd_seq_event_t)); } +#endif /** - * \brief free an event + * \brief (DEPRECATED) free an event * - * this is obsolete. only for compatibility + * releases the event pointer which was allocated by snd_seq_event_input(). + * this function is obsolete and does nothing inside actually. + * used only for compatibility with the older version. */ #ifndef DOXYGEN int snd_seq_free_event(snd_seq_event_t *ev ATTRIBUTE_UNUSED) diff --git a/utils/alsa.m4 b/utils/alsa.m4 index 59d24c1e..70c87ec7 100644 --- a/utils/alsa.m4 +++ b/utils/alsa.m4 @@ -2,7 +2,7 @@ dnl Configure Paths for Alsa dnl Some modifications by Richard Boulton dnl Christopher Lansdown dnl Jaroslav Kysela -dnl Last modification: $Id: alsa.m4,v 1.21 2002/04/04 07:08:41 perex Exp $ +dnl Last modification: $Id: alsa.m4,v 1.22 2002/05/27 11:14:20 tiwai Exp $ dnl AM_PATH_ALSA([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) dnl Test for libasound, and define ALSA_CFLAGS and ALSA_LIBS as appropriate. dnl enables arguments --with-alsa-prefix= @@ -116,7 +116,7 @@ exit(0); AC_LANG_RESTORE dnl Now that we know that we have the right version, let's see if we have the library and not just the headers. -AC_CHECK_LIB([asound], [snd_seq_create_event],, +AC_CHECK_LIB([asound], [snd_ctl_open],, [ifelse([$3], , [AC_MSG_ERROR(No linkable libasound was found.)]) alsa_found=no] ) -- 2.11.0