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.
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__
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
,
48 void swfdec_sound_matrix_apply (const SwfdecSoundMatrix
* sound
,
52 void swfdec_sound_matrix_multiply (SwfdecSoundMatrix
* dest
,
53 const SwfdecSoundMatrix
* a
,
54 const SwfdecSoundMatrix
* b
);