| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
/* |
| 2 | 2 |
* xSF - 2SF configuration |
| 3 | 3 |
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com] |
| 4 |
- * Last modification on 2013-03-25 |
|
| 4 |
+ * Last modification on 2013-03-30 |
|
| 5 | 5 |
* |
| 6 | 6 |
* Partially based on the vio*sf framework |
| 7 | 7 |
*/ |
| ... | ... |
@@ -119,7 +119,7 @@ void XSFConfig_2SF::SaveSpecificConfigDialog(HWND hwndDlg) |
| 119 | 119 |
this->mutes[x] = !!SendMessageW(GetDlgItem(hwndDlg, idMutes), LB_GETSEL, x, 0); |
| 120 | 120 |
} |
| 121 | 121 |
|
| 122 |
-void XSFConfig_2SF::CopySpecificConfigToMemory(XSFPlayer *xSFPlayer, bool preLoad) |
|
| 122 |
+void XSFConfig_2SF::CopySpecificConfigToMemory(XSFPlayer *, bool preLoad) |
|
| 123 | 123 |
{
|
| 124 | 124 |
if (!preLoad) |
| 125 | 125 |
{
|
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
/* |
| 2 | 2 |
* xSF - 2SF Player |
| 3 | 3 |
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com] |
| 4 |
- * Last modification on 2013-03-25 |
|
| 4 |
+ * Last modification on 2013-03-30 |
|
| 5 | 5 |
* |
| 6 | 6 |
* Based on a modified vio2sf v0.22c |
| 7 | 7 |
* |
| ... | ... |
@@ -196,7 +196,7 @@ static void load_setstate() |
| 196 | 196 |
|
| 197 | 197 |
/* Read ARM7 cpu registers */ |
| 198 | 198 |
//load_getu32(&NDS_ARM7.proc_ID, 1); |
| 199 |
- load_getu32(NULL, 1); |
|
| 199 |
+ load_getu32(nullptr, 1); |
|
| 200 | 200 |
load_getu32(&NDS_ARM7.instruction, 1); |
| 201 | 201 |
load_getu32(&NDS_ARM7.instruct_adr, 1); |
| 202 | 202 |
load_getu32(&NDS_ARM7.next_instruction, 1); |
| ... | ... |
@@ -231,18 +231,18 @@ static void load_setstate() |
| 231 | 231 |
bool tmpbool; |
| 232 | 232 |
//load_getbool(&NDS_ARM7.wIRQ, 1); |
| 233 | 233 |
//loaderwork.stateptr += 4; |
| 234 |
- load_getbool(NULL, 1); |
|
| 234 |
+ load_getbool(nullptr, 1); |
|
| 235 | 235 |
//load_getbool(&NDS_ARM7.halt_IE_and_IF, 1); |
| 236 | 236 |
//load_getbool(&NDS_ARM7.wirq, 1); |
| 237 | 237 |
//loaderwork.stateptr += 4; |
| 238 |
- //load_getbool(NULL, 1); |
|
| 238 |
+ //load_getbool(nullptr, 1); |
|
| 239 | 239 |
//load_getbool(&NDS_ARM7.intrWaitARM_state, 1); |
| 240 | 240 |
load_getbool(&tmpbool, 1); |
| 241 | 241 |
//NDS_ARM7.intrWaitARM_state = tmpbool; |
| 242 | 242 |
|
| 243 | 243 |
/* Read ARM9 cpu registers */ |
| 244 | 244 |
//load_getu32(&NDS_ARM9.proc_ID, 1); |
| 245 |
- load_getu32(NULL, 1); |
|
| 245 |
+ load_getu32(nullptr, 1); |
|
| 246 | 246 |
load_getu32(&NDS_ARM9.instruction, 1); |
| 247 | 247 |
load_getu32(&NDS_ARM9.instruct_adr, 1); |
| 248 | 248 |
load_getu32(&NDS_ARM9.next_instruction, 1); |
| ... | ... |
@@ -276,11 +276,11 @@ static void load_setstate() |
| 276 | 276 |
load_getbool(&NDS_ARM9.waitIRQ, 1); |
| 277 | 277 |
//load_getbool(&NDS_ARM9.wIRQ, 1); |
| 278 | 278 |
//loaderwork.stateptr += 4; |
| 279 |
- load_getbool(NULL, 1); |
|
| 279 |
+ load_getbool(nullptr, 1); |
|
| 280 | 280 |
//load_getbool(&NDS_ARM9.halt_IE_and_IF, 1); |
| 281 | 281 |
//load_getbool(&NDS_ARM9.wirq, 1); |
| 282 | 282 |
//loaderwork.stateptr += 4; |
| 283 |
- //load_getbool(NULL, 1); |
|
| 283 |
+ //load_getbool(nullptr, 1); |
|
| 284 | 284 |
//load_getbool(&NDS_ARM9.intrWaitARM_state, 1); |
| 285 | 285 |
load_getbool(&tmpbool, 1); |
| 286 | 286 |
//NDS_ARM9.intrWaitARM_state = tmpbool; |
| ... | ... |
@@ -288,9 +288,9 @@ static void load_setstate() |
| 288 | 288 |
/* Read in other internal variables that are important */ |
| 289 | 289 |
//int32_t tmps32; |
| 290 | 290 |
//load_gets32(&nds.ARM9Cycle, 1); |
| 291 |
- load_gets32(NULL, 1); |
|
| 291 |
+ load_gets32(nullptr, 1); |
|
| 292 | 292 |
//load_gets32(&nds.ARM7Cycle, 1); |
| 293 |
- load_gets32(NULL, 1); |
|
| 293 |
+ load_gets32(nullptr, 1); |
|
| 294 | 294 |
load_gets32(&nds.cycles, 1); |
| 295 | 295 |
int32_t tmps32_array[4]; |
| 296 | 296 |
//load_getu64(nds.timerCycle[0], 4); |
| ... | ... |
@@ -304,33 +304,33 @@ static void load_setstate() |
| 304 | 304 |
//bool tmpbool_array[4]; |
| 305 | 305 |
//load_getbool(nds.timerOver[0], 4); |
| 306 | 306 |
//loaderwork.stateptr += 16; |
| 307 |
- load_getbool(NULL, 4); |
|
| 307 |
+ load_getbool(nullptr, 4); |
|
| 308 | 308 |
//load_getbool(nds.timerOver[1], 4); |
| 309 | 309 |
//loaderwork.stateptr += 16; |
| 310 |
- load_getbool(NULL, 4); |
|
| 310 |
+ load_getbool(nullptr, 4); |
|
| 311 | 311 |
//load_gets32(&nds.nextHBlank, 1); |
| 312 | 312 |
//loaderwork.stateptr += 4; |
| 313 |
- load_gets32(NULL, 1); |
|
| 313 |
+ load_gets32(nullptr, 1); |
|
| 314 | 314 |
load_getu32(&nds.VCount, 1); |
| 315 | 315 |
load_getu32(&nds.old, 1); |
| 316 | 316 |
//load_gets32(&nds.diff, 1); |
| 317 | 317 |
//loaderwork.stateptr += 4; |
| 318 |
- load_gets32(NULL, 1); |
|
| 318 |
+ load_gets32(nullptr, 1); |
|
| 319 | 319 |
//load_getbool(&nds.lignerendu, 1); |
| 320 | 320 |
//loaderwork.stateptr += 4; |
| 321 |
- load_getbool(NULL, 1); |
|
| 322 |
- load_getu16(NULL, 1); |
|
| 323 |
- load_getu16(NULL, 1); |
|
| 321 |
+ load_getbool(nullptr, 1); |
|
| 322 |
+ load_getu16(nullptr, 1); |
|
| 323 |
+ load_getu16(nullptr, 1); |
|
| 324 | 324 |
|
| 325 | 325 |
/* Read in memory/registers specific to the ARM9 */ |
| 326 | 326 |
//load_getu8 (MMU.ARM9_ITCM, 0x8000); |
| 327 |
- load_getu8(NULL, 0x8000); |
|
| 327 |
+ load_getu8(nullptr, 0x8000); |
|
| 328 | 328 |
load_getu8 (MMU.ARM9_DTCM, 0x4000); |
| 329 | 329 |
//load_getu8 (MMU.MAIN_MEM, 0x1000000); |
| 330 | 330 |
//load_getu8(MMU.MAIN_MEM, 0x800000); |
| 331 |
- //load_getu8(NULL, 0x800000); |
|
| 332 |
- //load_getu8(NULL, 0x1000000); |
|
| 333 |
- load_getu8(NULL, 0xFF8000); |
|
| 331 |
+ //load_getu8(nullptr, 0x800000); |
|
| 332 |
+ //load_getu8(nullptr, 0x1000000); |
|
| 333 |
+ load_getu8(nullptr, 0xFF8000); |
|
| 334 | 334 |
load_getu8(MMU.ARM9_ITCM, 0x8000); |
| 335 | 335 |
load_getu8 (MMU.MAIN_MEM/*+0x400000*/, 0x400000); |
| 336 | 336 |
load_getu8 (MMU.ARM9_REG, 0x10000); |
| ... | ... |
@@ -339,19 +339,19 @@ static void load_setstate() |
| 339 | 339 |
//uint8_t tmpu8_ABG[0x80000]; |
| 340 | 340 |
//load_getu8 (ARM9Mem.ARM9_ABG, 0x80000); |
| 341 | 341 |
//loaderwork.stateptr += 0x80000; |
| 342 |
- load_getu8(NULL, 0x80000); |
|
| 342 |
+ load_getu8(nullptr, 0x80000); |
|
| 343 | 343 |
//uint8_t tmpu8_BBG[0x20000]; |
| 344 | 344 |
//load_getu8 (ARM9Mem.ARM9_BBG, 0x20000); |
| 345 | 345 |
//loaderwork.stateptr += 0x20000; |
| 346 |
- load_getu8(NULL, 0x20000); |
|
| 346 |
+ load_getu8(nullptr, 0x20000); |
|
| 347 | 347 |
//uint8_t tmpu8_AOBJ[0x40000]; |
| 348 | 348 |
//load_getu8 (ARM9Mem.ARM9_AOBJ, 0x40000); |
| 349 | 349 |
//loaderwork.stateptr += 0x40000; |
| 350 |
- load_getu8(NULL, 0x40000); |
|
| 350 |
+ load_getu8(nullptr, 0x40000); |
|
| 351 | 351 |
//uint8_t tmpu8_BOBJ[0x20000]; |
| 352 | 352 |
//load_getu8 (ARM9Mem.ARM9_BOBJ, 0x20000); |
| 353 | 353 |
//loaderwork.stateptr += 0x20000; |
| 354 |
- load_getu8(NULL, 0x20000); |
|
| 354 |
+ load_getu8(nullptr, 0x20000); |
|
| 355 | 355 |
load_getu8 (MMU.ARM9_LCD, 0xA4000); |
| 356 | 356 |
//loaderwork.stateptr += 12; |
| 357 | 357 |
|
| ... | ... |
@@ -422,14 +422,14 @@ static SoundInterface_struct SNDIF_2SF = |
| 422 | 422 |
SNDIFMuteAudio, |
| 423 | 423 |
SNDIFUnMuteAudio, |
| 424 | 424 |
SNDIFSetVolume, |
| 425 |
- NULL |
|
| 425 |
+ nullptr |
|
| 426 | 426 |
}; |
| 427 | 427 |
|
| 428 | 428 |
SoundInterface_struct *SNDCoreList[] = |
| 429 | 429 |
{
|
| 430 | 430 |
&SNDIF_2SF, |
| 431 | 431 |
&SNDDummy, |
| 432 |
- NULL |
|
| 432 |
+ nullptr |
|
| 433 | 433 |
}; |
| 434 | 434 |
|
| 435 | 435 |
static void Map2SFSection(const std::vector<uint8_t> §ion, bool isSave) |
| ... | ... |
@@ -1985,7 +1985,7 @@ void DmaController::doCopy() |
| 1985 | 1985 |
//determine how we're going to copy |
| 1986 | 1986 |
bool bogarted = false; |
| 1987 | 1987 |
uint32_t sz = (bitWidth==EDMABitWidth_16)?2:4; |
| 1988 |
- uint32_t dstinc = 0,srcinc; |
|
| 1988 |
+ uint32_t dstinc = 0,srcinc = 0; |
|
| 1989 | 1989 |
switch(dar) {
|
| 1990 | 1990 |
case EDMADestinationUpdate_Increment : dstinc = sz; break; |
| 1991 | 1991 |
case EDMADestinationUpdate_Decrement : dstinc = (uint32_t)-(int32_t)sz; break; |
| ... | ... |
@@ -1041,7 +1041,7 @@ template<int FORMAT, SPUInterpolationMode INTERPOLATE_MODE, int CHANNELS> |
| 1041 | 1041 |
{
|
| 1042 | 1042 |
if(CHANNELS != -1) |
| 1043 | 1043 |
{
|
| 1044 |
- int32_t data; |
|
| 1044 |
+ int32_t data = 0; |
|
| 1045 | 1045 |
switch(FORMAT) |
| 1046 | 1046 |
{
|
| 1047 | 1047 |
case 0: Fetch8BitData<INTERPOLATE_MODE>(chan, &data); break; |
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
/* |
| 2 | 2 |
* xSF - GSF configuration |
| 3 | 3 |
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com] |
| 4 |
- * Last modification on 2013-03-25 |
|
| 4 |
+ * Last modification on 2013-03-30 |
|
| 5 | 5 |
* |
| 6 | 6 |
* Partially based on the vio*sf framework |
| 7 | 7 |
*/ |
| ... | ... |
@@ -129,7 +129,7 @@ void XSFConfig_GSF::SaveSpecificConfigDialog(HWND hwndDlg) |
| 129 | 129 |
this->mutes[x] = !!SendMessageW(GetDlgItem(hwndDlg, idMutes), LB_GETSEL, x, 0); |
| 130 | 130 |
} |
| 131 | 131 |
|
| 132 |
-void XSFConfig_GSF::CopySpecificConfigToMemory(XSFPlayer *xSFPlayer, bool preLoad) |
|
| 132 |
+void XSFConfig_GSF::CopySpecificConfigToMemory(XSFPlayer *, bool preLoad) |
|
| 133 | 133 |
{
|
| 134 | 134 |
if (!preLoad) |
| 135 | 135 |
{
|
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
/* |
| 2 | 2 |
* xSF - GSF Player |
| 3 | 3 |
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com] |
| 4 |
- * Last modification on 2013-03-25 |
|
| 4 |
+ * Last modification on 2013-03-30 |
|
| 5 | 5 |
* |
| 6 | 6 |
* Based on a modified viogsf v0.08 |
| 7 | 7 |
* |
| ... | ... |
@@ -106,7 +106,7 @@ public: |
| 106 | 106 |
} |
| 107 | 107 |
} |
| 108 | 108 |
|
| 109 |
- void setThrottle(unsigned short throttle) |
|
| 109 |
+ void setThrottle(unsigned short) |
|
| 110 | 110 |
{
|
| 111 | 111 |
} |
| 112 | 112 |
}; |
| ... | ... |
@@ -207,14 +207,14 @@ bool XSFPlayer_GSF::Load() |
| 207 | 207 |
|
| 208 | 208 |
cpuIsMultiBoot = (loaderwork.entry >> 24) == 2; |
| 209 | 209 |
|
| 210 |
- CPULoadRom(NULL); |
|
| 210 |
+ CPULoadRom(nullptr); |
|
| 211 | 211 |
|
| 212 | 212 |
soundSetSampleRate(this->sampleRate); |
| 213 | 213 |
soundInit(); |
| 214 | 214 |
soundReset(); |
| 215 | 215 |
soundSetEnable(0x3FF); |
| 216 | 216 |
|
| 217 |
- CPUInit(NULL, false); |
|
| 217 |
+ CPUInit(nullptr, false); |
|
| 218 | 218 |
CPUReset(); |
| 219 | 219 |
|
| 220 | 220 |
return XSFPlayer::Load(); |
| ... | ... |
@@ -1353,7 +1353,7 @@ int CPULoadRom(const char *szFile) |
| 1353 | 1353 |
return 0; |
| 1354 | 1354 |
} |
| 1355 | 1355 |
|
| 1356 |
- u8 *whereToLoad = cpuIsMultiBoot ? workRAM : rom; |
|
| 1356 |
+ //u8 *whereToLoad = cpuIsMultiBoot ? workRAM : rom; |
|
| 1357 | 1357 |
|
| 1358 | 1358 |
#ifndef NO_DEBUGGER |
| 1359 | 1359 |
if(CPUIsELF(szFile)) {
|
| ... | ... |
@@ -3575,7 +3575,7 @@ void CPULoop(int ticks) |
| 3575 | 3575 |
if(count == 60) {
|
| 3576 | 3576 |
u32 time = /*systemGetClock()*/0; |
| 3577 | 3577 |
if(time != lastTime) {
|
| 3578 |
- u32 t = 100000/(time - lastTime); |
|
| 3578 |
+ //u32 t = 100000/(time - lastTime); |
|
| 3579 | 3579 |
//systemShowSpeed(t); |
| 3580 | 3580 |
} else |
| 3581 | 3581 |
//systemShowSpeed(0); |
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
/* |
| 2 | 2 |
* SSEQ Player - Channel structures |
| 3 | 3 |
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com] |
| 4 |
- * Last modification on 2013-03-25 |
|
| 4 |
+ * Last modification on 2013-03-30 |
|
| 5 | 5 |
* |
| 6 | 6 |
* Adapted from source code of FeOS Sound System |
| 7 | 7 |
* By fincs |
| ... | ... |
@@ -18,7 +18,7 @@ |
| 18 | 18 |
#include "common.h" |
| 19 | 19 |
|
| 20 | 20 |
NDSSoundRegister::NDSSoundRegister() : volumeMul(0), volumeDiv(0), panning(0), waveDuty(0), repeatMode(0), format(0), enable(false), |
| 21 |
- source(NULL), timer(0), psgX(0), psgLast(0), psgLastCount(0), samplePosition(0), sampleIncrease(0), loopStart(0), length(0) |
|
| 21 |
+ source(nullptr), timer(0), psgX(0), psgLast(0), psgLastCount(0), samplePosition(0), sampleIncrease(0), loopStart(0), length(0) |
|
| 22 | 22 |
{
|
| 23 | 23 |
} |
| 24 | 24 |
|
| ... | ... |
@@ -39,13 +39,13 @@ void NDSSoundRegister::SetControlRegister(uint32_t reg) |
| 39 | 39 |
this->enable = (reg >> 31) & 0x01; |
| 40 | 40 |
} |
| 41 | 41 |
|
| 42 |
-TempSndReg::TempSndReg() : CR(0), SOURCE(NULL), TIMER(0), REPEAT_POINT(0), LENGTH(0) |
|
| 42 |
+TempSndReg::TempSndReg() : CR(0), SOURCE(nullptr), TIMER(0), REPEAT_POINT(0), LENGTH(0) |
|
| 43 | 43 |
{
|
| 44 | 44 |
} |
| 45 | 45 |
|
| 46 | 46 |
Channel::Channel() : chnId(-1), tempReg(), state(CS_NONE), trackId(-1), prio(0), manualSweep(false), flags(), pan(0), extAmpl(0), velocity(0), extPan(0), |
| 47 | 47 |
key(0), ampl(0), extTune(0), orgKey(0), modType(0), modSpeed(0), modDepth(0), modRange(0), modDelay(0), modDelayCnt(0), modCounter(0), |
| 48 |
- sweepLen(0), sweepCnt(0), sweepPitch(0), attackLvl(0), sustainLvl(0x7F), decayRate(0), releaseRate(0xFFFF), noteLength(-1), vol(0), ply(NULL), reg() |
|
| 48 |
+ sweepLen(0), sweepCnt(0), sweepPitch(0), attackLvl(0), sustainLvl(0x7F), decayRate(0), releaseRate(0xFFFF), noteLength(-1), vol(0), ply(nullptr), reg() |
|
| 49 | 49 |
{
|
| 50 | 50 |
} |
| 51 | 51 |
|
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
/* |
| 2 | 2 |
* SSEQ Player - Player structure |
| 3 | 3 |
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com] |
| 4 |
- * Last modification on 2013-03-25 |
|
| 4 |
+ * Last modification on 2013-03-30 |
|
| 5 | 5 |
* |
| 6 | 6 |
* Adapted from source code of FeOS Sound System |
| 7 | 7 |
* By fincs |
| ... | ... |
@@ -11,7 +11,7 @@ |
| 11 | 11 |
#include "Player.h" |
| 12 | 12 |
#include "common.h" |
| 13 | 13 |
|
| 14 |
-Player::Player() : prio(0), nTracks(0), tempo(0), tempoCount(0), tempoRate(0), masterVol(0), sseq(NULL), sampleRate(0), interpolation(INTERPOLATION_NONE) |
|
| 14 |
+Player::Player() : prio(0), nTracks(0), tempo(0), tempoCount(0), tempoRate(0), masterVol(0), sseq(nullptr), sampleRate(0), interpolation(INTERPOLATION_NONE) |
|
| 15 | 15 |
{
|
| 16 | 16 |
memset(this->trackIds, 0, sizeof(this->trackIds)); |
| 17 | 17 |
for (size_t i = 0; i < 16; ++i) |
| ... | ... |
@@ -25,7 +25,7 @@ bool Player::Setup(const SSEQ *sseqToPlay) |
| 25 | 25 |
int firstTrack = this->TrackAlloc(); |
| 26 | 26 |
if (firstTrack == -1) |
| 27 | 27 |
return false; |
| 28 |
- this->tracks[firstTrack].Init(firstTrack, this, NULL, 0); |
|
| 28 |
+ this->tracks[firstTrack].Init(firstTrack, this, nullptr, 0); |
|
| 29 | 29 |
|
| 30 | 30 |
this->nTracks = 1; |
| 31 | 31 |
this->trackIds[0] = firstTrack; |
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
/* |
| 2 | 2 |
* SSEQ Player - SDAT structure |
| 3 | 3 |
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com] |
| 4 |
- * Last modification on 2013-03-21 |
|
| 4 |
+ * Last modification on 2013-03-30 |
|
| 5 | 5 |
* |
| 6 | 6 |
* Nintendo DS Nitro Composer (SDAT) Specification document found at |
| 7 | 7 |
* http://www.feshrine.net/hacking/doc/nds-sdat.html |
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
/* |
| 2 | 2 |
* SSEQ Player - SDAT SSEQ (Sequence) structure |
| 3 | 3 |
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com] |
| 4 |
- * Last modification on 2013-03-21 |
|
| 4 |
+ * Last modification on 2013-03-30 |
|
| 5 | 5 |
* |
| 6 | 6 |
* Nintendo DS Nitro Composer (SDAT) Specification document found at |
| 7 | 7 |
* http://www.feshrine.net/hacking/doc/nds-sdat.html |
| ... | ... |
@@ -10,7 +10,7 @@ |
| 10 | 10 |
#include "SSEQ.h" |
| 11 | 11 |
#include "NDSStdHeader.h" |
| 12 | 12 |
|
| 13 |
-SSEQ::SSEQ(const std::string &fn) : filename(fn), data(), bank(NULL), info() |
|
| 13 |
+SSEQ::SSEQ(const std::string &fn) : filename(fn), data(), bank(nullptr), info() |
|
| 14 | 14 |
{
|
| 15 | 15 |
} |
| 16 | 16 |
|
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
/* |
| 2 | 2 |
* SSEQ Player - Track structure |
| 3 | 3 |
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com] |
| 4 |
- * Last modification on 2013-03-25 |
|
| 4 |
+ * Last modification on 2013-03-30 |
|
| 5 | 5 |
* |
| 6 | 6 |
* Adapted from source code of FeOS Sound System |
| 7 | 7 |
* By fincs |
| ... | ... |
@@ -32,9 +32,9 @@ void Track::Zero() |
| 32 | 32 |
|
| 33 | 33 |
this->state.reset(); |
| 34 | 34 |
this->num = this->prio = 0; |
| 35 |
- this->ply = NULL; |
|
| 35 |
+ this->ply = nullptr; |
|
| 36 | 36 |
|
| 37 |
- this->startPos = this->pos = NULL; |
|
| 37 |
+ this->startPos = this->pos = nullptr; |
|
| 38 | 38 |
memset(this->stack, 0, sizeof(this->stack)); |
| 39 | 39 |
this->stackPos = 0; |
| 40 | 40 |
memset(this->loopCount, 0, sizeof(this->loopCount)); |
| ... | ... |
@@ -94,11 +94,11 @@ int Track::NoteOn(int key, int vel, int len) |
| 94 | 94 |
return -1; |
| 95 | 95 |
|
| 96 | 96 |
bool bIsPCM = true; |
| 97 |
- Channel *chn; |
|
| 98 |
- int nCh; |
|
| 97 |
+ Channel *chn = nullptr; |
|
| 98 |
+ int nCh = -1; |
|
| 99 | 99 |
|
| 100 | 100 |
auto &instrument = sbnk->instruments[this->patch]; |
| 101 |
- const SBNKInstrumentRange *noteDef = NULL; |
|
| 101 |
+ const SBNKInstrumentRange *noteDef = nullptr; |
|
| 102 | 102 |
int fRecord = instrument.record; |
| 103 | 103 |
|
| 104 | 104 |
if (fRecord == 16) |
| ... | ... |
@@ -208,7 +208,7 @@ int Track::NoteOnTie(int key, int vel) |
| 208 | 208 |
{
|
| 209 | 209 |
// Find an existing note |
| 210 | 210 |
int i; |
| 211 |
- Channel *chn; |
|
| 211 |
+ Channel *chn = nullptr; |
|
| 212 | 212 |
for (i = 0; i < 16; ++i) |
| 213 | 213 |
{
|
| 214 | 214 |
chn = &this->ply->channels[i]; |
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
/* |
| 2 | 2 |
* SSEQ Player - Common functions |
| 3 | 3 |
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com] |
| 4 |
- * Last modification on 2013-03-25 |
|
| 4 |
+ * Last modification on 2013-03-3 |
|
| 5 | 5 |
* |
| 6 | 6 |
* Some code from FeOS Sound System |
| 7 | 7 |
* By fincs |
| ... | ... |
@@ -25,7 +25,7 @@ struct PseudoFile |
| 25 | 25 |
std::vector<uint8_t> *data; |
| 26 | 26 |
uint32_t pos; |
| 27 | 27 |
|
| 28 |
- PseudoFile() : data(NULL), pos(0) |
|
| 28 |
+ PseudoFile() : data(nullptr), pos(0) |
|
| 29 | 29 |
{
|
| 30 | 30 |
} |
| 31 | 31 |
|
| ... | ... |
@@ -2506,8 +2506,8 @@ void CMemory::InitROM() |
| 2506 | 2506 |
|
| 2507 | 2507 |
Checksum_Calculate(); |
| 2508 | 2508 |
|
| 2509 |
- bool isChecksumOK = (ROMChecksum + ROMComplementChecksum == 0xffff) & |
|
| 2510 |
- (ROMChecksum == CalculatedChecksum); |
|
| 2509 |
+ /*bool isChecksumOK = (ROMChecksum + ROMComplementChecksum == 0xffff) & |
|
| 2510 |
+ (ROMChecksum == CalculatedChecksum);*/ |
|
| 2511 | 2511 |
|
| 2512 | 2512 |
//// Build more ROM information |
| 2513 | 2513 |
|
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
/* |
| 2 | 2 |
* Windows Dynamic Dialog Builder framework |
| 3 | 3 |
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com] |
| 4 |
- * Last modification on 2013-03-25 |
|
| 4 |
+ * Last modification on 2013-03-30 |
|
| 5 | 5 |
*/ |
| 6 | 6 |
|
| 7 | 7 |
#ifndef DIALOG_BUILDER_H |
| ... | ... |
@@ -400,7 +400,7 @@ class DialogTemplate |
| 400 | 400 |
friend class DialogTemplate; |
| 401 | 401 |
DialogControl() : controlType(NO_CONTROL), style(0), exstyle(0), rect(), id(-1), relativePosition() { }
|
| 402 | 402 |
DialogControl(const DialogControl &control) : controlType(control.controlType), style(control.style), exstyle(control.exstyle), rect(control.rect), id(control.id), |
| 403 |
- relativePosition(control.relativePosition.get() ? control.relativePosition->Clone() : NULL) { }
|
|
| 403 |
+ relativePosition(control.relativePosition.get() ? control.relativePosition->Clone() : nullptr) { }
|
|
| 404 | 404 |
DialogControl &operator=(const DialogControl &control) |
| 405 | 405 |
{
|
| 406 | 406 |
this->controlType = control.controlType; |
| ... | ... |
@@ -50,7 +50,7 @@ private: |
| 50 | 50 |
const ct_in *ipc = &in[0]; |
| 51 | 51 |
do |
| 52 | 52 |
{
|
| 53 |
- ct_out *opc = NULL; |
|
| 53 |
+ ct_out *opc = nullptr; |
|
| 54 | 54 |
result = this->cv(facet, state, ipc, &in[0] + in.length(), ipc, buf, buf + buf_size, opc); |
| 55 | 55 |
os << std::basic_string<ct_out>(buf, opc - buf); |
| 56 | 56 |
} while (ipc < &in[0] + in.length() && result != codecvt_facet::error); |
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
/* |
| 2 | 2 |
* xSF - Core configuration handler |
| 3 | 3 |
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com] |
| 4 |
- * Last modification on 2013-03-25 |
|
| 4 |
+ * Last modification on 2013-03-30 |
|
| 5 | 5 |
* |
| 6 | 6 |
* Partially based on the vio*sf framework |
| 7 | 7 |
*/ |
| ... | ... |
@@ -174,7 +174,7 @@ void XSFConfig::GenerateDialogs() |
| 174 | 174 |
|
| 175 | 175 |
INT_PTR CALLBACK XSFConfig::ConfigDialogProcStatic(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) |
| 176 | 176 |
{
|
| 177 |
- XSFConfig *thisPtr = NULL; |
|
| 177 |
+ XSFConfig *thisPtr = nullptr; |
|
| 178 | 178 |
|
| 179 | 179 |
if (uMsg == WM_INITDIALOG) |
| 180 | 180 |
{
|
| ... | ... |
@@ -193,7 +193,7 @@ INT_PTR CALLBACK XSFConfig::ConfigDialogProcStatic(HWND hwndDlg, UINT uMsg, WPAR |
| 193 | 193 |
|
| 194 | 194 |
INT_PTR CALLBACK XSFConfig::InfoDialogProcStatic(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) |
| 195 | 195 |
{
|
| 196 |
- XSFConfig *thisPtr = NULL; |
|
| 196 |
+ XSFConfig *thisPtr = nullptr; |
|
| 197 | 197 |
|
| 198 | 198 |
if (uMsg == WM_INITDIALOG) |
| 199 | 199 |
{
|
| ... | ... |
@@ -210,7 +210,7 @@ INT_PTR CALLBACK XSFConfig::InfoDialogProcStatic(HWND hwndDlg, UINT uMsg, WPARAM |
| 210 | 210 |
return false; |
| 211 | 211 |
} |
| 212 | 212 |
|
| 213 |
-INT_PTR CALLBACK XSFConfig::ConfigDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) |
|
| 213 |
+INT_PTR CALLBACK XSFConfig::ConfigDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM) |
|
| 214 | 214 |
{
|
| 215 | 215 |
switch (uMsg) |
| 216 | 216 |
{
|
| ... | ... |
@@ -269,7 +269,7 @@ INT_PTR CALLBACK XSFConfig::ConfigDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wPa |
| 269 | 269 |
|
| 270 | 270 |
extern XSFFile *xSFFileInInfo; |
| 271 | 271 |
|
| 272 |
-INT_PTR CALLBACK XSFConfig::InfoDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) |
|
| 272 |
+INT_PTR CALLBACK XSFConfig::InfoDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM) |
|
| 273 | 273 |
{
|
| 274 | 274 |
switch (uMsg) |
| 275 | 275 |
{
|
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
/* |
| 2 | 2 |
* xSF - Winamp-specification configuration handler |
| 3 | 3 |
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com] |
| 4 |
- * Last modification on 2013-03-21 |
|
| 4 |
+ * Last modification on 2013-03-30 |
|
| 5 | 5 |
* |
| 6 | 6 |
* Partially based on the vio*sf framework |
| 7 | 7 |
*/ |
| ... | ... |
@@ -42,7 +42,7 @@ XSFConfigIO_Winamp::XSFConfigIO_Winamp() : iniFilename(L"") |
| 42 | 42 |
do |
| 43 | 43 |
{
|
| 44 | 44 |
executablePath.resize(executablePath.size() * 2); |
| 45 |
- result = GetModuleFileNameW(NULL, &executablePath[0], executablePath.size()); |
|
| 45 |
+ result = GetModuleFileNameW(nullptr, &executablePath[0], executablePath.size()); |
|
| 46 | 46 |
} while (result == executablePath.size()); |
| 47 | 47 |
|
| 48 | 48 |
if (!result) |
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
/* |
| 2 | 2 |
* xSF - Core Player |
| 3 | 3 |
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com] |
| 4 |
- * Last modification on 2013-03-21 |
|
| 4 |
+ * Last modification on 2013-03-30 |
|
| 5 | 5 |
* |
| 6 | 6 |
* Partially based on the vio*sf framework |
| 7 | 7 |
*/ |
| ... | ... |
@@ -13,7 +13,7 @@ |
| 13 | 13 |
|
| 14 | 14 |
extern XSFConfig *xSFConfig; |
| 15 | 15 |
|
| 16 |
-XSFPlayer::XSFPlayer() : xSF(NULL), sampleRate(0), detectedSilenceSample(0), detectedSilenceSec(0), skipSilenceOnStartSec(5), lengthSample(0), fadeSample(0), currentSample(0), |
|
| 16 |
+XSFPlayer::XSFPlayer() : xSF(nullptr), sampleRate(0), detectedSilenceSample(0), detectedSilenceSec(0), skipSilenceOnStartSec(5), lengthSample(0), fadeSample(0), currentSample(0), |
|
| 17 | 17 |
prevSampleL(XSFPlayer::CHECK_SILENCE_BIAS), prevSampleR(XSFPlayer::CHECK_SILENCE_BIAS), lengthInMS(-1), fadeInMS(-1), volume(1.0), ignoreVolume(false) |
| 18 | 18 |
{
|
| 19 | 19 |
} |
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
/* |
| 2 | 2 |
* xSF - Winamp plugin |
| 3 | 3 |
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com] |
| 4 |
- * Last modification on 2013-03-25 |
|
| 4 |
+ * Last modification on 2013-03-30 |
|
| 5 | 5 |
* |
| 6 | 6 |
* Partially based on the vio*sf framework |
| 7 | 7 |
*/ |
| ... | ... |
@@ -13,10 +13,10 @@ |
| 13 | 13 |
#include <winamp/wa_ipc.h> |
| 14 | 14 |
|
| 15 | 15 |
extern In_Module inMod; |
| 16 |
-const XSFFile *xSFFile = NULL; |
|
| 17 |
-XSFFile *xSFFileInInfo = NULL; |
|
| 18 |
-XSFPlayer *xSFPlayer = NULL; |
|
| 19 |
-XSFConfig *xSFConfig = NULL; |
|
| 16 |
+const XSFFile *xSFFile = nullptr; |
|
| 17 |
+XSFFile *xSFFileInInfo = nullptr; |
|
| 18 |
+XSFPlayer *xSFPlayer = nullptr; |
|
| 19 |
+XSFConfig *xSFConfig = nullptr; |
|
| 20 | 20 |
bool paused; |
| 21 | 21 |
int seek_needed; |
| 22 | 22 |
double decode_pos_ms; |
| ... | ... |
@@ -36,7 +36,7 @@ DWORD WINAPI playThread(void *b) |
| 36 | 36 |
decode_pos_ms = seek_needed - (seek_needed % 1000); |
| 37 | 37 |
seek_needed = -1; |
| 38 | 38 |
auto dummyBuffer = std::vector<uint8_t>(576 * NumChannels * (BitsPerSample / 8)); |
| 39 |
- xSFPlayer->Seek(static_cast<unsigned>(decode_pos_ms), NULL, dummyBuffer, inMod.outMod); |
|
| 39 |
+ xSFPlayer->Seek(static_cast<unsigned>(decode_pos_ms), nullptr, dummyBuffer, inMod.outMod); |
|
| 40 | 40 |
} |
| 41 | 41 |
|
| 42 | 42 |
if (done) |
| ... | ... |
@@ -149,7 +149,7 @@ int infoBox(const in_char *file, HWND hwndParent) |
| 149 | 149 |
return INFOBOX_EDITED; |
| 150 | 150 |
} |
| 151 | 151 |
|
| 152 |
-int isOurFile(const in_char *fn) |
|
| 152 |
+int isOurFile(const in_char *) |
|
| 153 | 153 |
{
|
| 154 | 154 |
return 0; |
| 155 | 155 |
} |
| ... | ... |
@@ -178,7 +178,7 @@ int play(const in_char *fn) |
| 178 | 178 |
|
| 179 | 179 |
xSFPlayer = tmpxSFPlayer.release(); |
| 180 | 180 |
killThread = false; |
| 181 |
- thread_handle = CreateThread(NULL, 0, playThread, &killThread, 0, NULL); |
|
| 181 |
+ thread_handle = CreateThread(nullptr, 0, playThread, &killThread, 0, nullptr); |
|
| 182 | 182 |
return 0; |
| 183 | 183 |
} |
| 184 | 184 |
catch (const std::exception &) |
| ... | ... |
@@ -220,8 +220,8 @@ void stop() |
| 220 | 220 |
inMod.outMod->Close(); |
| 221 | 221 |
inMod.SAVSADeInit(); |
| 222 | 222 |
delete xSFPlayer; |
| 223 |
- xSFPlayer = NULL; |
|
| 224 |
- xSFFile = NULL; |
|
| 223 |
+ xSFPlayer = nullptr; |
|
| 224 |
+ xSFFile = nullptr; |
|
| 225 | 225 |
} |
| 226 | 226 |
|
| 227 | 227 |
int getLength() |
| ... | ... |
@@ -251,7 +251,7 @@ void setPan(int pan) |
| 251 | 251 |
inMod.outMod->SetPan(pan); |
| 252 | 252 |
} |
| 253 | 253 |
|
| 254 |
-void eqSet(int on, char data[10], int preamp) |
|
| 254 |
+void eqSet(int, char [10], int) |
|
| 255 | 255 |
{
|
| 256 | 256 |
} |
| 257 | 257 |
|
| ... | ... |
@@ -259,8 +259,8 @@ In_Module inMod = |
| 259 | 259 |
{
|
| 260 | 260 |
IN_VER, |
| 261 | 261 |
const_cast<char *>(XSFPlayer::WinampDescription), /* Unsafe but Winamp's SDK requires this */ |
| 262 |
- NULL, /* Filled by Winamp */ |
|
| 263 |
- NULL, /* Filled by Winamp */ |
|
| 262 |
+ nullptr, /* Filled by Winamp */ |
|
| 263 |
+ nullptr, /* Filled by Winamp */ |
|
| 264 | 264 |
const_cast<char *>(XSFPlayer::WinampExts), /* Unsafe but Winamp's SDK requires this */ |
| 265 | 265 |
1, |
| 266 | 266 |
IN_MODULE_FLAG_USES_OUTPUT_PLUGIN | IN_MODULE_FLAG_REPLAYGAIN, |
| ... | ... |
@@ -281,11 +281,11 @@ In_Module inMod = |
| 281 | 281 |
setOutputTime, |
| 282 | 282 |
setVolume, |
| 283 | 283 |
setPan, |
| 284 |
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* Vis stuff, filled by Winamp */ |
|
| 285 |
- NULL, NULL, /* DSP stuff, filled by Winamp */ |
|
| 284 |
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* Vis stuff, filled by Winamp */ |
|
| 285 |
+ nullptr, nullptr, /* DSP stuff, filled by Winamp */ |
|
| 286 | 286 |
eqSet, |
| 287 |
- NULL, /* Filled by Winamp */ |
|
| 288 |
- NULL /* Filled by Winamp */ |
|
| 287 |
+ nullptr, /* Filled by Winamp */ |
|
| 288 |
+ nullptr /* Filled by Winamp */ |
|
| 289 | 289 |
}; |
| 290 | 290 |
|
| 291 | 291 |
extern "C" __declspec(dllexport) In_Module *winampGetInModule2() |
| ... | ... |
@@ -393,7 +393,7 @@ extern "C" __declspec(dllexport) int winampWriteExtendedFileInfo() |
| 393 | 393 |
return 1; |
| 394 | 394 |
} |
| 395 | 395 |
|
| 396 |
-extern "C" __declspec(dllexport) int winampClearExtendedFileInfoW(const wchar_t *fn) |
|
| 396 |
+extern "C" __declspec(dllexport) int winampClearExtendedFileInfoW(const wchar_t *) |
|
| 397 | 397 |
{
|
| 398 | 398 |
return 0; |
| 399 | 399 |
} |
| ... | ... |
@@ -438,7 +438,7 @@ extern "C" __declspec(dllexport) size_t winampGetExtendedRead_getData(intptr_t h |
| 438 | 438 |
if (extendedSeekNeeded != -1) |
| 439 | 439 |
{
|
| 440 | 440 |
auto dummyBuffer = std::vector<uint8_t>(576 * NumChannels * (BitsPerSample / 8)); |
| 441 |
- if (tmpxSFPlayer->Seek(static_cast<unsigned>(extendedSeekNeeded), killswitch, dummyBuffer, NULL)) |
|
| 441 |
+ if (tmpxSFPlayer->Seek(static_cast<unsigned>(extendedSeekNeeded), killswitch, dummyBuffer, nullptr)) |
|
| 442 | 442 |
return 0; |
| 443 | 443 |
extendedSeekNeeded = -1; |
| 444 | 444 |
} |
| ... | ... |
@@ -457,7 +457,7 @@ extern "C" __declspec(dllexport) size_t winampGetExtendedRead_getData(intptr_t h |
| 457 | 457 |
return copied; |
| 458 | 458 |
} |
| 459 | 459 |
|
| 460 |
-extern "C" __declspec(dllexport) int winampGetExtendedRead_setTime(intptr_t handle, int millisecs) |
|
| 460 |
+extern "C" __declspec(dllexport) int winampGetExtendedRead_setTime(intptr_t, int millisecs) |
|
| 461 | 461 |
{
|
| 462 | 462 |
extendedSeekNeeded = millisecs; |
| 463 | 463 |
return 1; |