Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9140 in orxonox.OLD for branches/terrain/src/lib/sound


Ignore:
Timestamp:
Jul 4, 2006, 3:06:00 PM (18 years ago)
Author:
bensch
Message:

merged back

File:
1 edited

Legend:

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

    r9019 r9140  
    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.