source: ext/midi/list.h @ 205da86

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 205da86 was b60dd4ae, checked in by Paul Brossier <piem@altern.org>, 19 years ago

moved midi functions to ext/

  • Property mode set to 100644
File size: 2.3 KB
Line 
1/* GLIB - Library of useful routines for C programming
2 * Copyright (C) 1995-1997  Peter Mattis, Spencer Kimball and Josh MacDonald
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
18 */
19
20/**
21 * \file
22 * list of objects
23 *
24 * implement common list structure and its various functions
25 *
26 * adapted for audio by Paul Brossier
27 *
28 * Modified by the GLib Team and others 1997-1999.  See the AUTHORS
29 * file for a list of people on the GLib Team.  See the ChangeLog
30 * files for a list of changes.  These files are distributed with
31 * GLib at ftp://ftp.gtk.org/pub/gtk/.
32 */
33
34#ifndef _AUBIO_LIST_H
35#define _AUBIO_LIST_H
36
37typedef struct _aubio_list_t aubio_list_t;
38
39struct _aubio_list_t
40{
41  void* data;
42  aubio_list_t *next;
43};
44
45typedef int (*aubio_compare_func_t)(void* a, void* b);
46
47aubio_list_t* new_aubio_list(void);
48void del_aubio_list(aubio_list_t *list);
49void del_aubio_list1(aubio_list_t *list);
50aubio_list_t* aubio_list_sort(aubio_list_t *list, aubio_compare_func_t compare_func);
51aubio_list_t* aubio_list_append(aubio_list_t *list, void* data);
52aubio_list_t* aubio_list_prepend(aubio_list_t *list, void* data);
53aubio_list_t* aubio_list_remove(aubio_list_t *list, void* data);
54aubio_list_t* aubio_list_remove_link(aubio_list_t *list, aubio_list_t *llink);
55aubio_list_t* aubio_list_nth(aubio_list_t *list, int n);
56aubio_list_t* aubio_list_last(aubio_list_t *list);
57aubio_list_t* aubio_list_insert_at(aubio_list_t *list, int n, void* data);
58int aubio_list_size(aubio_list_t *list);
59
60#define aubio_list_next(slist)  ((slist) ? (((aubio_list_t *)(slist))->next) : NULL)
61#define aubio_list_get(slist)   ((slist) ? ((slist)->data) : NULL)
62
63#endif  /* _AUBIO_LIST_H */
Note: See TracBrowser for help on using the repository browser.