Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8775 in orxonox.OLD for branches/terrain/src/lib/sound/ogg_player.cc


Ignore:
Timestamp:
Jun 25, 2006, 11:30:59 AM (19 years ago)
Author:
ponder
Message:
  • Applied a small change to sounrd_buffer and ogg_player in order to load the buffers correctly on big endian systems.
  • Did a lot of cleanup for the terrain rendering system. Added destructors and constructors.
  • The cameras clip-space has to be set to a very large range to display the skybox. The maximum clip distance for the terrain needs to be smaller.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/terrain/src/lib/sound/ogg_player.cc

    r8362 r8775  
    399399    if(size == 0)
    400400      return false;
    401 /*#ifdef SDL_BIG_ENDIAN
    402                         int cnt = wavLength/2;
    403                         Uint16* wavBufferAsShorts = ( Uint16* )wavBuffer;
    404                         for ( int i = 0; i < cnt; ++i, ++wavBufferAsShorts )
    405                                 *wavBufferAsShorts = SDL_Swap16( *wavBufferAsShorts );
    406 #endif*/
     401#ifdef SDL_BIG_ENDIAN
     402        int cnt = OGG_PLAYER_BUFFER_SIZE/2;
     403        Uint16* wavBufferAsShorts = ( Uint16* )pcm;
     404        for ( int i = 0; i < cnt; ++i, ++wavBufferAsShorts )
     405                *wavBufferAsShorts = SDL_Swap16( *wavBufferAsShorts );
     406#endif
    407407    alBufferData(buffer, format, pcm, size, vorbisInfo->rate);
    408408    if (DEBUG_LEVEL >= 3)
Note: See TracChangeset for help on using the changeset viewer.