Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7301 in orxonox.OLD


Ignore:
Timestamp:
Apr 16, 2006, 7:51:18 PM (18 years ago)
Author:
bensch
Message:

less debug, and music should rewind now

Location:
trunk/src/lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/particles/particle_system.cc

    r7300 r7301  
    1414*/
    1515
    16 #define DEBUG_SPECIAL_MODULE 5 //DEBUG_MODULE_GRAPHICS
     16#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GRAPHICS
    1717
    1818#include "particle_system.h"
  • trunk/src/lib/sound/ogg_player.cc

    r7299 r7301  
    6969  if (this->buffers[0] != 0 && this->buffers[1] != 0)
    7070    state |= BuffersAllocated;
    71   else  {
     71  else
     72  {
    7273    PRINTF(2)("Unable to allocate al-Buffers\n");
    7374    this->release();
     
    252253  if (unlikely(!(this->state & Playing)))
    253254    return false;
    254   char pcm[BUFFER_SIZE];
     255  char pcm[OGG_PLAYER_BUFFER_SIZE];
    255256  int  size = 0;
    256257  int  section;
    257258  int  result;
    258259
    259   while(size < BUFFER_SIZE)
    260   {
    261     result = ov_read(&oggStream, pcm + size, BUFFER_SIZE - size, 0, 2, 1, &section);
     260  while(size < OGG_PLAYER_BUFFER_SIZE)
     261  {
     262    result = ov_read(&this->oggStream, pcm + size, OGG_PLAYER_BUFFER_SIZE - size, 0, 2, 1, &section);
    262263
    263264    if(result > 0)
    264265      size += result;
    265     else
    266       if(result < 0)
    267         throw errorString(result);
    268       else
    269         break;
     266    else if(result < 0)
     267      throw errorString(result);
     268    else /* eof */
     269      ov_time_seek(&this->oggStream, 0.0);
    270270  }
    271271
     
    327327  PRINTF(0)("OggPlayer is in the following States: ");
    328328  if (this->state & FileOpened)
    329       PRINT(0)("FileOpened ");
     329    PRINT(0)("FileOpened ");
    330330  if (this->state & SourceAllocated)
    331331    PRINT(0)("SourceAllocated ");
  • trunk/src/lib/sound/ogg_player.h

    r7299 r7301  
    1919
    2020
    21 #define BUFFER_SIZE (8096 * 2)
     21#define OGG_PLAYER_BUFFER_SIZE (8096 * 2)
    2222
    2323
Note: See TracChangeset for help on using the changeset viewer.