fix build for --disable-gtk-doc
[swfdec.git] / swfdec / swfdec_audio_internal.h
blobd225d7191278a54e3b414c6c892abc02c791c3e3
1 /* Swfdec
2 * Copyright (C) 2003-2006 David Schleef <ds@schleef.org>
3 * 2005-2006 Eric Anholt <eric@anholt.net>
4 * 2006-2008 Benjamin Otte <otte@gnome.org>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301 USA
22 #ifndef _SWFDEC_AUDIO_INTERNAL_H_
23 #define _SWFDEC_AUDIO_INTERNAL_H_
25 #include <swfdec/swfdec.h>
26 #include <swfdec/swfdec_audio.h>
27 #include <swfdec/swfdec_bits.h>
28 #include <swfdec/swfdec_sound_matrix.h>
29 #include <swfdec/swfdec_types.h>
31 G_BEGIN_DECLS
33 typedef guint SwfdecAudioFormat;
34 #define SWFDEC_IS_AUDIO_FORMAT(format) ((format) <= 0xF)
35 #define SWFDEC_AUDIO_FORMAT_INVALID ((SwfdecAudioFormat) -1)
38 struct _SwfdecAudio {
39 GObject object;
41 SwfdecPlayer * player; /* the player that plays us */
42 gboolean added; /* set to TRUE after the added signal has been emitted */
43 SwfdecActor * actor; /* NULL or movieclip that controls our volume */
44 const SwfdecSoundMatrix * matrix; /* matrix this audio references or NULL if none */
45 SwfdecSoundMatrix matrix_cache; /* matrix used by this audio instance */
48 struct _SwfdecAudioClass {
49 GObjectClass object_class;
51 gsize (* iterate) (SwfdecAudio * audio,
52 gsize n_samples);
53 gsize (* render) (SwfdecAudio * audio,
54 gint16 * dest,
55 gsize start,
56 gsize n_samples);
59 void swfdec_audio_add (SwfdecAudio * audio,
60 SwfdecPlayer * player);
61 void swfdec_audio_remove (SwfdecAudio * audio);
62 void swfdec_audio_set_actor (SwfdecAudio * audio,
63 SwfdecActor * actor);
64 void swfdec_audio_set_matrix (SwfdecAudio * audio,
65 const SwfdecSoundMatrix *matrix);
67 gsize swfdec_audio_iterate (SwfdecAudio * audio,
68 gsize n_samples);
69 void swfdec_audio_update_matrix (SwfdecAudio * audio);
71 SwfdecAudioFormat swfdec_audio_format_parse (SwfdecBits * bits);
72 SwfdecAudioFormat swfdec_audio_format_new (guint rate,
73 guint channels,
74 gboolean is_16bit);
75 guint swfdec_audio_format_get_channels(SwfdecAudioFormat format);
76 gboolean swfdec_audio_format_is_16bit (SwfdecAudioFormat format);
77 guint swfdec_audio_format_get_rate (SwfdecAudioFormat format);
78 guint swfdec_audio_format_get_granularity
79 (SwfdecAudioFormat format);
80 guint swfdec_audio_format_get_bytes_per_sample
81 (SwfdecAudioFormat format);
82 const char * swfdec_audio_format_to_string (SwfdecAudioFormat format);
85 G_END_DECLS
86 #endif