summaryrefslogtreecommitdiff
path: root/src/i_oplmusic.c
diff options
context:
space:
mode:
authorSimon Howard2009-09-20 21:21:30 +0000
committerSimon Howard2009-09-20 21:21:30 +0000
commitfcf4a7241a742e7f3d8189c40ad852d48c674612 (patch)
tree7601613c69212b26bb65bd112dd89f6146ad14dd /src/i_oplmusic.c
parentf894f24bcd63dc8b2a0604a9b659dd95aebbb384 (diff)
downloadchocolate-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
Diffstat (limited to 'src/i_oplmusic.c')
-rw-r--r--src/i_oplmusic.c47
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;