Changeset 3042:4eeaa55d36c6 in roaraudio


Ignore:
Timestamp:
11/25/09 18:18:49 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

wrote a _very_, _very_ experimental impl. of jumbo packets

Location:
roard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • roard/include/streams.h

    r2816 r3042  
    8181 int state; 
    8282 struct roar_buffer * prethru; 
     83 struct roar_vio_calls jumbo; 
     84 struct roar_vio_calls * viop; 
    8385} * g_streams[ROAR_STREAMS_MAX]; 
    8486 
  • roard/streams.c

    r2971 r3042  
    121121 
    122122   roar_vio_init_calls(&(s->vio)); 
     123   roar_vio_init_calls(&(s->jumbo)); 
     124   s->viop      = &(s->vio); 
    123125   s->driver_id = -1; 
    124126   s->flags     =  ROAR_FLAG_NONE; 
     
    243245 
    244246 if ( !no_vio_close ) 
    245   roar_vio_close(&(s->vio)); 
     247  roar_vio_close(s->viop); 
    246248 
    247249 prim = s->primary; 
     
    14821484  return 0; 
    14831485 
     1486 if ( g_config->jumbo_mtu ) 
     1487  roar_vio_sync(ss->viop); 
     1488 
    14841489 if ( streams_get_flag(id, ROAR_FLAG_PAUSE) ) 
    14851490  return 0; 
     
    17861791      if ( g_streams[i]->state == ROAR_STREAMSTATE_NEW ) { 
    17871792       if ( streams_get_flag(i, ROAR_FLAG_PRETHRU) == 1 ) { 
    1788          if ( stream_prethru_send(i, ROAR_STREAM(stream)->id) == -1 ) { 
     1793        if ( stream_prethru_send(i, ROAR_STREAM(stream)->id) == -1 ) { 
    17891794         streams_delete(i); 
    17901795        } 
     
    18041809 } 
    18051810 
    1806  return roar_vio_write(&(stream->vio), buf, count); 
     1811 if ( g_config->jumbo_mtu ) { 
     1812  if ( stream->viop != &(stream->jumbo) ) { 
     1813   if ( roar_vio_open_jumbo(&(stream->jumbo), &(stream->vio), g_config->jumbo_mtu) != -1 ) { 
     1814    // if that works we continue using the jumbo vio, 
     1815    // in case it didn't we dont, just use normal VIO. 
     1816    stream->viop = &(stream->jumbo); 
     1817   } 
     1818  } 
     1819 } 
     1820 
     1821 return roar_vio_write(stream->viop, buf, count); 
    18071822} 
    18081823 
Note: See TracChangeset for help on using the changeset viewer.