Mercurial > audlegacy
annotate Plugins/Input/console/Audacious_Driver.cpp @ 316:950f104f2e11 trunk
[svn] Fix spacing in --help output, patch by Mikachu.
| author | chainsaw |
|---|---|
| date | Sun, 18 Dec 2005 06:41:22 -0800 |
| parents | 1e2bd3df8981 |
| children | 1e642d74d68c |
| rev | line source |
|---|---|
|
90
252843aac42f
[svn] Import the initial sources for console music support.
nenolod
parents:
diff
changeset
|
1 /* |
|
252843aac42f
[svn] Import the initial sources for console music support.
nenolod
parents:
diff
changeset
|
2 * Audacious: Cross platform multimedia player |
|
252843aac42f
[svn] Import the initial sources for console music support.
nenolod
parents:
diff
changeset
|
3 * Copyright (c) 2005 Audacious Team |
|
252843aac42f
[svn] Import the initial sources for console music support.
nenolod
parents:
diff
changeset
|
4 * |
|
252843aac42f
[svn] Import the initial sources for console music support.
nenolod
parents:
diff
changeset
|
5 * Driver for Game_Music_Emu library. See details at: |
|
252843aac42f
[svn] Import the initial sources for console music support.
nenolod
parents:
diff
changeset
|
6 * http://www.slack.net/~ant/libs/ |
|
252843aac42f
[svn] Import the initial sources for console music support.
nenolod
parents:
diff
changeset
|
7 */ |
|
252843aac42f
[svn] Import the initial sources for console music support.
nenolod
parents:
diff
changeset
|
8 |
| 94 | 9 #include "Audacious_Driver.h" |
|
90
252843aac42f
[svn] Import the initial sources for console music support.
nenolod
parents:
diff
changeset
|
10 |
|
98
e42694a28331
[svn] More progress -- now loads as an audacious module. :)
nenolod
parents:
96
diff
changeset
|
11 extern "C" { |
|
e42694a28331
[svn] More progress -- now loads as an audacious module. :)
nenolod
parents:
96
diff
changeset
|
12 |
| 109 | 13 #include <glib.h> |
| 96 | 14 #include <glib/gi18n.h> |
| 109 | 15 #include <gtk/gtk.h> |
| 94 | 16 #include "libaudacious/configfile.h" |
| 17 #include "libaudacious/util.h" | |
| 18 #include "libaudacious/titlestring.h" | |
| 145 | 19 #include "audacious/input.h" |
| 95 | 20 #include "audacious/output.h" |
| 288 | 21 #include "libaudcore/playback.h" |
| 94 | 22 |
|
98
e42694a28331
[svn] More progress -- now loads as an audacious module. :)
nenolod
parents:
96
diff
changeset
|
23 }; |
|
e42694a28331
[svn] More progress -- now loads as an audacious module. :)
nenolod
parents:
96
diff
changeset
|
24 |
| 145 | 25 struct AudaciousConsoleConfig audcfg = { 180, FALSE, 32000 }; |
| 26 | |
| 94 | 27 #include <cstring> |
| 213 | 28 #include <stdio.h> |
| 94 | 29 |
|
101
59ba6595fdf1
[svn] More accurate sound reproduction, but there is warbling. Still locks up player on completion.
nenolod
parents:
100
diff
changeset
|
30 #ifdef WORDS_BIGENDIAN |
|
59ba6595fdf1
[svn] More accurate sound reproduction, but there is warbling. Still locks up player on completion.
nenolod
parents:
100
diff
changeset
|
31 # define MY_FMT FMT_S16_BE |
|
59ba6595fdf1
[svn] More accurate sound reproduction, but there is warbling. Still locks up player on completion.
nenolod
parents:
100
diff
changeset
|
32 #else |
|
59ba6595fdf1
[svn] More accurate sound reproduction, but there is warbling. Still locks up player on completion.
nenolod
parents:
100
diff
changeset
|
33 # define MY_FMT FMT_S16_LE |
|
59ba6595fdf1
[svn] More accurate sound reproduction, but there is warbling. Still locks up player on completion.
nenolod
parents:
100
diff
changeset
|
34 #endif |
|
59ba6595fdf1
[svn] More accurate sound reproduction, but there is warbling. Still locks up player on completion.
nenolod
parents:
100
diff
changeset
|
35 |
| 94 | 36 static Spc_Emu *spc = NULL; |
| 213 | 37 static Nsf_Emu *nsf = NULL; |
| 214 | 38 static Gbs_Emu *gbs = NULL; |
| 95 | 39 static GThread *decode_thread; |
| 213 | 40 GStaticMutex playback_mutex = G_STATIC_MUTEX_INIT; |
| 95 | 41 |
|
147
6fe2bfbe6fc2
[svn] Move SPC-specific code into SPC-specific routines.
nenolod
parents:
146
diff
changeset
|
42 static void *play_loop_spc(gpointer arg); |
| 213 | 43 static void *play_loop_nsf(gpointer arg); |
| 214 | 44 static void *play_loop_gbs(gpointer arg); |
| 100 | 45 static void console_init(void); |
| 109 | 46 extern "C" void console_aboutbox(void); |
| 96 | 47 static void console_stop(void); |
| 48 static void console_pause(gshort p); | |
| 49 static int get_time(void); | |
| 103 | 50 static gboolean console_ip_is_going; |
| 100 | 51 extern InputPlugin console_ip; |
|
147
6fe2bfbe6fc2
[svn] Move SPC-specific code into SPC-specific routines.
nenolod
parents:
146
diff
changeset
|
52 static int playing_type; |
| 100 | 53 |
| 94 | 54 static int is_our_file(gchar *filename) |
| 55 { | |
| 56 gchar *ext; | |
| 57 | |
| 58 ext = strrchr(filename, '.'); | |
| 59 | |
| 60 if (ext) | |
| 61 { | |
| 62 if (!strcasecmp(ext, ".spc")) | |
| 213 | 63 return PLAY_TYPE_SPC; |
| 64 if (!strcasecmp(ext, ".nsf")) | |
| 65 return PLAY_TYPE_NSF; | |
| 214 | 66 if (!strcasecmp(ext, ".gbs")) |
| 67 return PLAY_TYPE_GBS; | |
| 94 | 68 } |
| 69 | |
| 70 return 0; | |
| 71 } | |
| 72 | |
| 148 | 73 static gchar *get_title_spc(gchar *filename) |
| 94 | 74 { |
| 75 gchar *title; | |
| 76 Emu_Std_Reader reader; | |
| 77 Spc_Emu::header_t header; | |
| 78 | |
| 79 reader.open(filename); | |
| 80 reader.read(&header, sizeof(header)); | |
| 81 | |
| 104 | 82 if (header.song) |
| 83 { | |
| 84 TitleInput *tinput; | |
| 85 | |
| 86 tinput = bmp_title_input_new(); | |
| 87 | |
|
105
18fe59468510
[svn] Use header.game, over header.author, as most SPC files do not contain the composer information.
nenolod
parents:
104
diff
changeset
|
88 tinput->performer = g_strdup(header.game); |
| 104 | 89 tinput->album_name = g_strdup(header.game); |
| 90 tinput->track_name = g_strdup(header.song); | |
| 94 | 91 |
| 104 | 92 tinput->file_name = g_path_get_basename(filename); |
| 93 tinput->file_path = g_path_get_dirname(filename); | |
| 94 | |
| 95 title = xmms_get_titlestring(xmms_get_gentitle_format(), | |
| 96 tinput); | |
| 97 | |
| 98 g_free(tinput); | |
| 99 } | |
| 100 else | |
| 213 | 101 title = g_path_get_basename(filename); |
| 102 | |
| 103 return title; | |
| 104 } | |
| 99 | 105 |
| 213 | 106 static gchar *get_title_nsf(gchar *filename) |
| 107 { | |
| 108 gchar *title; | |
| 109 title = g_path_get_basename(filename); | |
| 94 | 110 return title; |
| 111 } | |
| 95 | 112 |
| 214 | 113 static gchar *get_title_gbs(gchar *filename) |
| 114 { | |
| 115 gchar *title; | |
| 116 title = g_path_get_basename(filename); | |
| 117 return title; | |
| 118 } | |
| 119 | |
| 148 | 120 static gchar *get_title(gchar *filename) |
| 121 { | |
| 213 | 122 switch (is_our_file(filename)) |
| 148 | 123 { |
| 213 | 124 case PLAY_TYPE_SPC: |
| 148 | 125 return get_title_spc(filename); |
| 213 | 126 break; |
| 127 case PLAY_TYPE_NSF: | |
| 128 return get_title_nsf(filename); | |
| 129 break; | |
| 214 | 130 case PLAY_TYPE_GBS: |
| 131 return get_title_gbs(filename); | |
| 132 break; | |
| 148 | 133 } |
| 134 | |
| 135 return NULL; | |
| 136 } | |
| 137 | |
| 95 | 138 static void get_song_info(char *filename, char **title, int *length) |
| 139 { | |
| 140 (*title) = get_title(filename); | |
| 145 | 141 |
| 142 if (audcfg.loop_length) | |
| 143 (*length) = audcfg.loop_length; | |
| 144 else | |
| 145 (*length) = -1; | |
| 95 | 146 } |
| 147 | |
|
147
6fe2bfbe6fc2
[svn] Move SPC-specific code into SPC-specific routines.
nenolod
parents:
146
diff
changeset
|
148 static void play_file_spc(char *filename) |
| 95 | 149 { |
|
106
d2b88d78ccd7
[svn] Tell the player that the decoder has fired up :)
nenolod
parents:
105
diff
changeset
|
150 gchar *name; |
| 95 | 151 Emu_Std_Reader reader; |
| 152 Spc_Emu::header_t header; | |
| 149 | 153 gint samplerate; |
| 154 | |
| 155 if (audcfg.resample == TRUE) | |
| 156 samplerate = audcfg.resample_rate; | |
| 157 else | |
| 158 samplerate = Spc_Emu::native_sample_rate; | |
| 95 | 159 |
| 160 reader.open(filename); | |
| 161 reader.read(&header, sizeof(header)); | |
| 162 | |
| 163 spc = new Spc_Emu; | |
| 149 | 164 spc->init(samplerate); |
| 95 | 165 spc->load(header, reader); |
| 166 spc->start_track(0); | |
| 167 | |
| 103 | 168 console_ip_is_going = TRUE; |
| 169 | |
|
106
d2b88d78ccd7
[svn] Tell the player that the decoder has fired up :)
nenolod
parents:
105
diff
changeset
|
170 name = get_title(filename); |
|
d2b88d78ccd7
[svn] Tell the player that the decoder has fired up :)
nenolod
parents:
105
diff
changeset
|
171 |
| 145 | 172 if (audcfg.loop_length) |
| 173 console_ip.set_info(name, audcfg.loop_length * 1000, | |
| 149 | 174 spc->voice_count() * 1000, samplerate, 2); |
| 145 | 175 else |
| 149 | 176 console_ip.set_info(name, -1, spc->voice_count() * 1000, |
| 177 samplerate, 2); | |
|
106
d2b88d78ccd7
[svn] Tell the player that the decoder has fired up :)
nenolod
parents:
105
diff
changeset
|
178 |
|
d2b88d78ccd7
[svn] Tell the player that the decoder has fired up :)
nenolod
parents:
105
diff
changeset
|
179 g_free(name); |
|
d2b88d78ccd7
[svn] Tell the player that the decoder has fired up :)
nenolod
parents:
105
diff
changeset
|
180 |
| 149 | 181 if (!console_ip.output->open_audio(MY_FMT, samplerate, 2)) |
| 100 | 182 return; |
|
133
3fb426494de8
[svn] Open the output channel before firing up the thread.
nenolod
parents:
109
diff
changeset
|
183 |
|
147
6fe2bfbe6fc2
[svn] Move SPC-specific code into SPC-specific routines.
nenolod
parents:
146
diff
changeset
|
184 playing_type = PLAY_TYPE_SPC; |
|
6fe2bfbe6fc2
[svn] Move SPC-specific code into SPC-specific routines.
nenolod
parents:
146
diff
changeset
|
185 |
|
6fe2bfbe6fc2
[svn] Move SPC-specific code into SPC-specific routines.
nenolod
parents:
146
diff
changeset
|
186 decode_thread = g_thread_create(play_loop_spc, spc, TRUE, NULL); |
|
6fe2bfbe6fc2
[svn] Move SPC-specific code into SPC-specific routines.
nenolod
parents:
146
diff
changeset
|
187 } |
|
6fe2bfbe6fc2
[svn] Move SPC-specific code into SPC-specific routines.
nenolod
parents:
146
diff
changeset
|
188 |
| 213 | 189 static void play_file_nsf(char *filename) |
| 190 { | |
| 191 gchar *name; | |
| 192 Emu_Std_Reader reader; | |
| 193 Nsf_Emu::header_t header; | |
| 194 gint samplerate; | |
| 195 | |
| 196 if (audcfg.resample == TRUE) | |
| 197 samplerate = audcfg.resample_rate; | |
| 198 else | |
| 199 samplerate = 44100; | |
| 200 | |
| 201 reader.open(filename); | |
| 202 reader.read(&header, sizeof(header)); | |
| 203 | |
| 204 nsf = new Nsf_Emu; | |
| 205 nsf->init(samplerate); | |
| 206 nsf->load(header, reader); | |
| 207 nsf->start_track(0); | |
| 208 | |
| 209 console_ip_is_going = TRUE; | |
| 210 | |
| 211 name = get_title(filename); | |
| 212 | |
| 213 if (audcfg.loop_length) | |
| 214 console_ip.set_info(name, audcfg.loop_length * 1000, | |
| 215 nsf->voice_count() * 1000, samplerate, 2); | |
| 216 else | |
| 217 console_ip.set_info(name, -1, nsf->voice_count() * 1000, | |
| 218 samplerate, 2); | |
| 219 | |
| 220 g_free(name); | |
| 221 | |
| 222 if (!console_ip.output->open_audio(MY_FMT, samplerate, 2)) | |
| 223 return; | |
| 224 | |
| 225 playing_type = PLAY_TYPE_NSF; | |
| 226 | |
| 227 decode_thread = g_thread_create(play_loop_nsf, nsf, TRUE, NULL); | |
| 228 } | |
| 229 | |
| 214 | 230 static void play_file_gbs(char *filename) |
| 231 { | |
| 232 gchar *name; | |
| 233 Emu_Std_Reader reader; | |
| 234 Gbs_Emu::header_t header; | |
| 235 gint samplerate; | |
| 236 | |
| 237 if (audcfg.resample == TRUE) | |
| 238 samplerate = audcfg.resample_rate; | |
| 239 else | |
| 240 samplerate = 44100; | |
| 241 | |
| 242 reader.open(filename); | |
| 243 reader.read(&header, sizeof(header)); | |
| 244 | |
| 245 gbs = new Gbs_Emu; | |
| 246 gbs->init(samplerate); | |
| 247 gbs->load(header, reader); | |
| 248 gbs->start_track(0); | |
| 249 | |
| 250 console_ip_is_going = TRUE; | |
| 251 | |
| 252 name = get_title(filename); | |
| 253 | |
| 254 if (audcfg.loop_length) | |
| 255 console_ip.set_info(name, audcfg.loop_length * 1000, | |
| 256 gbs->voice_count() * 1000, samplerate, 2); | |
| 257 else | |
| 258 console_ip.set_info(name, -1, nsf->voice_count() * 1000, | |
| 259 samplerate, 2); | |
| 260 | |
| 261 g_free(name); | |
| 262 | |
| 263 if (!console_ip.output->open_audio(MY_FMT, samplerate, 2)) | |
| 264 return; | |
| 265 | |
| 266 playing_type = PLAY_TYPE_GBS; | |
| 267 | |
| 268 decode_thread = g_thread_create(play_loop_gbs, gbs, TRUE, NULL); | |
| 269 } | |
| 270 | |
|
147
6fe2bfbe6fc2
[svn] Move SPC-specific code into SPC-specific routines.
nenolod
parents:
146
diff
changeset
|
271 static void play_file(char *filename) |
|
6fe2bfbe6fc2
[svn] Move SPC-specific code into SPC-specific routines.
nenolod
parents:
146
diff
changeset
|
272 { |
| 213 | 273 switch (is_our_file(filename)) |
|
147
6fe2bfbe6fc2
[svn] Move SPC-specific code into SPC-specific routines.
nenolod
parents:
146
diff
changeset
|
274 { |
| 213 | 275 case PLAY_TYPE_SPC: |
|
147
6fe2bfbe6fc2
[svn] Move SPC-specific code into SPC-specific routines.
nenolod
parents:
146
diff
changeset
|
276 play_file_spc(filename); |
| 213 | 277 break; |
| 278 case PLAY_TYPE_NSF: | |
| 279 play_file_nsf(filename); | |
| 280 break; | |
| 214 | 281 case PLAY_TYPE_GBS: |
| 282 play_file_gbs(filename); | |
| 283 break; | |
|
147
6fe2bfbe6fc2
[svn] Move SPC-specific code into SPC-specific routines.
nenolod
parents:
146
diff
changeset
|
284 } |
| 95 | 285 } |
| 286 | |
| 96 | 287 static void seek(gint time) |
| 288 { | |
| 289 // XXX: Not yet implemented | |
| 290 } | |
| 291 | |
| 292 InputPlugin console_ip = { | |
| 293 NULL, | |
| 294 NULL, | |
| 295 NULL, | |
| 296 console_init, | |
| 109 | 297 console_aboutbox, |
| 96 | 298 NULL, |
| 299 is_our_file, | |
| 300 NULL, | |
| 301 play_file, | |
| 302 console_stop, | |
| 303 console_pause, | |
| 304 seek, | |
| 305 NULL, | |
| 306 get_time, | |
| 307 NULL, | |
| 308 NULL, | |
| 309 NULL, | |
| 310 NULL, | |
| 311 NULL, | |
| 312 NULL, | |
| 313 NULL, | |
| 104 | 314 get_song_info, |
| 96 | 315 NULL, |
| 316 NULL | |
| 317 }; | |
| 318 | |
| 319 static void console_stop(void) | |
| 320 { | |
| 103 | 321 console_ip_is_going = FALSE; |
| 96 | 322 g_thread_join(decode_thread); |
| 323 console_ip.output->close_audio(); | |
| 324 } | |
| 325 | |
|
98
e42694a28331
[svn] More progress -- now loads as an audacious module. :)
nenolod
parents:
96
diff
changeset
|
326 extern "C" InputPlugin *get_iplugin_info(void) |
| 96 | 327 { |
| 109 | 328 console_ip.description = g_strdup_printf(_("SPC, GYM, NSF, VGM and GBS module decoder")); |
| 96 | 329 return &console_ip; |
| 330 } | |
| 331 | |
| 332 static void console_pause(gshort p) | |
| 333 { | |
| 334 console_ip.output->pause(p); | |
| 335 } | |
| 336 | |
|
147
6fe2bfbe6fc2
[svn] Move SPC-specific code into SPC-specific routines.
nenolod
parents:
146
diff
changeset
|
337 static void *play_loop_spc(gpointer arg) |
| 95 | 338 { |
| 213 | 339 g_static_mutex_lock(&playback_mutex); |
| 99 | 340 Spc_Emu *my_spc = (Spc_Emu *) arg; |
| 213 | 341 Music_Emu::sample_t buf[1024]; |
| 95 | 342 |
| 145 | 343 for (;;) |
| 344 { | |
| 345 if (!console_ip_is_going) | |
| 346 break; | |
| 347 | |
| 348 my_spc->play(1024, buf); | |
| 349 | |
| 350 if ((console_ip.output->output_time() / 1000) > | |
| 351 audcfg.loop_length && audcfg.loop_length != 0) | |
| 352 break; | |
| 100 | 353 console_ip.add_vis_pcm(console_ip.output->written_time(), |
| 108 | 354 MY_FMT, 1, 2048, buf); |
| 355 while(console_ip.output->buffer_free() < 2048) | |
|
101
59ba6595fdf1
[svn] More accurate sound reproduction, but there is warbling. Still locks up player on completion.
nenolod
parents:
100
diff
changeset
|
356 xmms_usleep(10000); |
| 108 | 357 console_ip.output->write_audio(buf, 2048); |
| 100 | 358 } |
| 95 | 359 |
| 96 | 360 delete spc; |
| 145 | 361 console_ip.output->close_audio(); |
| 362 console_ip_is_going = FALSE; | |
|
147
6fe2bfbe6fc2
[svn] Move SPC-specific code into SPC-specific routines.
nenolod
parents:
146
diff
changeset
|
363 playing_type = PLAY_TYPE_NONE; |
| 213 | 364 g_static_mutex_unlock(&playback_mutex); |
| 365 g_thread_exit(NULL); | |
| 366 | |
| 367 return NULL; | |
| 368 } | |
| 369 | |
| 370 static void *play_loop_nsf(gpointer arg) | |
| 371 { | |
| 372 g_static_mutex_lock(&playback_mutex); | |
| 373 Nsf_Emu *my_nsf = (Nsf_Emu *) arg; | |
| 374 Music_Emu::sample_t buf[1024]; | |
| 375 | |
| 376 for (;;) | |
| 377 { | |
| 378 if (!console_ip_is_going) | |
| 379 break; | |
| 380 | |
| 381 my_nsf->play(1024, buf); | |
| 382 | |
| 383 if ((console_ip.output->output_time() / 1000) > | |
| 384 audcfg.loop_length && audcfg.loop_length != 0) | |
| 385 break; | |
| 386 console_ip.add_vis_pcm(console_ip.output->written_time(), | |
| 387 MY_FMT, 1, 2048, buf); | |
| 388 while(console_ip.output->buffer_free() < 2048) | |
| 389 xmms_usleep(10000); | |
| 390 console_ip.output->write_audio(buf, 2048); | |
| 391 } | |
| 392 | |
| 393 delete nsf; | |
| 394 console_ip.output->close_audio(); | |
| 395 console_ip_is_going = FALSE; | |
| 396 playing_type = PLAY_TYPE_NONE; | |
| 397 g_static_mutex_unlock(&playback_mutex); | |
| 96 | 398 g_thread_exit(NULL); |
| 95 | 399 |
| 96 | 400 return NULL; |
| 95 | 401 } |
| 402 | |
| 214 | 403 static void *play_loop_gbs(gpointer arg) |
| 404 { | |
| 405 g_static_mutex_lock(&playback_mutex); | |
| 406 Gbs_Emu *my_gbs = (Gbs_Emu *) arg; | |
| 407 Music_Emu::sample_t buf[1024]; | |
| 408 | |
| 409 for (;;) | |
| 410 { | |
| 411 if (!console_ip_is_going) | |
| 412 break; | |
| 413 | |
| 414 my_gbs->play(1024, buf); | |
| 415 | |
| 416 if ((console_ip.output->output_time() / 1000) > | |
| 417 audcfg.loop_length && audcfg.loop_length != 0) | |
| 418 break; | |
| 419 console_ip.add_vis_pcm(console_ip.output->written_time(), | |
| 420 MY_FMT, 1, 2048, buf); | |
| 421 while(console_ip.output->buffer_free() < 2048) | |
| 422 xmms_usleep(10000); | |
| 423 console_ip.output->write_audio(buf, 2048); | |
| 424 } | |
| 425 | |
| 426 delete gbs; | |
| 427 console_ip.output->close_audio(); | |
| 428 console_ip_is_going = FALSE; | |
| 429 playing_type = PLAY_TYPE_NONE; | |
| 430 g_static_mutex_unlock(&playback_mutex); | |
| 431 g_thread_exit(NULL); | |
| 432 | |
| 433 return NULL; | |
| 434 } | |
| 435 | |
| 96 | 436 static int get_time(void) |
| 437 { | |
| 145 | 438 if (console_ip_is_going == TRUE) |
| 439 return console_ip.output->output_time(); | |
| 440 else | |
| 441 return -1; | |
| 96 | 442 } |
| 95 | 443 |
| 100 | 444 static void console_init(void) |
| 445 { | |
|
150
1997ecd9dcb1
[svn] Add ability to override defaults via .audacious/config until we can get a GUI.
nenolod
parents:
149
diff
changeset
|
446 ConfigFile *cfg; |
| 100 | 447 |
|
150
1997ecd9dcb1
[svn] Add ability to override defaults via .audacious/config until we can get a GUI.
nenolod
parents:
149
diff
changeset
|
448 cfg = xmms_cfg_open_default_file(); |
|
1997ecd9dcb1
[svn] Add ability to override defaults via .audacious/config until we can get a GUI.
nenolod
parents:
149
diff
changeset
|
449 |
|
1997ecd9dcb1
[svn] Add ability to override defaults via .audacious/config until we can get a GUI.
nenolod
parents:
149
diff
changeset
|
450 xmms_cfg_read_int(cfg, "console", "loop_length", &audcfg.loop_length); |
|
1997ecd9dcb1
[svn] Add ability to override defaults via .audacious/config until we can get a GUI.
nenolod
parents:
149
diff
changeset
|
451 xmms_cfg_read_boolean(cfg, "console", "resample", &audcfg.resample); |
|
1997ecd9dcb1
[svn] Add ability to override defaults via .audacious/config until we can get a GUI.
nenolod
parents:
149
diff
changeset
|
452 xmms_cfg_read_int(cfg, "console", "resample_rate", &audcfg.resample_rate); |
|
1997ecd9dcb1
[svn] Add ability to override defaults via .audacious/config until we can get a GUI.
nenolod
parents:
149
diff
changeset
|
453 |
|
1997ecd9dcb1
[svn] Add ability to override defaults via .audacious/config until we can get a GUI.
nenolod
parents:
149
diff
changeset
|
454 xmms_cfg_free(cfg); |
| 100 | 455 } |
| 456 | |
| 109 | 457 extern "C" void console_aboutbox(void) |
| 458 { | |
| 459 xmms_show_message(_("About the Console Music Decoder"), | |
| 460 _("Console music decoder engine based on Game_Music_Emu 0.2.4.\n" | |
| 461 "Audacious implementation by: William Pitcock <nenolod@nenolod.net>"), | |
| 462 _("Ok"), | |
| 463 FALSE, NULL, NULL); | |
| 464 } |
