Changeset 2816:b9e357b0dc43 in roaraudio for roard/codecfilter_speex.c


Ignore:
Timestamp:
09/29/09 18:04:39 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added prethru support and updated list of codecs a bit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/codecfilter_speex.c

    r2310 r2816  
    261261 int ret = 0; 
    262262 int need_extra; 
     263 int sid; 
     264 void * prethru; 
    263265 
    264266/* 
     
    271273 
    272274 if ( ! self->encoder ) { 
     275  sid = ROAR_STREAM(self->stream)->id; 
     276 
     277  if ( stream_prethru_destroy(sid) == -1 ) { 
     278   return -1; 
     279  } 
     280 
     281  if ( stream_prethru_add_data(sid, &prethru, ROAR_SPEEX_MAGIC_LEN) == -1 ) { 
     282   return -1; 
     283  } 
     284 
     285  memcpy(prethru, ROAR_SPEEX_MAGIC, ROAR_SPEEX_MAGIC_LEN); 
     286 
    273287  if ( stream_vio_s_write(self->stream, ROAR_SPEEX_MAGIC, ROAR_SPEEX_MAGIC_LEN) != ROAR_SPEEX_MAGIC_LEN ) 
    274288   return -1; 
     
    282296  } 
    283297 
     298 
    284299  mode = ROAR_HOST2NET16(mode); 
     300 
     301  if ( stream_prethru_add_data(sid, &prethru, 2) == -1 ) { 
     302   return -1; 
     303  } 
     304 
     305  *(uint16_t*)prethru = mode; 
    285306 
    286307  if ( stream_vio_s_write(self->stream, &mode, 2) != 2 ) 
Note: See TracChangeset for help on using the changeset viewer.