Changeset 3461:d5cac3d3f9b6 in roaraudio
- Timestamp:
- 02/13/10 21:59:58 (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroarpulse/mainloop.c
r3460 r3461 39 39 #include <libroarpulse/libroarpulse.h> 40 40 41 /** Allocate a new main loop object */ 42 pa_mainloop *pa_mainloop_new(void); 43 44 /** Free a main loop object */ 45 void pa_mainloop_free(pa_mainloop* m); 46 47 /** Prepare for a single iteration of the main loop. Returns a negative value 48 on error or exit request. timeout specifies a maximum timeout for the subsequent 49 poll, or -1 for blocking behaviour. .*/ 50 int pa_mainloop_prepare(pa_mainloop *m, int timeout); 51 52 /** Execute the previously prepared poll. Returns a negative value on error.*/ 53 int pa_mainloop_poll(pa_mainloop *m); 54 55 /** Dispatch timeout, io and deferred events from the previously executed poll. Returns 56 a negative value on error. On success returns the number of source dispatched. */ 57 int pa_mainloop_dispatch(pa_mainloop *m); 58 59 /** Return the return value as specified with the main loop's quit() routine. */ 60 int pa_mainloop_get_retval(pa_mainloop *m); 61 62 /** Run a single iteration of the main loop. This is a convenience function 63 for pa_mainloop_prepare(), pa_mainloop_poll() and pa_mainloop_dispatch(). 64 Returns a negative value on error or exit request. If block is nonzero, 65 block for events if none are queued. Optionally return the return value as 66 specified with the main loop's quit() routine in the integer variable retval points 67 to. On success returns the number of sources dispatched in this iteration. */ 68 int pa_mainloop_iterate(pa_mainloop *m, int block, int *retval); 69 70 /** Run unlimited iterations of the main loop object until the main loop's quit() routine is called. */ 71 int pa_mainloop_run(pa_mainloop *m, int *retval); 72 73 /** Return the abstract main loop abstraction layer vtable for this main loop. */ 74 pa_mainloop_api* pa_mainloop_get_api(pa_mainloop*m); 75 76 /** Shutdown the main loop */ 77 void pa_mainloop_quit(pa_mainloop *m, int r); 78 79 /** Interrupt a running poll (for threaded systems) */ 80 void pa_mainloop_wakeup(pa_mainloop *m); 81 82 /** Generic prototype of a poll() like function */ 83 typedef int (*pa_poll_func)(struct pollfd *ufds, unsigned long nfds, int timeout, void*userdata); 84 85 /** Change the poll() implementation */ 86 void pa_mainloop_set_poll_func(pa_mainloop *m, pa_poll_func poll_func, void *userdata); 87 41 88 //ll
Note: See TracChangeset
for help on using the changeset viewer.