# HG changeset patch # User Matti Hamalainen # Date 1352134271 -7200 # Node ID 36c6a6e629bbcbf8f19d358a9885d3bef9496966 # Parent 64e7e427a4360981edb437180c43bf6693817369 Rename some variables. diff -r 64e7e427a436 -r 36c6a6e629bb src/xmms-sid.c --- a/src/xmms-sid.c Mon Nov 05 18:47:33 2012 +0200 +++ b/src/xmms-sid.c Mon Nov 05 18:51:11 2012 +0200 @@ -166,8 +166,8 @@ xs_tuneinfo_free(xs_status.tuneInfo); xs_status.tuneInfo = NULL; - xs_status.sidPlayer->plrDeleteSID(&xs_status); - xs_status.sidPlayer->plrClose(&xs_status); + xs_status.engine->plrDeleteSID(&xs_status); + xs_status.engine->plrClose(&xs_status); xs_songlen_close(); xs_stil_close(); @@ -182,7 +182,7 @@ gint xs_is_our_file(gchar *filename) { gchar *ext; - assert(xs_status.sidPlayer); + assert(xs_status.engine); /* Check the filename */ if (filename == NULL) @@ -192,7 +192,7 @@ if (xs_cfg.detectMagic) { XSFile *f; if ((f = xs_fopen(filename, "rb")) != NULL) { - if (xs_status.sidPlayer->plrProbe(f)) + if (xs_status.engine->plrProbe(f)) return TRUE; xs_fclose(f); } @@ -323,7 +323,7 @@ } /* Initialize song */ - if (!myStatus.sidPlayer->plrInitSong(&myStatus)) { + if (!myStatus.engine->plrInitSong(&myStatus)) { xs_error("Couldn't initialize SID-tune '%s' (sub-tune #%i)!\n", myTune->sidFilename, myStatus.currSong); goto xs_err_exit; @@ -350,7 +350,7 @@ /* Set song information for current subtune */ XSDEBUG("set tune info\n"); - myStatus.sidPlayer->plrUpdateSIDInfo(&myStatus); + myStatus.engine->plrUpdateSIDInfo(&myStatus); tmpTitle = xs_make_titlestring(myTune, myStatus.currSong); xs_plugin_ip.set_info( @@ -368,7 +368,7 @@ * Play the subtune */ while (xs_status.isPlaying && myStatus.isPlaying && (xs_status.currSong == myStatus.currSong)) { - audioGot = myStatus.sidPlayer->plrFillBuffer( + audioGot = myStatus.engine->plrFillBuffer( &myStatus, audioBuffer, XS_AUDIOBUF_SIZE); /* I <3 visualice/haujobb */ @@ -455,16 +455,16 @@ */ void xs_play_file(gchar *filename) { - assert(xs_status.sidPlayer); + assert(xs_status.engine); XSDEBUG("play '%s'\n", filename); /* Get tune information */ - if ((xs_status.tuneInfo = xs_status.sidPlayer->plrGetSIDInfo(filename)) == NULL) + if ((xs_status.tuneInfo = xs_status.engine->plrGetSIDInfo(filename)) == NULL) return; /* Initialize the tune */ - if (!xs_status.sidPlayer->plrLoadSID(&xs_status, filename)) { + if (!xs_status.engine->plrLoadSID(&xs_status, filename)) { xs_tuneinfo_free(xs_status.tuneInfo); xs_status.tuneInfo = NULL; return; @@ -482,7 +482,7 @@ xs_error("Couldn't create playing thread!\n"); xs_tuneinfo_free(xs_status.tuneInfo); xs_status.tuneInfo = NULL; - xs_status.sidPlayer->plrDeleteSID(&xs_status); + xs_status.engine->plrDeleteSID(&xs_status); } /* Okay, here the playing thread has started up and we @@ -530,7 +530,7 @@ /* Free tune information */ XS_MUTEX_LOCK(xs_status); - xs_status.sidPlayer->plrDeleteSID(&xs_status); + xs_status.engine->plrDeleteSID(&xs_status); xs_tuneinfo_free(xs_status.tuneInfo); xs_status.tuneInfo = NULL; XS_MUTEX_UNLOCK(xs_status); @@ -831,7 +831,7 @@ XS_MUTEX_LOCK(xs_status); /* Get tune information from emulation engine */ - info = xs_status.sidPlayer->plrGetSIDInfo(songFilename); + info = xs_status.engine->plrGetSIDInfo(songFilename); if (!info) { XS_MUTEX_UNLOCK(xs_status); return; diff -r 64e7e427a436 -r 36c6a6e629bb src/xs_fileinfo.c --- a/src/xs_fileinfo.c Mon Nov 05 18:47:33 2012 +0200 +++ b/src/xs_fileinfo.c Mon Nov 05 18:51:11 2012 +0200 @@ -187,7 +187,7 @@ /* Get new tune information */ XS_MUTEX_LOCK(xs_fileinfowin); XS_MUTEX_LOCK(xs_status); - if ((tmpInfo = xs_status.sidPlayer->plrGetSIDInfo(tmpFilename)) == NULL) { + if ((tmpInfo = xs_status.engine->plrGetSIDInfo(tmpFilename)) == NULL) { XS_MUTEX_UNLOCK(xs_fileinfowin); XS_MUTEX_UNLOCK(xs_status); return; diff -r 64e7e427a436 -r 36c6a6e629bb src/xs_player.c --- a/src/xs_player.c Mon Nov 05 18:47:33 2012 +0200 +++ b/src/xs_player.c Mon Nov 05 18:51:11 2012 +0200 @@ -49,7 +49,7 @@ if (xs_enginelist[engine].plrIdent == *configured) { if (xs_enginelist[engine].plrInit(status)) { initialized = TRUE; - status->sidPlayer = (XSEngine *) & xs_enginelist[engine]; + status->engine = (XSEngine *) & xs_enginelist[engine]; } } engine++; @@ -61,7 +61,7 @@ while (engine < xs_nenginelist && !initialized) { if (xs_enginelist[engine].plrInit(status)) { initialized = TRUE; - status->sidPlayer = (XSEngine *) &xs_enginelist[engine]; + status->engine = (XSEngine *) &xs_enginelist[engine]; *configured = xs_enginelist[engine].plrIdent; } else engine++; diff -r 64e7e427a436 -r 36c6a6e629bb src/xs_player.h --- a/src/xs_player.h Mon Nov 05 18:47:33 2012 +0200 +++ b/src/xs_player.h Mon Nov 05 18:51:11 2012 +0200 @@ -19,24 +19,24 @@ guint (*plrFillBuffer)(struct XSEngineState *, gchar *, guint); gboolean (*plrLoadSID)(struct XSEngineState *, gchar *); void (*plrDeleteSID)(struct XSEngineState *); - XSTuneInfo* (*plrGetSIDInfo)(const gchar *); + XSTuneInfo* (*plrGetSIDInfo)(const gchar *); gboolean (*plrUpdateSIDInfo)(struct XSEngineState *); void (*plrFlush)(struct XSEngineState *); } XSEngine; typedef struct XSEngineState { - gint audioFrequency, /* Audio settings */ + gint audioFrequency, /* Audio settings */ audioChannels, audioBitsPerSample; AFormat audioFormat; - void *sidEngine; /* SID-emulation internal engine data */ - XSEngine *sidPlayer; /* Selected player engine */ + void *internal; /* SID-emulation internal engine data */ + XSEngine *engine; /* Selected player engine */ gboolean isError, isPlaying, isInitialized; - gint currSong, /* Current sub-tune */ + gint currSong, /* Current sub-tune */ lastTime; XSTuneInfo *tuneInfo; diff -r 64e7e427a436 -r 36c6a6e629bb src/xs_sidplay.h --- a/src/xs_sidplay.h Mon Nov 05 18:47:33 2012 +0200 +++ b/src/xs_sidplay.h Mon Nov 05 18:51:11 2012 +0200 @@ -96,10 +96,10 @@ XSTuneInfo *i; /* Check if we have required structures initialized */ - if (!myStatus || !myStatus->tuneInfo || !myStatus->sidEngine) + if (!myStatus || !myStatus->tuneInfo || !myStatus->internal) return FALSE; - myEngine = (TENGINE *) myStatus->sidEngine; + myEngine = (TENGINE *) myStatus->internal; myTune = myEngine->currTune; if (!myTune) return FALSE; diff -r 64e7e427a436 -r 36c6a6e629bb src/xs_sidplay1.cc --- a/src/xs_sidplay1.cc Mon Nov 05 18:47:33 2012 +0200 +++ b/src/xs_sidplay1.cc Mon Nov 05 18:51:11 2012 +0200 @@ -106,7 +106,7 @@ return FALSE; } - myStatus->sidEngine = myEngine; + myStatus->internal = myEngine; /* Get current configuration */ myEngine->currEng->getConfig(myEngine->currConfig); @@ -249,7 +249,7 @@ xs_sidplay1_t *myEngine; assert(myStatus); - myEngine = (xs_sidplay1_t *) myStatus->sidEngine; + myEngine = (xs_sidplay1_t *) myStatus->internal; /* Free internals */ if (myEngine->currEng) { @@ -265,7 +265,7 @@ xs_sidplay1_delete(myStatus); g_free(myEngine); - myStatus->sidEngine = NULL; + myStatus->internal = NULL; } @@ -276,7 +276,7 @@ xs_sidplay1_t *myEngine; assert(myStatus); - myEngine = (xs_sidplay1_t *) myStatus->sidEngine; + myEngine = (xs_sidplay1_t *) myStatus->internal; if (!myEngine) return FALSE; if (!myEngine->currTune) { @@ -302,7 +302,7 @@ xs_sidplay1_t *myEngine; assert(myStatus); - myEngine = (xs_sidplay1_t *) myStatus->sidEngine; + myEngine = (xs_sidplay1_t *) myStatus->internal; if (!myEngine) return 0; sidEmuFillBuffer(*myEngine->currEng, *myEngine->currTune, audioBuffer, audioBufSize); @@ -319,7 +319,7 @@ assert(myStatus); myStatus->isInitialized = FALSE; - myEngine = (xs_sidplay1_t *) myStatus->sidEngine; + myEngine = (xs_sidplay1_t *) myStatus->internal; if (!myEngine) return FALSE; /* Try to get the tune */ @@ -342,7 +342,7 @@ xs_sidplay1_t *myEngine; assert(myStatus); - myEngine = (xs_sidplay1_t *) myStatus->sidEngine; + myEngine = (xs_sidplay1_t *) myStatus->internal; if (!myEngine) return; g_free(myEngine->buf); diff -r 64e7e427a436 -r 36c6a6e629bb src/xs_sidplay2.cc --- a/src/xs_sidplay2.cc Mon Nov 05 18:47:33 2012 +0200 +++ b/src/xs_sidplay2.cc Mon Nov 05 18:51:11 2012 +0200 @@ -131,7 +131,7 @@ /* Allocate internal structures */ myEngine = new xs_sidplay2_t(); - myStatus->sidEngine = myEngine; + myStatus->internal = myEngine; if (!myEngine) return FALSE; /* Initialize the engine */ @@ -435,7 +435,7 @@ xs_sidplay2_t *myEngine; assert(myStatus); - myEngine = (xs_sidplay2_t *) myStatus->sidEngine; + myEngine = (xs_sidplay2_t *) myStatus->internal; /* Free internals */ if (myEngine->currBuilder) { @@ -460,7 +460,7 @@ xs_sidplay2_delete(myStatus); delete myEngine; - myStatus->sidEngine = NULL; + myStatus->internal = NULL; } @@ -471,7 +471,7 @@ xs_sidplay2_t *myEngine; assert(myStatus); - myEngine = (xs_sidplay2_t *) myStatus->sidEngine; + myEngine = (xs_sidplay2_t *) myStatus->internal; if (!myEngine) return FALSE; if (!myEngine->currTune->selectSong(myStatus->currSong)) { @@ -497,7 +497,7 @@ xs_sidplay2_t *myEngine; assert(myStatus); - myEngine = (xs_sidplay2_t *) myStatus->sidEngine; + myEngine = (xs_sidplay2_t *) myStatus->internal; if (!myEngine) return 0; return myEngine->currEng->play((short *) audioBuffer, audioBufSize / sizeof(short)); @@ -512,7 +512,7 @@ assert(myStatus); myStatus->isInitialized = FALSE; - myEngine = (xs_sidplay2_t *) myStatus->sidEngine; + myEngine = (xs_sidplay2_t *) myStatus->internal; if (!myEngine) return FALSE; /* Try to get the tune */ @@ -535,7 +535,7 @@ xs_sidplay2_t *myEngine; assert(myStatus); - myEngine = (xs_sidplay2_t *) myStatus->sidEngine; + myEngine = (xs_sidplay2_t *) myStatus->internal; if (!myEngine) return; g_free(myEngine->buf);