annotate Plugins/Input/amidi-plug/i_common.h @ 737:8efa4b799c19 trunk

[svn] Added a get_volume plugin function, to ensure that the player volume is properly updated when the player is remotely controlled
author giacomo
date Mon, 27 Feb 2006 16:52:02 -0800
parents 60c744f652f4
children b8b9d7f5d371
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
522
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
1 /*
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
2 *
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
3 * Author: Giacomo Lozito <james@develia.org>, (C) 2005-2006
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
4 *
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
5 * This program is free software; you can redistribute it and/or modify it
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
6 * under the terms of the GNU General Public License as published by the
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
7 * Free Software Foundation; either version 2 of the License, or (at your
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
8 * option) any later version.
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
9 *
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
10 * This program is distributed in the hope that it will be useful, but
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
13 * General Public License for more details.
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
14 *
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License along
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
16 * with this program; if not, write to the Free Software Foundation, Inc.,
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
17 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
18 *
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
19 */
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
20
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
21 #ifndef _I_COMMON_H
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
22 #define _I_COMMON_H 1
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
23
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
24
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
25 #include "config.h"
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
26 #include <stdio.h>
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
27 #include <stdlib.h>
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
28 #include <string.h>
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
29 #include <strings.h>
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
30 #include <glib.h>
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
31
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
32 #define _(String) (String)
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
33 #define N_(String) String
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
34 #define textdomain(Domain)
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
35 #define bindtextdomain(Package, Directory)
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
36
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
37 #define WARNANDBREAK(...) { g_warning(__VA_ARGS__); break; }
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
38 #define WARNANDBREAKANDPLAYERR(...) { amidiplug_playing_status = AMIDIPLUG_ERR; g_warning(__VA_ARGS__); break; }
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
39
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
40 #ifdef DEBUG
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
41 #define DEBUGMSG(...) { fprintf(stderr, "amidi-plug(%s:%s:%d): ", __FILE__, __FUNCTION__, (int) __LINE__); fprintf(stderr, __VA_ARGS__); }
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
42 #else
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
43 #define DEBUGMSG(...)
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
44 #endif /* DEBUG */
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
45
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
46
737
8efa4b799c19 [svn] Added a get_volume plugin function, to ensure that the player volume is properly updated when the player is remotely controlled
giacomo
parents: 522
diff changeset
47 #define AMIDIPLUG_VERSION "0.1a"
522
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
48 #define PLAYER_NAME "Audacious"
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
49 #define G_PATH_GET_BASENAME(x) g_path_get_basename(x)
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
50 #define G_STRING_PRINTF(...) g_string_printf(__VA_ARGS__)
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
51
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
52 /* multi-purpose data bucket */
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
53 typedef struct
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
54 {
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
55 gint bint[2];
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
56 gchar * bcharp[2];
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
57 gpointer bpointer[2];
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
58 }
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
59 data_bucket_t;
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
60
60c744f652f4 [svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff changeset
61 #endif /* !_I_COMMON_H */