Changeset 4765:c9adc34b0b5b in roaraudio


Ignore:
Timestamp:
02/15/11 17:33:38 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

fix needed for libvorbisfile as it does not support native endiness

Location:
roard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • roard/codecfilter_vorbis.c

    r4708 r4765  
    8787 *inst = (CODECFILTER_USERDATA_T) self; 
    8888 
     89#if ROAR_CODEC_DEFAULT == ROAR_CODEC_PCM_S_LE 
     90 self->bigendianp = 0; 
    8991 s->info.codec = ROAR_CODEC_DEFAULT; 
     92#else 
     93 self->bigendianp = 1; 
     94 s->info.codec = ROAR_CODEC_PCM_S_BE; // force because ROAR_CODEC_DEFAULT can be something non-BE, too. 
     95#endif 
     96 
    9097 s->info.bits  = 16; 
    9198 
     
    251258 
    252259 while (todo) { 
    253   r = ov_read(&(self->vf), buf+done, todo, 0, 2, 1, &(self->current_section)); 
     260  r = ov_read(&(self->vf), buf+done, todo, self->bigendianp, 2, 1, &(self->current_section)); 
    254261  if ( r == OV_HOLE ) { 
    255262   ROAR_DBG("cf_vorbis_read(*): Hole in stream"); 
     
    291298 s->info.rate     = vi->rate; 
    292299 s->info.bits     = 16; 
     300#if ROAR_CODEC_DEFAULT == ROAR_CODEC_PCM_S_LE 
    293301 s->info.codec    = ROAR_CODEC_DEFAULT; 
     302#else 
     303 s->info.codec    = ROAR_CODEC_PCM_S_BE; 
     304#endif 
    294305 
    295306 stream_meta_clear(s->id); 
  • roard/include/codecfilter_vorbis.h

    r4708 r4765  
    4646 OggVorbis_File vf; 
    4747 int got_it_running; 
     48 int bigendianp; 
    4849#ifdef ROAR_HAVE_LIBVORBISENC 
    4950 int encoding; 
Note: See TracChangeset for help on using the changeset viewer.