Changeset 3649:b4c6a4d9b9b9 in roaraudio for libroaresd
- Timestamp:
- 03/15/10 04:34:17 (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroaresd/esdstream.c
r3517 r3649 110 110 /* int esd_monitor_stream_fallback( esd_format_t format, int rate ); */ 111 111 int esd_record_stream( esd_format_t format, int rate, 112 const char *host, const char *name ); 112 const char *host, const char *name ) { 113 int channels; 114 int bits; 115 int codec = ROAR_CODEC_DEFAULT; 116 117 ROAR_DBG("esd_record_stream(format=%x, rate=%i, host='%s', name='%s') = ?", format, rate, host, name); 118 119 if ( (format & ESD_BITS16) ) { 120 bits = 16; 121 } else { 122 bits = 8; 123 codec = CODEC_DEF_8BIT; 124 } 125 126 if ( (format & ESD_MONO) ) { 127 channels = 1; 128 } else { 129 channels = 2; 130 } 131 132 return roar_simple_record(rate, channels, bits, codec, (char*)host, (char*)name); 133 } 113 134 int esd_record_stream_fallback( esd_format_t format, int rate, 114 const char *host, const char *name ); 135 const char *host, const char *name ) { 136 int r; 137 138 if ( (r = esd_record_stream(format, rate, host, name)) != -1 ) { 139 return r; 140 } 141 142 return esd_record_stream(format, rate, "+fork", name); 143 } 115 144 int esd_filter_stream( esd_format_t format, int rate, 116 145 const char *host, const char *name ) {
Note: See TracChangeset
for help on using the changeset viewer.