diff options
author | Simon Howard | 2009-09-20 21:21:30 +0000 |
---|---|---|
committer | Simon Howard | 2009-09-20 21:21:30 +0000 |
commit | fcf4a7241a742e7f3d8189c40ad852d48c674612 (patch) | |
tree | 7601613c69212b26bb65bd112dd89f6146ad14dd | |
parent | f894f24bcd63dc8b2a0604a9b659dd95aebbb384 (diff) | |
download | chocolate-doom-fcf4a7241a742e7f3d8189c40ad852d48c674612.tar.gz chocolate-doom-fcf4a7241a742e7f3d8189c40ad852d48c674612.tar.bz2 chocolate-doom-fcf4a7241a742e7f3d8189c40ad852d48c674612.zip |
Remove old test code.
Subversion-branch: /branches/opl-branch
Subversion-revision: 1684
-rw-r--r-- | src/i_oplmusic.c | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/i_oplmusic.c b/src/i_oplmusic.c index aa079614..b8e93534 100644 --- a/src/i_oplmusic.c +++ b/src/i_oplmusic.c @@ -43,8 +43,6 @@ #include "opl.h" #include "midifile.h" -//#define TEST - #define MAXMIDLENGTH (96 * 1024) #define GENMIDI_NUM_INSTRS 128 @@ -716,9 +714,6 @@ static void I_OPL_ShutdownMusic(void) { if (music_initialised) { -#ifdef TEST - InitRegisters(); -#endif OPL_Shutdown(); // Release GENMIDI lump @@ -729,30 +724,6 @@ static void I_OPL_ShutdownMusic(void) } } -#ifdef TEST -static void TestCallback(void *arg) -{ - opl_voice_t *voice = arg; - int note; - int wait_time; - - // Set level: - WriteRegister(OPL_REGS_LEVEL + voice->op2, 0); - - // Note off: - - WriteRegister(OPL_REGS_FREQ_2 + voice->index, 0x00); - // Note on: - - note = (rand() % (0x2ae - 0x16b)) + 0x16b; - WriteRegister(OPL_REGS_FREQ_1 + voice->index, note & 0xff); - WriteRegister(OPL_REGS_FREQ_2 + voice->index, 0x30 + (note >> 8)); - - wait_time = (rand() % 700) + 50; - OPL_SetCallback(wait_time, TestCallback, arg); -} -#endif - // Initialise music subsystem static boolean I_OPL_InitMusic(void) @@ -789,24 +760,6 @@ static boolean I_OPL_InitMusic(void) init_stage_reg_writes = false; -#ifdef TEST - { - int i; - opl_voice_t *voice; - int instr_num; - - for (i=0; i<3; ++i) - { - voice = GetFreeVoice(); - instr_num = rand() % 100; - - SetVoiceInstrument(voice, &main_instrs[instr_num], 0); - - OPL_SetCallback(0, TestCallback, voice); - } - } -#endif - music_initialised = true; return true; |