Changeset 465:82fd66e50dc3 in roaraudio for libroararts


Ignore:
Timestamp:
08/12/08 15:37:57 (16 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added support to get the size of optimal read() and write()s

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroararts/libartsc.c

    r463 r465  
    202202int arts_stream_get(arts_stream_t stream, arts_parameter_t param) { 
    203203 struct _libroarartsc_stream * s = (struct _libroarartsc_stream *) stream; 
     204 struct roar_stream_info info; 
     205 
    204206 if ( !stream ) 
    205207  return -1; 
    206208 
    207209 if ( param == ARTS_P_PACKET_SIZE ) { 
    208   return 2048; 
     210  if ( roar_stream_get_info(_libroarartsc_connection, &(s->stream), &info) != -1 ) { 
     211   return info.block_size; 
     212  } 
     213  return -1; 
    209214 } else if ( param == ARTS_P_PACKET_COUNT ) { 
    210215  return 1; 
Note: See TracChangeset for help on using the changeset viewer.