Mercurial > audlegacy
annotate Plugins/Input/amidi-plug/i_common.h @ 1526:98a9c54459f0 trunk
[svn] - a minor tweak to the save function
author | nenolod |
---|---|
date | Mon, 07 Aug 2006 23:08:59 -0700 |
parents | 705d4c089fce |
children | daabad781796 |
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., |
1459 | 17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
522
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 #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
|
25 #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
|
26 #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
|
27 #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
|
28 #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
|
29 #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
|
30 |
60c744f652f4
[svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff
changeset
|
31 #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
|
32 #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
|
33 #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
|
34 #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
|
35 |
60c744f652f4
[svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff
changeset
|
36 #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
|
37 #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
|
38 |
60c744f652f4
[svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff
changeset
|
39 #ifdef DEBUG |
60c744f652f4
[svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff
changeset
|
40 #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
|
41 #else |
60c744f652f4
[svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff
changeset
|
42 #define DEBUGMSG(...) |
60c744f652f4
[svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff
changeset
|
43 #endif /* DEBUG */ |
60c744f652f4
[svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff
changeset
|
44 |
60c744f652f4
[svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff
changeset
|
45 |
1387 | 46 #define AMIDIPLUG_VERSION "0.5" |
522
60c744f652f4
[svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff
changeset
|
47 #define PLAYER_NAME "Audacious" |
1387 | 48 #define PLAYER_LOCALRCDIR ".audacious" |
522
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__) |
1387 | 51 #define G_USLEEP(x) g_usleep(x) |
52 #define G_VFPRINTF(x,y,z) g_vfprintf(x,y,z) | |
53 | |
522
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 /* 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
|
56 typedef struct |
60c744f652f4
[svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff
changeset
|
57 { |
60c744f652f4
[svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff
changeset
|
58 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
|
59 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
|
60 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
|
61 } |
60c744f652f4
[svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff
changeset
|
62 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
|
63 |
60c744f652f4
[svn] amidi-plug (MIDI through ALSA seq) input plugin added, brand new and completely written from scratch :)
giacomo
parents:
diff
changeset
|
64 #endif /* !_I_COMMON_H */ |