Changeset 5509:cd1927035f25 in roaraudio for libroarpulse/stream.c
- Timestamp:
- 05/25/12 03:37:56 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroarpulse/stream.c
r5508 r5509 177 177 /** Return the device (sink input or source output) index this stream is connected to */ 178 178 uint32_t pa_stream_get_index(pa_stream *s) { 179 (void)s; 180 return 0; 179 struct roar_stream_info info; 180 181 if ( roar_stream_get_info(roar_pa_context_get_con(s->c), &(s->stream), &info) == -1 ) 182 return 0; 183 184 if ( info.mixer == -1 ) 185 return 0; 186 187 return info.mixer; 181 188 } 182 189 … … 697 704 698 705 /** Pause (or resume) playback of this stream temporarily. Available on both playback and recording streams. \since 0.3 */ 699 pa_operation* pa_stream_cork(pa_stream *s, int b, pa_stream_success_cb_t cb, void *userdata); 706 pa_operation* pa_stream_cork(pa_stream *s, int b, pa_stream_success_cb_t cb, void *userdata) { 707 int action = b ? ROAR_SET_FLAG : ROAR_RESET_FLAG; 708 709 if ( roar_stream_set_flags(roar_pa_context_get_con(s->c), &(s->stream), ROAR_FLAG_PAUSE, action) == -1 ) { 710 cb(s, 0, userdata); 711 } else { 712 cb(s, 1, userdata); 713 } 714 715 return roar_pa_operation_new(PA_OPERATION_DONE); 716 } 717 718 /** Return 1 if the this stream has been corked. This will return 0 if 719 * not, and negative on error. \since 0.9.11 */ 720 int pa_stream_is_corked(pa_stream *s) { 721 struct roar_stream_info info; 722 723 if ( roar_stream_get_info(roar_pa_context_get_con(s->c), &(s->stream), &info) == -1 ) 724 return -1; 725 726 return (info.flags & ROAR_FLAG_PAUSE) ? 1 : 0; 727 } 700 728 701 729 /** Flush the playback buffer of this stream. Most of the time you're
Note: See TracChangeset
for help on using the changeset viewer.