Changeset 4987:9335631d4e00 in roaraudio


Ignore:
Timestamp:
05/20/11 12:15:25 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

get codecfilter for ogg_vorbis working again

Location:
roard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • roard/codecfilter_vorbis.c

    r4822 r4987  
    5050 ROAR_DBG("cf_vorbis_vfvio_read(ptr=%p, size=%lu, nmemb=%lu, datasource=%p): r=%i", ptr, size, nmemb, datasource, r); 
    5151 
    52  if ( r == -1 ) 
     52 if ( r == -1 ) { 
     53  ROAR_DBG("cf_vorbis_vfvio_read(ptr=%p, size=%lu, nmemb=%lu, datasource=%p) = 0 // roar_error=%i(%s)", ptr, size, nmemb, datasource, roar_error, roar_error2str(roar_error)); 
    5354  return 0; 
     55 } 
    5456 
    5557 if ( r > 0 ) 
     
    235237 long todo = len; 
    236238 long done = 0; 
    237  
    238 // printf("cf_vorbis_read(inst=%p, buf=%p, len=%i) = ?\n", inst, buf, len); 
     239 int ret; 
     240 
     241 ROAR_DBG("cf_vorbis_read(inst=%p, buf=%p, len=%i) = ?", inst, buf, len); 
    239242 
    240243 self->opened++; 
    241244 if ( self->opened == 16 ) { 
    242245 
    243   //printf("cf_vorbis_read(*): opening...\n"); 
    244   if ( ov_open_callbacks((void*)self->stream, &(self->vf), NULL, 0, _g_cf_vorbis_vfvio) < 0 ) { 
     246  ROAR_DBG("cf_vorbis_read(*): opening..."); 
     247  if ( (ret = ov_open_callbacks((void*)self->stream, &(self->vf), NULL, 0, _g_cf_vorbis_vfvio)) < 0 ) { 
     248   ROAR_DBG("cf_vorbis_read(*): ret=%i", ret); 
     249   ROAR_DBG("cf_vorbis_read(*) = 0"); 
    245250   return 0; 
    246251  } 
     252 
     253  ROAR_DBG("cf_vorbis_read(*) = -1 // errno=EAGAIN"); 
    247254  errno = EAGAIN; 
    248255  return -1; 
     
    250257 
    251258 if ( self->opened < 16 ) { 
     259  ROAR_DBG("cf_vorbis_read(*) = -1 // errno=EAGAIN"); 
    252260  errno = EAGAIN; 
    253261  return -1; 
     
    259267 while (todo) { 
    260268  r = ov_read(&(self->vf), buf+done, todo, self->bigendianp, 2, 1, &(self->current_section)); 
     269  ROAR_DBG("cf_vorbis_read(*): r=%li", r); 
    261270  if ( r == OV_HOLE ) { 
    262271   ROAR_DBG("cf_vorbis_read(*): Hole in stream"); 
     
    274283 } 
    275284 
    276 //printf("ov_read(*) = %i\n", done); 
     285 ROAR_DBG("ov_read(*) = %i", done); 
    277286 
    278287 if ( done == 0 ) { 
  • roard/streams.c

    r4967 r4987  
    222222#endif 
    223223 
    224    roar_vio_clear_calls(&(s->vio)); 
     224   roar_vio_init_calls(&(s->vio)); 
    225225   roar_vio_clear_calls(&(s->jumbo)); 
    226226   s->viop      = &(s->vio); 
     
    26212621 errno = 0; 
    26222622 
    2623  if ( !stream ) 
    2624   return -1; 
     2623 if ( stream == NULL ) { 
     2624  roar_err_set(ROAR_ERROR_FAULT); 
     2625  return -1; 
     2626 } 
    26252627 
    26262628 //roar_vio_set_fh(&(stream->vio), ROAR_STREAM(stream)->fh); 
    26272629 
    2628  if ( ! stream->vio.read ) 
    2629   return -1; 
     2630 if ( ! stream->vio.read ) { 
     2631  roar_err_set(ROAR_ERROR_NOTSUP); 
     2632  return -1; 
     2633 } 
    26302634 
    26312635 while ( (r = roar_vio_read(&(stream->vio), buf, count)) > 0 ) { 
     
    26682672 errno = 0; 
    26692673 
    2670  if ( !stream ) 
    2671   return -1; 
     2674 if ( stream == NULL ) { 
     2675  roar_err_set(ROAR_ERROR_FAULT); 
     2676  return -1; 
     2677 } 
    26722678 
    26732679/* 
Note: See TracChangeset for help on using the changeset viewer.