Mercurial > audlegacy
annotate Plugins/Output/crossfade/volume.h @ 395:0923a41170bb trunk
[svn] Add S3M support back after receiving a convincing testcase.
author | chainsaw |
---|---|
date | Sat, 07 Jan 2006 06:18:13 -0800 |
parents | 88b38e2414a1 |
children | 5b81b0f310e5 |
rev | line source |
---|---|
259
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
1 /* |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
2 * XMMS Crossfade Plugin |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
3 * Copyright (C) 2000-2004 Peter Eisenlohr <peter@eisenlohr.org> |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
4 * |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
5 * based on the original OSS Output Plugin |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
6 * Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
7 * |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
8 * This program is free software; you can redistribute it and/or modify |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
9 * it under the terms of the GNU General Public License as published by |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
10 * the Free Software Foundation; either version 2 of the License, or |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
11 * (at your option) any later version. |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
12 * |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
13 * This program is distributed in the hope that it will be useful, |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
16 * GNU General Public License for more details. |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
17 * |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
18 * You should have received a copy of the GNU General Public License |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
19 * along with this program; if not, write to the Free Software |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
21 * USA. |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
22 */ |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
23 |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
24 /* |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
25 * Volume adjustment |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
26 */ |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
27 |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
28 #ifndef __VOLUME_H__ |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
29 #define __VOLUME_H__ |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
30 |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
31 #include "crossfade.h" |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
32 #include "format.h" |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
33 |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
34 #include <sys/time.h> |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
35 |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
36 typedef struct |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
37 { |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
38 gboolean active; |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
39 gint target_rms; |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
40 gint song_rms; |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
41 gfloat factor; |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
42 |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
43 struct timeval tv_last; |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
44 gint clips; |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
45 } |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
46 volume_context_t; |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
47 |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
48 void volume_init(volume_context_t *cc); |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
49 void volume_flow(volume_context_t *cc, gpointer *buffer, gint length); |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
50 void volume_free(volume_context_t *cc); |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
51 |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
52 void volume_set_active (volume_context_t *cc, gboolean active); |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
53 void volume_set_target_rms(volume_context_t *cc, gint target_rms); |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
54 void volume_set_song_rms (volume_context_t *cc, gint song_rms); |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
55 |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
56 gfloat volume_compute_factor(gint percent, gint dB_range); /*compute factor corresponding to |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
57 attenuations in [- dB_range, 0] |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
58 */ |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
59 |
88b38e2414a1
[svn] First attempt at porting the crossfade plugin; patches from bug #363 applied, GThreadified, includes fixed. Will most probably not compile as of yet.
chainsaw
parents:
diff
changeset
|
60 #endif /* _VOLUME_H_ */ |