Skip to content

Commit

Permalink
Cleanup|FluidSynth: Removed old code
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Oct 28, 2012
1 parent 2e98f0c commit 2d8f05b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 94 deletions.
56 changes: 0 additions & 56 deletions doomsday/plugins/fluidsynth/src/driver_fluidsynth.cpp
Expand Up @@ -64,62 +64,6 @@ int DS_Init(void)
return false;
}

#if 0
if(fmodSystem)
{
return true; // Already initialized.
}

// Create the FMOD audio system.
FMOD_RESULT result;
if((result = FMOD::System_Create(&fmodSystem)) != FMOD_OK)
{
Con_Message("FMOD::System_Create failed: (%d) %s\n", result, FMOD_ErrorString(result));
fmodSystem = 0;
return false;
}

// Initialize FMOD.
if((result = fmodSystem->init(50, FMOD_INIT_NORMAL | FMOD_INIT_3D_RIGHTHANDED | FMOD_INIT_HRTF_LOWPASS, 0)) != FMOD_OK)
{
Con_Message("FMOD init failed: (%d) %s\n", result, FMOD_ErrorString(result));
fmodSystem->release();
fmodSystem = 0;
return false;
}

// Options.
FMOD_ADVANCEDSETTINGS settings;
zeroStruct(settings);
settings.HRTFMaxAngle = 360;
settings.HRTFMinAngle = 180;
settings.HRTFFreq = 11000;
fmodSystem->setAdvancedSettings(&settings);

#ifdef _DEBUG
int numPlugins = 0;
fmodSystem->getNumPlugins(FMOD_PLUGINTYPE_CODEC, &numPlugins);
DSFMOD_TRACE("Plugins loaded: " << numPlugins);
for(int i = 0; i < numPlugins; i++)
{
unsigned int handle;
fmodSystem->getPluginHandle(FMOD_PLUGINTYPE_CODEC, i, &handle);

FMOD_PLUGINTYPE pType;
char pName[100];
unsigned int pVer = 0;
fmodSystem->getPluginInfo(handle, &pType, pName, sizeof(pName), &pVer);

DSFMOD_TRACE("Plugin " << i << ", handle " << handle << ": type " << pType
<< ", name:'" << pName << "', ver:" << pVer);
}
#endif

// Print the credit required by FMOD license.
Con_Message("FMOD Sound System (c) Firelight Technologies Pty, Ltd., 1994-2012.\n");

#endif

DSFLUIDSYNTH_TRACE("DS_Init: FluidSynth initialized.");
return true;
}
Expand Down
38 changes: 0 additions & 38 deletions doomsday/plugins/fluidsynth/src/fluidsynth_music.cpp
Expand Up @@ -431,44 +431,6 @@ void DM_Music_Stop(void)
stopPlayer();
}

#if 0
int DM_Music_Play(int looped)
{
if(!fmodSystem) return false;

if(songBuffer)
{
// Get rid of the old song.
releaseSong();

setDefaultStreamBufferSize();

FMOD_CREATESOUNDEXINFO extra;
zeroStruct(extra);
extra.length = songBuffer->size;
if(endsWith(soundFontFileName, ".dls"))
{
extra.dlsname = soundFontFileName;
}

// Load a new song.
FMOD_RESULT result;
result = fmodSystem->createSound(songBuffer->data,
FMOD_CREATESTREAM | FMOD_OPENMEMORY |
(looped? FMOD_LOOP_NORMAL : 0),
&extra, &song);
DSFMOD_TRACE("Music_Play: songBuffer has " << songBuffer->size << " bytes, created Sound " << song);
DSFMOD_ERRCHECK(result);

needReleaseSong = true;

// The song buffer remains in memory, in case FMOD needs to stream from it.
}
return startSong();
return 0;
}
#endif

void DM_Music_Pause(int setPause)
{
if(!fsPlayer || !sfxBuf) return;
Expand Down

0 comments on commit 2d8f05b

Please sign in to comment.