Bug 22803 - Make header conform to implementation
[swfdec.git] / swfdec / swfdec_sound_matrix.h
blob6a0a093143e979256eb9da5a5ee1f3d19e2662f7
1 /* Swfdec
2 * Copyright (C) 2008 Benjamin Otte <otte@gnome.org>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 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 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301 USA
20 #ifndef __SWFDEC_SOUND_MATRIX_H__
21 #define __SWFDEC_SOUND_MATRIX_H__
23 #include <glib.h>
25 G_BEGIN_DECLS
27 typedef struct _SwfdecSoundMatrix SwfdecSoundMatrix;
29 struct _SwfdecSoundMatrix
31 int ll; /* percentage of left channel */
32 int rl; /* "percentage" of left channel on right speaker */
33 int lr; /* "percentage" of right channel on left speaker */
34 int rr; /* percentage of right channel */
35 int volume; /* don't ask me why volume is seperate */
38 void swfdec_sound_matrix_init_identity (SwfdecSoundMatrix * sound);
40 gboolean swfdec_sound_matrix_is_identity (const SwfdecSoundMatrix * sound);
41 gboolean swfdec_sound_matrix_is_equal (const SwfdecSoundMatrix * a,
42 const SwfdecSoundMatrix * b);
44 int swfdec_sound_matrix_get_pan (const SwfdecSoundMatrix * sound);
45 void swfdec_sound_matrix_set_pan (SwfdecSoundMatrix * sound,
46 int pan);
48 void swfdec_sound_matrix_apply (const SwfdecSoundMatrix * sound,
49 gint16 * dest,
50 guint n_samples);
52 void swfdec_sound_matrix_multiply (SwfdecSoundMatrix * dest,
53 const SwfdecSoundMatrix * a,
54 const SwfdecSoundMatrix * b);
57 G_END_DECLS
58 #endif