Mercurial > hg > xmms-sid
diff src/xmms-sid.c @ 147:a7abcda7a86c
SLDB, STIL and emulation engine settings are now updated
after properties have been changed, no need to restart XMMS anymore.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 06 Mar 2004 18:40:02 +0000 |
parents | 8b9c14540e53 |
children | 505da1389e5c |
line wrap: on
line diff
--- a/src/xmms-sid.c Sat Mar 06 18:39:00 2004 +0000 +++ b/src/xmms-sid.c Sat Mar 06 18:40:02 2004 +0000 @@ -119,20 +119,19 @@ void xs_subctrl_close(void); + /* - * Initialize XMMS-SID + * Re-initialize some settings */ -void xs_init(void) +void xs_reinit(void) { gint iPlayer; gboolean isInitialized; - XSDEBUG("xs_init()\n"); - - /* Initialize and get configuration */ - memset(&xs_cfg, 0, sizeof(xs_cfg)); - xs_read_configuration(); - + /* Stop playing, if we are */ + if (xs_status.isPlaying) + xs_stop(); + /* Initialize status */ memset(&xs_status, 0, sizeof(xs_status)); xs_status.audioFrequency = xs_cfg.audioFrequency; @@ -174,17 +173,35 @@ XSDEBUG("init#2: %s, %i\n", (isInitialized) ? "OK" : "FAILED", iPlayer); /* Initialize song-length database */ + xs_songlen_close(); if (xs_cfg.songlenDBEnable && (xs_songlen_init() < 0)) - { + { XSERR("Error initializing song-length database!\n"); } /* Initialize STIL database */ + xs_stil_close(); if (xs_cfg.stilDBEnable && (xs_stil_init() < 0)) { XSERR("Error initializing STIL database!\n"); } +} + +/* + * Initialize XMMS-SID + */ +void xs_init(void) +{ + XSDEBUG("xs_init()\n"); + + /* Initialize and get configuration */ + memset(&xs_cfg, 0, sizeof(xs_cfg)); + xs_read_configuration(); + + /* Initialize subsystems */ + xs_reinit(); + XSDEBUG("OK\n"); }