Changeset 404:6e2026516643 in roaraudio for libroarpulse/simple.c
- Timestamp:
- 08/10/08 01:05:39 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroarpulse/simple.c
r402 r404 20 20 /** Close and free the connection to the server. The connection objects becomes invalid when this is called. */ 21 21 void pa_simple_free(pa_simple *s) { 22 struct roarpulse_simple * ss = (struct roarpulse_simple*) s; 23 if ( !s ) 24 return; 25 26 free(s); 22 27 } 23 28 24 29 /** Write some data to the server */ 25 30 int pa_simple_write(pa_simple *s, const void*data, size_t length, int *error) { 26 return -1; 31 struct roarpulse_simple * ss = (struct roarpulse_simple*) s; 32 if ( !s ) 33 return -1; 34 35 return read(ss->data_fh, data, length); 27 36 } 28 37 29 38 /** Wait until all data already written is played by the daemon */ 30 39 int pa_simple_drain(pa_simple *s, int *error) { 40 struct roarpulse_simple * ss = (struct roarpulse_simple*) s; 41 if ( !s ) 42 return -1; 43 31 44 return -1; 32 45 } … … 34 47 /** Read some data from the server */ 35 48 int pa_simple_read(pa_simple *s, void*data, size_t length, int *error) { 36 return -1; 49 struct roarpulse_simple * ss = (struct roarpulse_simple*) s; 50 if ( !s ) 51 return -1; 52 53 return read(ss->data_fh, data, legth); 37 54 } 38 55 39 56 /** Return the playback latency. \since 0.5 */ 40 57 pa_usec_t pa_simple_get_latency(pa_simple *s, int *error) { 58 struct roarpulse_simple * ss = (struct roarpulse_simple*) s; 59 if ( !s ) 60 return -1; 61 41 62 return -1; 42 63 } … … 44 65 /** Flush the playback buffer. \since 0.5 */ 45 66 int pa_simple_flush(pa_simple *s, int *error) { 46 return -1; 67 struct roarpulse_simple * ss = (struct roarpulse_simple*) s; 68 if ( !s ) 69 return -1; 70 71 return fdatasync(ss->data_fh); 47 72 } 48 73
Note: See TracChangeset
for help on using the changeset viewer.