Update of /cvsroot/gcblue/gcb_wx/src/common
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14891/src/common
Modified Files:
tcOggStreamer.cpp tcSound.cpp tcString.cpp
Log Message:
Index: tcString.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/common/tcString.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** tcString.cpp 8 Aug 2004 00:31:33 -0000 1.3
--- tcString.cpp 14 Sep 2004 02:01:46 -0000 1.4
***************
*** 65,70 ****
}
! // this ignores length, needs to be fixed, included for compatibility with CString
! const char* tcString::GetBufferSetLength(int anMaxLength) {
return c_str();
}
--- 65,73 ----
}
! /**
! * this ignores length, needs to be fixed, included for compatibility with CString
! */
! const char* tcString::GetBufferSetLength(int anMaxLength)
! {
return c_str();
}
Index: tcSound.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/common/tcSound.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** tcSound.cpp 5 Aug 2004 02:22:35 -0000 1.16
--- tcSound.cpp 14 Sep 2004 02:01:46 -0000 1.17
***************
*** 56,70 ****
{
int i;
! ALuint moving_source = 0;
ALfloat zeroes[] = { 0.0f, 0.0f, 0.0f };
! ALfloat back[] = { 0.0f, 0.0f, -1.0f, 0.0f, 1.0f, 0.0f };
ALfloat front[] = { 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f };
! ALfloat position[] = { 0.0f, 0.0f, -4.0f };
alutInit(NULL,0);
// Clear Error Code
! alGetError();
!
alListenerfv(AL_POSITION, zeroes );
--- 56,73 ----
{
int i;
! // ALuint moving_source = 0;
ALfloat zeroes[] = { 0.0f, 0.0f, 0.0f };
! // ALfloat back[] = { 0.0f, 0.0f, -1.0f, 0.0f, 1.0f, 0.0f };
ALfloat front[] = { 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f };
! // ALfloat position[] = { 0.0f, 0.0f, -4.0f };
alutInit(NULL,0);
// Clear Error Code
! if (alGetError() != AL_NO_ERROR)
! {
! wxMessageBox("Error during OpenAL init. "
! "Sound driver may not support OpenAL.", "Warning", wxICON_WARNING);
! }
alListenerfv(AL_POSITION, zeroes );
***************
*** 326,330 ****
oggStreamer->Play();
}
! bool isPlaying = oggStreamer->IsPlaying();
if (oggStreamer->IsSongQueued()) return;
QueueRandomMusic();
--- 329,333 ----
oggStreamer->Play();
}
! // bool isPlaying = oggStreamer->IsPlaying();
if (oggStreamer->IsSongQueued()) return;
QueueRandomMusic();
Index: tcOggStreamer.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/common/tcOggStreamer.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** tcOggStreamer.cpp 8 Aug 2004 00:31:33 -0000 1.9
--- tcOggStreamer.cpp 14 Sep 2004 02:01:46 -0000 1.10
***************
*** 314,329 ****
bool tcOggStreamer::Stream(ALuint buffer)
{
! int size = 0;
int section;
! int result;
! while (size < BUFFER_SIZE)
{
result = ov_read(&oggStream,
! streamBuffer + size, BUFFER_SIZE - size, 0, 2, 1, §ion);
!
if (result > 0)
{
! size += result;
}
else if (result < 0)
--- 314,331 ----
bool tcOggStreamer::Stream(ALuint buffer)
{
! int currentSize = 0;
int section;
! long result;
! currentSize = 0;
! while (currentSize < BUFFER_SIZE)
{
result = ov_read(&oggStream,
! streamBuffer + currentSize, BUFFER_SIZE - currentSize, 0, 2, 1, §ion);
! Check();
!
if (result > 0)
{
! currentSize += result;
}
else if (result < 0)
***************
*** 347,354 ****
}
! if(size == 0)
return false;
! alBufferData(buffer, format, streamBuffer, size, vorbisInfo->rate);
Check();
--- 349,356 ----
}
! if(currentSize == 0)
return false;
! alBufferData(buffer, format, streamBuffer, currentSize, vorbisInfo->rate);
Check();
***************
*** 418,423 ****
case OV_ENOSEEK:
return string("The given stream is not seekable");
default:
! return string("Unknown Ogg error.");
}
}
--- 420,440 ----
case OV_ENOSEEK:
return string("The given stream is not seekable");
+ case OV_ENOTAUDIO:
+ return string("This is not an audio data packet.");
+ case OV_EBADPACKET:
+ return string("Bad packet.");
+ case AL_INVALID_NAME:
+ return string("Invalid Name paramater passed to AL call.");
+ case AL_ILLEGAL_ENUM:
+ return string("Invalid parameter passed to AL call.");
+ case AL_INVALID_VALUE:
+ return string("Invalid enum parameter value.");
+ case AL_ILLEGAL_COMMAND:
+ return string("Illegal command.");
+ case AL_OUT_OF_MEMORY:
+ return string("AL out of memory.");
default:
! wxString s = wxString::Format("Unknown Ogg error (%d)", code);
! return string(s.c_str());
}
}
|