Changeset 3385:917010d31107 in roaraudio for libroarpulse


Ignore:
Timestamp:
02/11/10 12:58:44 (10 years ago)
Author:
phi
Branch:
default
Message:

upgrade libroarpulse/simple to vio :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroarpulse/simple.c

    r3384 r3385  
    22 
    33/* 
    4  *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008 
     4 *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008-2010 
    55 *  The code (may) include prototypes and comments (and maybe 
    66 *  other code fragements) from libpulse*. They are mostly copyrighted by: 
     
    8181 } 
    8282 
    83  s->data_fh = roar_simple_new_stream_obj(&(s->con), &(s->stream), info.rate, info.channels, 
    84                   info.bits, info.codec, roar_dir); 
    85  
    86  if ( s->data_fh == -1 ) { 
     83 if ( roar_vio_simple_new_stream_obj(&(s->vio), &(s->con), &(s->stream), 
     84                                     info.rate, info.channels, 
     85                                     info.bits, info.codec, roar_dir) == -1 ) { 
    8786  roar_disconnect(&(s->con)); 
    8887  free(s); 
     
    107106  return; 
    108107 
    109  close(ss->data_fh); 
     108 roar_vio_close(&(ss->vio)); 
    110109 roar_disconnect(&(ss->con)); 
    111110 
     
    119118  return -1; 
    120119 
    121  return write(ss->data_fh, (char*) data, length); 
     120 return roar_vio_write(&(ss->vio), (char*) data, length); 
    122121} 
    123122 
     
    139138  return -1; 
    140139 
    141  return read(ss->data_fh, data, length); 
     140 return roar_vio_read(&(ss->vio), data, length); 
    142141} 
    143142 
     
    158157 
    159158#ifdef ROAR_FDATASYNC 
    160  return ROAR_FDATASYNC(ss->data_fh); 
     159 return roar_vio_sync(&(ss->vio)); 
    161160#else 
    162161 return 0; 
Note: See TracChangeset for help on using the changeset viewer.