annotate src/amidi-plug/amidi-plug.h @ 2316:62391135da44

fixed some warnings
author Cristi Magherusan <majeru@atheme.org>
date Tue, 15 Jan 2008 12:35:54 +0200
parents a2bf43c3aa3d
children 3134a0987162
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
1 /*
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
2 *
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
3 * Author: Giacomo Lozito <james@develia.org>, (C) 2005-2006
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
4 *
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
5 * This program is free software; you can redistribute it and/or modify it
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
6 * under the terms of the GNU General Public License as published by the
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
7 * Free Software Foundation; either version 2 of the License, or (at your
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
8 * option) any later version.
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
9 *
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
10 * This program is distributed in the hope that it will be useful, but
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
13 * General Public License for more details.
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
14 *
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License along
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
16 * with this program; if not, write to the Free Software Foundation, Inc.,
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
18 *
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
19 */
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
20
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
21 #ifndef _I_AMIDIPLUG_H
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
22 #define _I_AMIDIPLUG_H 1
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
23
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
24 #define AMIDIPLUG_STOP 0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
25 #define AMIDIPLUG_PLAY 1
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
26 #define AMIDIPLUG_PAUSE 2
1414
5f892afeb8e1 - amidi-plug 0.8 beta1; support for gthread and v3 plugin system; needs testing and refinements
Giacomo Lozito <james@develia.org>
parents: 1121
diff changeset
27 #define AMIDIPLUG_SEEK 3
5f892afeb8e1 - amidi-plug 0.8 beta1; support for gthread and v3 plugin system; needs testing and refinements
Giacomo Lozito <james@develia.org>
parents: 1121
diff changeset
28 #define AMIDIPLUG_ERR 4
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
29
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
30 #include "i_common.h"
240
59d793da5395 [svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents: 12
diff changeset
31 #include <audacious/plugin.h>
59d793da5395 [svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents: 12
diff changeset
32 #include <audacious/output.h>
1020
fe9ffc829b5f [svn] - amidi-plug works again (uses auddrct.h in place of the deprecated beepctrl.h)
giacomo
parents: 561
diff changeset
33 #include <audacious/auddrct.h>
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
34 #include <pthread.h>
240
59d793da5395 [svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents: 12
diff changeset
35 #include "i_vfslayer.h"
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
36 #include "i_backend.h"
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
37 #include "i_configure.h"
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
38 #include "i_midi.h"
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
39 #include "i_fileinfo.h"
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
40 #include "i_utils.h"
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
41
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
42
1414
5f892afeb8e1 - amidi-plug 0.8 beta1; support for gthread and v3 plugin system; needs testing and refinements
Giacomo Lozito <james@develia.org>
parents: 1121
diff changeset
43 static GThread * amidiplug_play_thread = NULL;
5f892afeb8e1 - amidi-plug 0.8 beta1; support for gthread and v3 plugin system; needs testing and refinements
Giacomo Lozito <james@develia.org>
parents: 1121
diff changeset
44 static GThread * amidiplug_audio_thread = NULL;
5f892afeb8e1 - amidi-plug 0.8 beta1; support for gthread and v3 plugin system; needs testing and refinements
Giacomo Lozito <james@develia.org>
parents: 1121
diff changeset
45 static GMutex * amidiplug_gettime_mutex = NULL;
5f892afeb8e1 - amidi-plug 0.8 beta1; support for gthread and v3 plugin system; needs testing and refinements
Giacomo Lozito <james@develia.org>
parents: 1121
diff changeset
46 static GMutex * amidiplug_playing_mutex = NULL;
5f892afeb8e1 - amidi-plug 0.8 beta1; support for gthread and v3 plugin system; needs testing and refinements
Giacomo Lozito <james@develia.org>
parents: 1121
diff changeset
47 static GCond * amidiplug_pause_cond = NULL;
5f892afeb8e1 - amidi-plug 0.8 beta1; support for gthread and v3 plugin system; needs testing and refinements
Giacomo Lozito <james@develia.org>
parents: 1121
diff changeset
48 static GCond * amidiplug_seekonpause_cond = NULL;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
49
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
50 gint amidiplug_playing_status = AMIDIPLUG_STOP;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
51
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
52 midifile_t midifile;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
53
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
54 amidiplug_sequencer_backend_t backend;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
55
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
56 amidiplug_cfg_ap_t amidiplug_cfg_ap =
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
57 {
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
58 NULL, /* ap_seq_backend */
240
59d793da5395 [svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents: 12
diff changeset
59 0, /* ap_opts_transpose_value */
59d793da5395 [svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents: 12
diff changeset
60 0, /* ap_opts_drumshift_value */
59d793da5395 [svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents: 12
diff changeset
61 0, /* ap_opts_length_precalc */
59d793da5395 [svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents: 12
diff changeset
62 0, /* ap_opts_comments_extract */
59d793da5395 [svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents: 12
diff changeset
63 0 /* ap_opts_lyrics_extract */
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
64 };
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
65
1993
a2bf43c3aa3d Unbreak building
Christian Birchinger <joker@netswarm.net>
parents: 1978
diff changeset
66 gchar *amidiplug_vfs_extensions[] = { "mid" , "midi" , "rmi" , "rmid" , NULL };
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
67
1414
5f892afeb8e1 - amidi-plug 0.8 beta1; support for gthread and v3 plugin system; needs testing and refinements
Giacomo Lozito <james@develia.org>
parents: 1121
diff changeset
68 gpointer amidiplug_play_loop( gpointer );
5f892afeb8e1 - amidi-plug 0.8 beta1; support for gthread and v3 plugin system; needs testing and refinements
Giacomo Lozito <james@develia.org>
parents: 1121
diff changeset
69 gpointer amidiplug_audio_loop( gpointer );
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
70 void amidiplug_skipto( gint );
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
71 static void amidiplug_init( void );
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
72 static void amidiplug_cleanup( void );
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
73 static void amidiplug_aboutbox( void );
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
74 static void amidiplug_configure( void );
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
75 static gint amidiplug_is_our_file( gchar * );
461
cfd1b8a88e2d [svn] - updated amidi-plug to the new plugin API
giacomo
parents: 240
diff changeset
76 static gint amidiplug_is_our_file_from_vfs( gchar * , VFSFile * );
559
d5782f3bd760 [svn] Update plugins to the new input plugin API
iabervon
parents: 461
diff changeset
77 static void amidiplug_play( InputPlayback * );
d5782f3bd760 [svn] Update plugins to the new input plugin API
iabervon
parents: 461
diff changeset
78 static void amidiplug_stop( InputPlayback * );
d5782f3bd760 [svn] Update plugins to the new input plugin API
iabervon
parents: 461
diff changeset
79 static void amidiplug_pause( InputPlayback *, gshort );
d5782f3bd760 [svn] Update plugins to the new input plugin API
iabervon
parents: 461
diff changeset
80 static void amidiplug_seek( InputPlayback *, gint );
d5782f3bd760 [svn] Update plugins to the new input plugin API
iabervon
parents: 461
diff changeset
81 static gint amidiplug_get_time( InputPlayback * );
561
914c96de3244 [svn] Convert plugins to use InputPlayback.output instead of InputPlugin.output
iabervon
parents: 559
diff changeset
82 static gint amidiplug_get_volume( gint * , gint * );
914c96de3244 [svn] Convert plugins to use InputPlayback.output instead of InputPlugin.output
iabervon
parents: 559
diff changeset
83 static gint amidiplug_set_volume( gint , gint );
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
84 static void amidiplug_get_song_info( gchar * , gchar ** , gint * );
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
85 static void amidiplug_file_info_box( gchar * );
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
86
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
87 InputPlugin amidiplug_ip =
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
88 {
1622
b7665ebc9e1e amidi-plug: C99 initialisers
William Pitcock <nenolod@atheme.org>
parents: 1414
diff changeset
89 .description = "AMIDI-Plug " AMIDIPLUG_VERSION " (MIDI Player)", /* description */
b7665ebc9e1e amidi-plug: C99 initialisers
William Pitcock <nenolod@atheme.org>
parents: 1414
diff changeset
90 .init = amidiplug_init, /* init */
b7665ebc9e1e amidi-plug: C99 initialisers
William Pitcock <nenolod@atheme.org>
parents: 1414
diff changeset
91 .about = amidiplug_aboutbox, /* aboutbox */
b7665ebc9e1e amidi-plug: C99 initialisers
William Pitcock <nenolod@atheme.org>
parents: 1414
diff changeset
92 .configure = amidiplug_configure, /* configure */
b7665ebc9e1e amidi-plug: C99 initialisers
William Pitcock <nenolod@atheme.org>
parents: 1414
diff changeset
93 .is_our_file = amidiplug_is_our_file, /* is_our_file */
b7665ebc9e1e amidi-plug: C99 initialisers
William Pitcock <nenolod@atheme.org>
parents: 1414
diff changeset
94 .play_file = amidiplug_play, /* play_file */
b7665ebc9e1e amidi-plug: C99 initialisers
William Pitcock <nenolod@atheme.org>
parents: 1414
diff changeset
95 .stop = amidiplug_stop, /* stop */
b7665ebc9e1e amidi-plug: C99 initialisers
William Pitcock <nenolod@atheme.org>
parents: 1414
diff changeset
96 .pause = amidiplug_pause, /* pause */
b7665ebc9e1e amidi-plug: C99 initialisers
William Pitcock <nenolod@atheme.org>
parents: 1414
diff changeset
97 .seek = amidiplug_seek, /* seek */
b7665ebc9e1e amidi-plug: C99 initialisers
William Pitcock <nenolod@atheme.org>
parents: 1414
diff changeset
98 .get_time = amidiplug_get_time, /* get_time */
b7665ebc9e1e amidi-plug: C99 initialisers
William Pitcock <nenolod@atheme.org>
parents: 1414
diff changeset
99 .get_volume = amidiplug_get_volume, /* get_volume */
b7665ebc9e1e amidi-plug: C99 initialisers
William Pitcock <nenolod@atheme.org>
parents: 1414
diff changeset
100 .set_volume = amidiplug_set_volume, /* set_volume */
b7665ebc9e1e amidi-plug: C99 initialisers
William Pitcock <nenolod@atheme.org>
parents: 1414
diff changeset
101 .cleanup = amidiplug_cleanup, /* cleanup */
b7665ebc9e1e amidi-plug: C99 initialisers
William Pitcock <nenolod@atheme.org>
parents: 1414
diff changeset
102 .get_song_info = amidiplug_get_song_info, /* get_song_info */
b7665ebc9e1e amidi-plug: C99 initialisers
William Pitcock <nenolod@atheme.org>
parents: 1414
diff changeset
103 .file_info_box = amidiplug_file_info_box, /* file_info_box */
b7665ebc9e1e amidi-plug: C99 initialisers
William Pitcock <nenolod@atheme.org>
parents: 1414
diff changeset
104 .is_our_file_from_vfs = amidiplug_is_our_file_from_vfs, /* is_our_file_from_vfs */
1993
a2bf43c3aa3d Unbreak building
Christian Birchinger <joker@netswarm.net>
parents: 1978
diff changeset
105 .vfs_extensions = amidiplug_vfs_extensions /* aud_vfs_extensions */
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
106 };
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
107
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
108 #endif /* !_I_AMIDIPLUG_H */