[Clonekeenplus-commits] [SCM] clonekeenplus branch, master, updated. 316fdd938d192575f77da7be653efc
Commander Keen Interpreter
Brought to you by:
gerstrong
From: Gerstrong <ger...@us...> - 2010-08-22 16:42:56
|
via 316fdd938d192575f77da7be653efce4fa6c4f31 (commit) from 2dde25aa12dabb1994a5d5e9ab052a547402e440 (commit) - Log ----------------------------------------------------------------- commit 316fdd938d192575f77da7be653efce4fa6c4f31 Author: Gerhard Stein <ger...@gm...> Date: Sun Aug 22 18:40:42 2010 +0200 clenaups on the music load functions ----------------------------------------------------------------------- Summary of changes: src/hqp/CMusic.cpp | 8 +------- src/hqp/hq_sound.cpp | 2 +- src/vorbis/oggsupport.cpp | 2 +- src/vorbis/oggsupport.h | 2 +- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/hqp/CMusic.cpp b/src/hqp/CMusic.cpp index 592c948..bdd452f 100644 --- a/src/hqp/CMusic.cpp +++ b/src/hqp/CMusic.cpp @@ -47,7 +47,7 @@ bool CMusic::load(const SDL_AudioSpec AudioSpec, const std::string &musicfile) return -1; } - if(openOGGSound(fp, &AudioFileSpec, AudioSpec.format, &pOggAudio) != 0) + if(openOGGSound(fp, &AudioFileSpec, &pOggAudio) != 0) { g_pLogFile->textOut(PURPLE,"Music Driver(): OGG file could not be opened: \"%s\". File is damaged or something is wrong with your soundcard!<br>", musicfile.c_str()); return false; @@ -142,12 +142,6 @@ Uint8 *CMusic::passBuffer(size_t length) // length only refers to the part(buffe music_pos += length; return ptr; } - /*else - { - //Uint8* ptr = &music_buffer.at(0) + (music_len-music_pos); - music_pos = 0; - return ptr; - }*/ else { music_pos = 0; diff --git a/src/hqp/hq_sound.cpp b/src/hqp/hq_sound.cpp index 306aa31..2ba1c3e 100644 --- a/src/hqp/hq_sound.cpp +++ b/src/hqp/hq_sound.cpp @@ -34,7 +34,7 @@ short HQSndDrv_Load(SDL_AudioSpec *AudioSpec, stHQSound *psound, const std::stri if(fp != NULL) { #ifdef OGG - if(openOGGSound(fp, &AudioFileSpec, AudioSpec->format, psound) != 0) + if(openOGGSound(fp, &AudioFileSpec, psound) != 0) { std::string buf2; buf2 = "OGG file \"" + buf +"\"could not be opened. The file was detected, but appears to be damaged. Trying to load the classical sound<br>"; diff --git a/src/vorbis/oggsupport.cpp b/src/vorbis/oggsupport.cpp index ad03002..e28aad7 100644 --- a/src/vorbis/oggsupport.cpp +++ b/src/vorbis/oggsupport.cpp @@ -21,7 +21,7 @@ using namespace std; #include "../sdl/CVideoDriver.h" #include "../CLogFile.h" -short openOGGSound(FILE *fp, SDL_AudioSpec *pspec, Uint16 format, stHQSound *psound) +short openOGGSound(FILE *fp, SDL_AudioSpec *pspec, stHQSound *psound) { // If Ogg detected, decode it into the stream psound->sound_buffer. // It must fit into the Audio_cvt structure, so that it can be converted diff --git a/src/vorbis/oggsupport.h b/src/vorbis/oggsupport.h index 535a8de..d3ea0cd 100644 --- a/src/vorbis/oggsupport.h +++ b/src/vorbis/oggsupport.h @@ -7,6 +7,6 @@ #ifdef OGG -short openOGGSound(FILE *fp, SDL_AudioSpec *pspec, Uint16 format, stHQSound *psound); +short openOGGSound(FILE *fp, SDL_AudioSpec *pspec, stHQSound *psound); #endif hooks/post-receive -- clonekeenplus |