Magellan Linux

Contents of /trunk/xmms/patches/xmms-1.2.10-diskwriter-audio.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 153 - (show annotations) (download)
Tue May 8 20:52:56 2007 UTC (17 years ago) by niro
File size: 1033 byte(s)
-import

1 diff -Naur xmms-1.2.10/Output/disk_writer/disk_writer.c xmms-1.2.10.diskwriter/Output/disk_writer/disk_writer.c
2 --- xmms-1.2.10/Output/disk_writer/disk_writer.c 2004-02-23 20:31:42.000000000 +0000
3 +++ xmms-1.2.10.diskwriter/Output/disk_writer/disk_writer.c 2004-02-25 06:53:26.000000000 +0000
4 @@ -58,6 +58,8 @@
5 static struct wavhead header;
6 static guint64 written = 0;
7 static AFormat afmt;
8 +static gint arate, anch;
9 +static EffectPlugin *ep;
10 gint ctrlsocket_get_session_id(void); /* FIXME */
11
12 static void disk_init(void);
13 @@ -121,6 +123,12 @@
14
15 written = 0;
16 afmt = fmt;
17 + arate = rate;
18 + anch = nch;
19 + if (effects_enabled())
20 + ep = get_current_effect_plugin();
21 + else
22 + ep = NULL;
23
24 if (xmms_check_realtime_priority())
25 {
26 @@ -234,6 +242,9 @@
27
28 static void disk_write(void *ptr, gint length)
29 {
30 + if (ep)
31 + length = ep->mod_samples(&ptr, length, afmt, arate, anch);
32 +
33 if (afmt == FMT_S8 || afmt == FMT_S16_BE ||
34 afmt == FMT_U16_LE || afmt == FMT_U16_BE || afmt == FMT_U16_NE)
35 convert_buffer(ptr, length);