Dead code cleanup

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@2553 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 97b8b729285049afed5174e0ed117826d11a22a4
Former-commit-id: 72ed0290ef6b6ad83bd51548b1df65a96e6b912d
This commit is contained in:
pouillot 2010-07-10 15:31:17 +00:00
parent aaba4c5be0
commit 3f353f55fe

View file

@ -329,8 +329,6 @@ OpenalTorcsSound::OpenalTorcsSound(const char* filename, OpenalSoundInterface* s
return;
}
#if 1
//=============================================================================
SDL_AudioSpec wavspec;
Uint32 wavlen;
Uint8 *wavbuf;
@ -389,52 +387,6 @@ OpenalTorcsSound::OpenalTorcsSound(const char* filename, OpenalSoundInterface* s
}
SDL_FreeWAV(wavbuf);
//=============================================================================
#else
//=============================================================================
ALvoid *wave = NULL;
ALsizei size;
ALsizei freq;
ALboolean srcloop;
//TODO figure out why apple header is different
#ifdef __APPLE__
alutLoadWAVFile((ALbyte *) filename, &format, &wave, &size, &freq);
#else
alutLoadWAVFile((ALbyte *) filename, &format, &wave, &size, &freq, &srcloop);
#endif
error = alGetError();
if (error != AL_NO_ERROR) {
printf("OpenAL Error: %d, could not load %s\n", error, filename);
if (alIsBuffer(buffer)) {
alDeleteBuffers(1, &buffer);
alGetError();
}
is_enabled = false;
return;
}
alBufferData (buffer, format, wave, size, freq);
error = alGetError();
if (error != AL_NO_ERROR) {
printf("OpenAL Error: %d, alBufferData %s\n", error, filename);
if (alIsBuffer(buffer)) {
alDeleteBuffers(1, &buffer);
alGetError();
}
is_enabled = false;
return;
}
alutUnloadWAV(format, wave, size, freq);
error = alGetError();
if (error != AL_NO_ERROR) {
printf("OpenAL Error: %d, alutUnloadWAV %s\n", error, filename);
}
//===============================================================================
#endif
if (!static_pool) {
is_enabled = true;