Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Jul 24, 2006, 12:47:07 PM (18 years ago)
Author:
bensch
Message:

merged back here the terrain.old

File:
1 edited

Legend:

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

    r9406 r9414  
    402402    if(size == 0)
    403403      return false;
    404 /*#ifdef SDL_BIG_ENDIAN
    405                         int cnt = wavLength/2;
    406                         Uint16* wavBufferAsShorts = ( Uint16* )wavBuffer;
    407                         for ( int i = 0; i < cnt; ++i, ++wavBufferAsShorts )
    408                                 *wavBufferAsShorts = SDL_Swap16( *wavBufferAsShorts );
    409 #endif*/
     404#ifdef SDL_BIG_ENDIAN
     405        int cnt = OGG_PLAYER_BUFFER_SIZE/2;
     406        Uint16* wavBufferAsShorts = ( Uint16* )pcm;
     407        for ( int i = 0; i < cnt; ++i, ++wavBufferAsShorts )
     408                *wavBufferAsShorts = SDL_Swap16( *wavBufferAsShorts );
     409#endif
    410410    alBufferData(buffer, format, pcm, size, vorbisInfo->rate);
    411411    if (DEBUG_LEVEL >= 3)
Note: See TracChangeset for help on using the changeset viewer.