1 /* GStreamer
2  * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
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., 51 Franklin St, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19 
20 
21 #ifndef __GST_MODPLUG_H__
22 #define __GST_MODPLUG_H__
23 
24 #include <gst/gst.h>
25 
26 G_BEGIN_DECLS
27 
28 #define GST_TYPE_MODPLUG \
29   (gst_modplug_get_type())
30 
31 #define GST_MODPLUG(obj) \
32   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MODPLUG,GstModPlug))
33 #define GST_MODPLUG_CLASS(klass) \
34   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MODPLUG,GstModPlugClass))
35 #define GST_IS_MODPLUG(obj) \
36   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MODPLUG))
37 #define GST_IS_MODPLUG_CLASS(klass) \
38   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MODPLUG))
39 
40 struct _GstModPlug {
41   GstElement  element;
42 
43   GstPad     *sinkpad;
44   GstPad     *srcpad;
45 
46   /* properties */
47   const gchar *songname;
48   gboolean     reverb;
49   gint         reverb_depth;
50   gint         reverb_delay;
51   gboolean     megabass;
52   gint         megabass_amount;
53   gint         megabass_range;
54   gboolean     surround;
55   gint         surround_depth;
56   gint         surround_delay;
57   gboolean     noise_reduction;
58   gint         bits;
59   gboolean     oversamp;
60   gint         channel;
61   gint         frequency;
62 
63   /* state */
64   GstBuffer   *buffer;
65 
66   gint32       read_bytes;
67   gint32       read_samples;
68 
69   gint64       seek_at;      /* pending seek, or -1                 */
70   gint64       song_size;    /* size of the raw song data in bytes  */
71   gint64       song_length;  /* duration of the song in nanoseconds */
72   gint64       offset;       /* current position in samples         */
73   gint64       timestamp;
74 
75   CSoundFile  *mSoundFile;
76 };
77 
78 struct _GstModPlugClass {
79   GstElementClass parent_class;
80 };
81 
82 typedef struct _GstModPlug GstModPlug;
83 typedef struct _GstModPlugClass GstModPlugClass;
84 
85 GType gst_modplug_get_type (void);
86 
87 G_END_DECLS
88 
89 #endif /* __GST_MODPLUG_H__ */
90