Changeset 8775 in orxonox.OLD for branches/terrain/src/lib/sound
- Timestamp:
- Jun 25, 2006, 11:30:59 AM (19 years ago)
- Location:
- branches/terrain/src/lib/sound
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/terrain/src/lib/sound/ogg_player.cc
r8362 r8775 399 399 if(size == 0) 400 400 return false; 401 /*#ifdef SDL_BIG_ENDIAN402 int cnt = wavLength/2;403 Uint16* wavBufferAsShorts = ( Uint16* )wavBuffer;404 405 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 407 407 alBufferData(buffer, format, pcm, size, vorbisInfo->rate); 408 408 if (DEBUG_LEVEL >= 3) -
branches/terrain/src/lib/sound/sound_buffer.cc
r8619 r8775 76 76 } 77 77 #if SDL_BYTEORDER == SDL_BIG_ENDIAN 78 79 80 81 82 83 78 if ( !( wavSpec.format == AUDIO_U8 || wavSpec.format == AUDIO_S8 ) ) { 79 int cnt = wavLength/2; 80 Uint16* wavBufferAsShorts = ( Uint16* )wavBuffer; 81 for ( int i = 0; i < cnt; ++i, ++wavBufferAsShorts ) 82 *wavBufferAsShorts = SDL_Swap16( *wavBufferAsShorts ); 83 } 84 84 #endif 85 85 alBufferData(this->bufferID, SoundBuffer::sdlAudioSpecToAlFormat(&wavSpec),
Note: See TracChangeset
for help on using the changeset viewer.