comparison src/disk_writer/disk_writer.c @ 403:2a762925c469 trunk

[svn] - reopen on flush(0)
author nenolod
date Wed, 03 Jan 2007 12:45:05 -0800
parents 3da1b8942b8b
children 41f98fe0c353
comparison
equal deleted inserted replaced
402:1d50eb0b5a0a 403:2a762925c469
63 static gchar *file_path = NULL; 63 static gchar *file_path = NULL;
64 static VFSFile *output_file = NULL; 64 static VFSFile *output_file = NULL;
65 static struct wavhead header; 65 static struct wavhead header;
66 static guint64 written = 0; 66 static guint64 written = 0;
67 static AFormat afmt; 67 static AFormat afmt;
68 static gint arate, ach;
68 gint ctrlsocket_get_session_id(void); /* FIXME */ 69 gint ctrlsocket_get_session_id(void); /* FIXME */
69 70
70 static void disk_init(void); 71 static void disk_init(void);
71 static gint disk_open(AFormat fmt, gint rate, gint nch); 72 static gint disk_open(AFormat fmt, gint rate, gint nch);
72 static void disk_write(void *ptr, gint length); 73 static void disk_write(void *ptr, gint length);
130 gchar *filename, *title, *temp; 131 gchar *filename, *title, *temp;
131 gint pos; 132 gint pos;
132 133
133 written = 0; 134 written = 0;
134 afmt = fmt; 135 afmt = fmt;
136 arate = rate;
137 ach = nch;
135 138
136 if (xmms_check_realtime_priority()) 139 if (xmms_check_realtime_priority())
137 { 140 {
138 xmms_show_message(_("Error"), 141 xmms_show_message(_("Error"),
139 _("You cannot use the Disk Writer plugin\n" 142 _("You cannot use the Disk Writer plugin\n"
274 output_file = NULL; 277 output_file = NULL;
275 } 278 }
276 279
277 static void disk_flush(gint time) 280 static void disk_flush(gint time)
278 { 281 {
282 if (time == 0)
283 {
284 disk_close();
285 disk_open(afmt, arate, ach);
286 }
279 } 287 }
280 288
281 static void disk_pause(short p) 289 static void disk_pause(short p)
282 { 290 {
283 } 291 }