2 This file is part of PulseAudio.
4 Copyright 2009 Lennart Poettering
6 PulseAudio is free software; you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as published
8 by the Free Software Foundation; either version 2.1 of the License,
9 or (at your option) any later version.
11 PulseAudio is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public License
17 along with PulseAudio; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
25 [CCode (cheader_filename="pulse/pulseaudio.h")]
26 namespace PulseAudio {
28 [CCode (cname="pa_get_library_version")]
29 public unowned string get_library_version();
31 [CCode (cname="PA_API_VERSION")]
32 public const int API_VERSION;
34 [CCode (cname="PA_PROTOCOL_VERSION")]
35 public const int PROTOCOL_VERSION;
37 [CCode (cname="PA_MAJOR")]
38 public const int MAJOR;
40 [CCode (cname="PA_MINOR")]
41 public const int MINOR;
43 [CCode (cname="PA_MICRO")]
44 public const int MICRO;
46 [CCode (cname="PA_CHECK_VERSION")]
47 public bool CHECK_VERSION(int major, int minor, int micro);
49 [CCode (cname="PA_INVALID_INDEX")]
50 public const uint32 INVALID_INDEX;
52 [CCode (cname="pa_free_cb_t", has_target=false)]
53 public delegate void FreeCb(void *p);
55 [CCode (cname="pa_sample_format_t", cprefix="PA_SAMPLE_", has_type_id=false)]
56 public enum SampleFormat {
82 [CCode (cname="pa_sample_size_of_format")]
85 [CCode (cname="pa_sample_format_to_string")]
86 public unowned string? to_string();
88 [CCode (cname="pa_sample_format_is_le")]
91 [CCode (cname="pa_sample_format_is_be")]
94 [CCode (cname="pa_sample_format_is_ne")]
97 [CCode (cname="pa_sample_format_is_re")]
100 [CCode (cname="pa_parse_sample_format")]
101 public static SampleFormat parse(string b);
104 [CCode (cname="pa_usec_t")]
105 public struct usec : uint64 {
108 [CCode (cname="pa_sample_spec", has_type_id=false)]
109 public struct SampleSpec {
110 public SampleFormat format;
112 public uint8 channels;
114 [CCode (cname="PA_SAMPLE_SPEC_SNPRINT_MAX")]
115 public static const size_t SNPRINT_MAX;
117 [CCode (cname="pa_bytes_per_second")]
118 public size_t bytes_per_second();
120 [CCode (cname="pa_frame_size")]
121 public size_t frame_size();
123 [CCode (cname="pa_sample_size")]
124 public size_t sample_size();
126 [CCode (cname="pa_bytes_to_usec", instance_pos=1.1)]
127 public usec bytes_to_usec(size_t size);
129 [CCode (cname="pa_usec_to_bytes", instance_pos=1.1)]
130 public size_t usec_to_bytes(usec u);
132 [CCode (cname="pa_sample_spec_init")]
133 public unowned SampleSpec? init();
135 [CCode (cname="pa_sample_spec_valid")]
138 [CCode (cname="pa_sample_spec_equal")]
139 public bool equal(SampleSpec other);
141 [CCode (cname="pa_sample_spec_snprint", instance_pos=3.1)]
142 public unowned string snprint(char[] buf);
144 public string sprint() {
145 var buffer = new char[SNPRINT_MAX];
146 this.snprint(buffer);
147 return (string) buffer;
150 public string to_string() {
154 [CCode (cname="pa_sample_spec_init")]
158 // [CCode (cname="PA_BYTES_SNPRINT_MAX")]
159 [CCode (cname="PA_SAMPLE_SPEC_SNPRINT_MAX")]
160 public const size_t BYTES_SNPRINT_MAX;
162 [CCode (cname="pa_bytes_snprint")]
163 public unowned string bytes_snprint(char[] buf, uint bytes);
165 public string bytes_sprint(uint bytes) {
166 var buffer = new char[BYTES_SNPRINT_MAX];
167 bytes_snprint(buffer, bytes);
168 return (string) buffer;
171 [CCode (cname="pa_volume_t", has_type_id=false)]
172 public struct Volume : uint32 {
174 [CCode (cname="PA_SW_VOLUME_SNPRINT_DB_MAX")]
175 public static const size_t SW_SNPRINT_DB_MAX;
177 [CCode (cname="PA_VOLUME_SNPRINT_MAX")]
178 public static const size_t SNPRINT_MAX;
180 [CCode (cname="PA_VOLUME_MAX")]
181 public static const Volume MAX;
183 [CCode (cname="PA_VOLUME_NORM")]
184 public static const Volume NORM;
186 [CCode (cname="PA_VOLUME_MUTED")]
187 public static const Volume MUTED;
189 // [CCode (cname="PA_VOLUME_INVALID")]
190 [CCode (cname="PA_VOLUME_MAX")]
191 public static const Volume INVALID;
193 [CCode (cname="pa_volume_snprint", instance_pos = 3.1)]
194 public unowned string snprint(char[] s);
196 public string sprint() {
197 var buffer = new char[SNPRINT_MAX];
198 this.snprint(buffer);
199 return (string) buffer;
202 public string to_string() {
206 [CCode (cname="pa_sw_volume_snprint_dB", instance_pos = 3.1)]
207 public unowned string sw_snprint_dB(char[] s);
209 public string sw_sprint_dB() {
210 var buffer = new char[SW_SNPRINT_DB_MAX];
211 this.sw_snprint_dB(buffer);
212 return (string) buffer;
215 [CCode (cname="pa_sw_volume_multiply")]
216 public Volume sw_multiply(Volume other);
218 [CCode (cname="pa_sw_volume_divide")]
219 public Volume sw_divide(Volume other);
221 [CCode (cname="pa_sw_volume_from_dB")]
222 public static Volume sw_from_dB(double f);
224 [CCode (cname="pa_sw_volume_to_dB")]
225 public double sw_to_dB();
227 [CCode (cname="pa_sw_volume_from_linear")]
228 public static Volume sw_from_linear(double f);
230 [CCode (cname="pa_sw_volume_to_linear")]
231 public double sw_to_linear();
234 [CCode (cname="PA_DECIBEL_MININFTY")]
235 public const double DECIBEL_MININFTY;
237 [CCode (cname="PA_CHANNELS_MAX")]
238 public const int CHANNELS_MAX;
240 [CCode (cname="PA_RATE_MAX")]
241 public const int RATE_MAX;
243 [CCode (cname="pa_cvolume", has_type_id=false)]
244 public struct CVolume {
245 public uint8 channels;
246 // TODO: Replace array length with CHANNELS_MAX once vala's bug #647788 is fixed
247 public Volume values[32];
249 [CCode (cname="PA_SW_CVOLUME_SNPRINT_DB_MAX")]
250 public static const size_t SW_SNPRINT_DB_MAX;
252 [CCode (cname="PA_CVOLUME_SNPRINT_MAX")]
253 public static const size_t SNPRINT_MAX;
255 [CCode (cname="pa_cvolume_equal")]
256 public bool equal(CVolume other);
258 [CCode (cname="pa_cvolume_init")]
259 public unowned CVolume? init();
261 [CCode (cname="pa_cvolume_reset")]
262 public unowned CVolume? reset(uint8 channels);
264 [CCode (cname="pa_cvolume_mute")]
265 public unowned CVolume? mute(uint8 channels);
267 [CCode (cname="pa_cvolume_snprint", instance_pos = 3.1)]
268 public unowned string snprint(char[] s);
270 public string sprint() {
271 var buffer = new char[SNPRINT_MAX];
272 this.snprint(buffer);
273 return (string) buffer;
276 public string to_string() {
280 [CCode (cname="pa_sw_cvolume_snprint_dB", instance_pos = 3.1)]
281 public unowned string sw_snprint_dB(char [] s);
283 public string sw_sprint_dB() {
284 var buffer = new char[SW_SNPRINT_DB_MAX];
285 this.sw_snprint_dB(buffer);
286 return (string) buffer;
289 [CCode (cname="pa_cvolume_init")]
292 [CCode (cname="pa_cvolume_avg")]
295 [CCode (cname="pa_cvolume_max")]
298 [CCode (cname="pa_cvolume_min")]
301 [CCode (cname="pa_cvolume_avg_mask")]
302 public Volume avg_mask(ChannelMap map, ChannelPositionMask mask);
304 [CCode (cname="pa_cvolume_max_mask")]
305 public Volume max_mask(ChannelMap map, ChannelPositionMask mask);
307 [CCode (cname="pa_cvolume_min_mask")]
308 public Volume min_mask(ChannelMap map, ChannelPositionMask mask);
310 [CCode (cname="pa_cvolume_valid")]
313 [CCode (cname="pa_cvolume_channels_equal_to")]
314 public bool channels_equal_to(Volume other);
316 [CCode (cname="pa_cvolume_is_muted")]
317 public bool is_muted();
319 [CCode (cname="pa_cvolume_is_norm")]
320 public bool is_norm();
322 [CCode (cname="pa_sw_cvolume_multiply")]
323 public unowned CVolume? multiply(CVolume other);
325 [CCode (cname="pa_sw_cvolume_divide")]
326 public unowned CVolume? divide(CVolume other);
328 [CCode (cname="pa_sw_cvolume_multiply_scalar")]
329 public unowned CVolume? multiply_scalar(Volume other);
331 [CCode (cname="pa_sw_cvolume_divide_scalar")]
332 public unowned CVolume? divide_scalar(Volume other);
334 [CCode (cname="pa_cvolume_remap")]
335 public unowned CVolume? remap(ChannelMap from, ChannelMap to);
337 [CCode (cname="pa_cvolume_compatible")]
338 public bool compatible(SampleSpec ss);
340 [CCode (cname="pa_cvolume_compatible_with_channel_map")]
341 public bool compatible_with_channel_map(ChannelMap cm);
343 [CCode (cname="pa_cvolume_set")]
344 public unowned CVolume? set(uint8 channels, Volume v);
346 [CCode (cname="pa_cvolume_get_balance")]
347 public float get_balance(ChannelMap map);
349 [CCode (cname="pa_cvolume_set_balance")]
350 public unowned CVolume? set_balance(ChannelMap map, float b);
352 [CCode (cname="pa_cvolume_get_fade")]
353 public float get_fade(ChannelMap map);
355 [CCode (cname="pa_cvolume_set_fade")]
356 public unowned CVolume? set_fade(ChannelMap map, float f);
358 [CCode (cname="pa_cvolume_scale")]
359 public unowned CVolume? scale(Volume max);
361 [CCode (cname="pa_cvolume_scale_mask")]
362 public unowned CVolume? scale_mask(Volume max, ChannelMap map, ChannelPositionMask mask);
364 [CCode (cname="pa_cvolume_set_position")]
365 public unowned CVolume? set_position(ChannelMap map, ChannelPosition p, Volume v);
367 [CCode (cname="pa_cvolume_get_position")]
368 public Volume get_position(ChannelMap map, ChannelPosition p);
370 [CCode (cname="pa_cvolume_merge")]
371 public unowned CVolume? merge(CVolume other);
373 [CCode (cname="pa_cvolume_inc")]
374 public unowned CVolume? inc(Volume plus = 1);
376 [CCode (cname="pa_cvolume_dec")]
377 public unowned CVolume? dec(Volume minus = 1);
380 [CCode (cname="pa_channel_map", has_type_id=false)]
381 public struct ChannelMap {
382 public uint8 channels;
383 // TODO: Replace array length with CHANNELS_MAX once vala's bug #647788 is fixed
384 public ChannelPosition map[32];
386 [CCode (cname="PA_CHANNEL_MAP_SNPRINT_MAX")]
387 public static const size_t SNPRINT_MAX;
389 [CCode (cname="pa_channel_map_init")]
392 [CCode (cname="pa_channel_map_init")]
393 public unowned ChannelMap? init();
395 [CCode (cname="pa_channel_map_init_mono")]
396 public unowned ChannelMap? init_mono();
398 [CCode (cname="pa_channel_map_init_stereo")]
399 public unowned ChannelMap? init_stereo();
401 [CCode (cname="pa_channel_map_init_auto")]
402 public unowned ChannelMap? init_auto(uint8 channels, ChannelMapDef def = ChannelMapDef.DEFAULT);
404 [CCode (cname="pa_channel_map_init_extend")]
405 public unowned ChannelMap? init_extend(uint8 channels, ChannelMapDef def = ChannelMapDef.DEFAULT);
407 [CCode (cname="pa_channel_map_snprint", instance_pos = 3.1)]
408 public unowned string snprint(char[] s);
410 public string sprint() {
411 var buffer = new char[SNPRINT_MAX];
412 this.snprint(buffer);
413 return (string) buffer;
416 public string to_string() {
420 [CCode (cname="pa_channel_map_parse")]
421 public unowned ChannelMap? parse(string s);
423 [CCode (cname="pa_channel_map_equal")]
424 public bool equal(ChannelMap other);
426 [CCode (cname="pa_channel_map_superset")]
427 public bool superset(ChannelMap other);
429 [CCode (cname="pa_channel_map_valid")]
432 [CCode (cname="pa_channel_map_compatible")]
433 public bool compatible(SampleSpec ss);
435 [CCode (cname="pa_channel_map_can_balance")]
436 public bool can_balance();
438 [CCode (cname="pa_channel_map_can_fade")]
439 public bool can_fade();
441 [CCode (cname="pa_channel_map_to_name")]
442 public unowned string? to_name();
444 [CCode (cname="pa_channel_map_to_pretty_name")]
445 public unowned string? to_pretty_name();
447 [CCode (cname="pa_channel_map_has_position")]
448 public bool has_position(ChannelPosition p);
450 [CCode (cname="pa_channel_map_mask")]
451 public ChannelPositionMask mask();
454 [CCode (cname="pa_channel_position_mask_t", has_type_id=false)]
455 public struct ChannelPositionMask : uint64 {
458 [CCode (cname="pa_channel_position_t", cprefix="PA_CHANNEL_POSITION_", has_type_id=false)]
459 public enum ChannelPosition {
469 FRONT_LEFT_OF_CENTER,
470 FRONT_RIGHT_OF_CENTER,
508 [CCode (cname="PA_CHANNEL_POSITION_MASK")]
509 public ChannelPositionMask mask();
511 [CCode (cname="pa_channel_position_to_string")]
512 public unowned string? to_string();
514 [CCode (cname="pa_channel_position_to_pretty_string")]
515 public unowned string? to_pretty_string();
517 [CCode (cname="pa_channel_position_from_string")]
518 public static ChannelPosition from_string(string s);
521 [CCode (cname="pa_channel_map_def_t", cprefix="PA_CHANNEL_MAP_", has_type_id=false)]
522 public enum ChannelMapDef {
528 [CCode (cname="PA_CHANNEL_MAP_DEF_MAX")]
533 [CCode (cname="pa_proplist", cprefix="pa_proplist_", free_function="pa_proplist_free", has_type_id=false)]
534 public class Proplist {
536 [CCode (cname="PA_PROP_MEDIA_NAME")]
537 public static const string PROP_MEDIA_NAME;
538 [CCode (cname="PA_PROP_MEDIA_TITLE")]
539 public static const string PROP_MEDIA_TITLE;
540 [CCode (cname="PA_PROP_MEDIA_ARTIST")]
541 public static const string PROP_MEDIA_ARTIST;
542 [CCode (cname="PA_PROP_MEDIA_COPYRIGHT")]
543 public static const string PROP_MEDIA_COPYRIGHT;
544 [CCode (cname="PA_PROP_MEDIA_SOFTWARE")]
545 public static const string PROP_MEDIA_SOFTWARE;
546 [CCode (cname="PA_PROP_MEDIA_LANGUAGE")]
547 public static const string PROP_MEDIA_LANGUAGE;
548 [CCode (cname="PA_PROP_MEDIA_FILENAME")]
549 public static const string PROP_MEDIA_FILENAME;
550 [CCode (cname="PA_PROP_MEDIA_ICON_NAME")]
551 public static const string PROP_MEDIA_ICON_NAME;
552 [CCode (cname="PA_PROP_MEDIA_ROLE")]
553 public static const string PROP_MEDIA_ROLE;
554 [CCode (cname="PA_PROP_EVENT_ID")]
555 public static const string PROP_EVENT_ID;
556 [CCode (cname="PA_PROP_EVENT_DESCRIPTION")]
557 public static const string PROP_EVENT_DESCRIPTION;
558 [CCode (cname="PA_PROP_EVENT_MOUSE_X")]
559 public static const string PROP_EVENT_MOUSE_X;
560 [CCode (cname="PA_PROP_EVENT_MOUSE_Y")]
561 public static const string PROP_EVENT_MOUSE_Y;
562 [CCode (cname="PA_PROP_EVENT_MOUSE_HPOS")]
563 public static const string PROP_EVENT_MOUSE_HPOS;
564 [CCode (cname="PA_PROP_EVENT_MOUSE_VPOS")]
565 public static const string PROP_EVENT_MOUSE_VPOS;
566 [CCode (cname="PA_PROP_EVENT_MOUSE_BUTTON")]
567 public static const string PROP_EVENT_MOUSE_BUTTON;
568 [CCode (cname="PA_PROP_WINDOW_NAME")]
569 public static const string PROP_WINDOW_NAME;
570 [CCode (cname="PA_PROP_WINDOW_ID")]
571 public static const string PROP_WINDOW_ID;
572 [CCode (cname="PA_PROP_WINDOW_ICON_NAME")]
573 public static const string PROP_WINDOW_ICON_NAME;
574 [CCode (cname="PA_PROP_WINDOW_X11_DISPLAY")]
575 public static const string PROP_WINDOW_X11_DISPLAY;
576 [CCode (cname="PA_PROP_WINDOW_X11_SCREEN")]
577 public static const string PROP_WINDOW_X11_SCREEN;
578 [CCode (cname="PA_PROP_WINDOW_X11_MONITOR")]
579 public static const string PROP_WINDOW_X11_MONITOR;
580 [CCode (cname="PA_PROP_WINDOW_X11_XID")]
581 public static const string PROP_WINDOW_X11_XID;
582 [CCode (cname="PA_PROP_APPLICATION_NAME")]
583 public static const string PROP_APPLICATION_NAME;
584 [CCode (cname="PA_PROP_APPLICATION_ID")]
585 public static const string PROP_APPLICATION_ID;
586 [CCode (cname="PA_PROP_APPLICATION_VERSION")]
587 public static const string PROP_APPLICATION_VERSION;
588 [CCode (cname="PA_PROP_APPLICATION_ICON_NAME")]
589 public static const string PROP_APPLICATION_ICON_NAME;
590 [CCode (cname="PA_PROP_APPLICATION_LANGUAGE")]
591 public static const string PROP_APPLICATION_LANGUAGE;
592 [CCode (cname="PA_PROP_APPLICATION_PROCESS_ID")]
593 public static const string PROP_APPLICATION_PROCESS_ID;
594 [CCode (cname="PA_PROP_APPLICATION_PROCESS_BINARY")]
595 public static const string PROP_APPLICATION_PROCESS_BINARY;
596 [CCode (cname="PA_PROP_APPLICATION_PROCESS_USER")]
597 public static const string PROP_APPLICATION_PROCESS_USER;
598 [CCode (cname="PA_PROP_APPLICATION_PROCESS_HOST")]
599 public static const string PROP_APPLICATION_PROCESS_HOST;
600 [CCode (cname="PA_PROP_APPLICATION_PROCESS_MACHINE_ID")]
601 public static const string PROP_APPLICATION_PROCESS_MACHINE_ID;
602 [CCode (cname="PA_PROP_APPLICATION_PROCESS_SESSION_ID")]
603 public static const string PROP_APPLICATION_PROCESS_SESSION_ID;
604 [CCode (cname="PA_PROP_DEVICE_STRING")]
605 public static const string PROP_DEVICE_STRING;
606 [CCode (cname="PA_PROP_DEVICE_API")]
607 public static const string PROP_DEVICE_API;
608 [CCode (cname="PA_PROP_DEVICE_DESCRIPTION")]
609 public static const string PROP_DEVICE_DESCRIPTION;
610 [CCode (cname="PA_PROP_DEVICE_BUS_PATH")]
611 public static const string PROP_DEVICE_BUS_PATH;
612 [CCode (cname="PA_PROP_DEVICE_SERIAL")]
613 public static const string PROP_DEVICE_SERIAL;
614 [CCode (cname="PA_PROP_DEVICE_VENDOR_ID")]
615 public static const string PROP_DEVICE_VENDOR_ID;
616 [CCode (cname="PA_PROP_DEVICE_VENDOR_NAME")]
617 public static const string PROP_DEVICE_VENDOR_NAME;
618 [CCode (cname="PA_PROP_DEVICE_PRODUCT_ID")]
619 public static const string PROP_DEVICE_PRODUCT_ID;
620 [CCode (cname="PA_PROP_DEVICE_PRODUCT_NAME")]
621 public static const string PROP_DEVICE_PRODUCT_NAME;
622 [CCode (cname="PA_PROP_DEVICE_CLASS")]
623 public static const string PROP_DEVICE_CLASS;
624 [CCode (cname="PA_PROP_DEVICE_FORM_FACTOR")]
625 public static const string PROP_DEVICE_FORM_FACTOR;
626 [CCode (cname="PA_PROP_DEVICE_BUS")]
627 public static const string PROP_DEVICE_BUS;
628 [CCode (cname="PA_PROP_DEVICE_ICON_NAME")]
629 public static const string PROP_DEVICE_ICON_NAME;
630 [CCode (cname="PA_PROP_DEVICE_ACCESS_MODE")]
631 public static const string PROP_DEVICE_ACCESS_MODE;
632 [CCode (cname="PA_PROP_DEVICE_MASTER_DEVICE")]
633 public static const string PROP_DEVICE_MASTER_DEVICE;
634 [CCode (cname="PA_PROP_DEVICE_BUFFERING_BUFFER_SIZE")]
635 public static const string PROP_DEVICE_BUFFERING_BUFFER_SIZE;
636 [CCode (cname="PA_PROP_DEVICE_BUFFERING_FRAGMENT_SIZE")]
637 public static const string PROP_DEVICE_BUFFERING_FRAGMENT_SIZE;
638 [CCode (cname="PA_PROP_DEVICE_PROFILE_NAME")]
639 public static const string PROP_DEVICE_PROFILE_NAME;
640 [CCode (cname="PA_PROP_DEVICE_INTENDED_ROLES")]
641 public static const string PROP_DEVICE_INTENDED_ROLES;
642 [CCode (cname="PA_PROP_DEVICE_PROFILE_DESCRIPTION")]
643 public static const string PROP_DEVICE_PROFILE_DESCRIPTION;
644 [CCode (cname="PA_PROP_MODULE_AUTHOR")]
645 public static const string PROP_MODULE_AUTHOR;
646 [CCode (cname="PA_PROP_MODULE_DESCRIPTION")]
647 public static const string PROP_MODULE_DESCRIPTION;
648 [CCode (cname="PA_PROP_MODULE_USAGE")]
649 public static const string PROP_MODULE_USAGE;
650 [CCode (cname="PA_PROP_MODULE_VERSION")]
651 public static const string PROP_MODULE_VERSION;
653 [CCode (cname="pa_proplist_new")]
656 public int sets(string key, string value);
657 public int setp(string pair);
660 public int setf(string key, string format, ...);
662 public int set(string key, void* data, size_t size);
664 public unowned string? gets(string key);
666 public int get(string key, out void* data, out size_t size);
668 public void update(UpdateMode mode, Proplist other);
670 public void unset(string key);
672 [CCode (array_length = false)]
673 public void unset_many(string[] key);
675 public unowned string? iterate(ref void* state);
677 public string to_string();
679 public string to_string_sep(string sep);
681 public static Proplist? from_string(string s);
683 public int contains(string key);
687 public Proplist copy();
691 public bool is_empty();
694 [CCode (cname="pa_update_mode_t", cprefix="PA_UPDATE_", has_type_id=false)]
695 public enum UpdateMode {
701 [CCode (cname="PA_OK")]
704 [CCode (cname="int", cprefix="PA_ERR_", has_type_id=false)]
716 CONNECTIONTERMINATED,
734 [CCode (cname="pa_strerror")]
735 public unowned string? strerror(Error e);
737 public delegate void VoidFunc();
739 [CCode (cname="pa_spawn_api", has_type_id=false)]
740 public struct SpawnApi {
746 [CCode (cname="pa_io_event_flags_t", cprefix="PA_IO_EVENT_", has_type_id=false)]
747 public enum IoEventFlags {
756 [CCode (cname="pa_io_event", unref_function="", ref_function="", has_type_id=false)]
757 public struct IoEvent {
761 [CCode (cname="pa_time_event", unref_function="", ref_function="", has_type_id=false)]
762 public struct TimeEvent {
766 [CCode (cname="pa_defer_event", unref_function="", ref_function="", has_type_id=false)]
767 public struct DeferEvent {
771 [CCode (cname="pa_signal_event", cprefix="pa_signal_", free_function="pa_signal_free", has_type_id=false)]
772 public struct SignalEvent {
774 [CCode (cname="pa_signal_new")]
775 public SignalEvent(int sig, MainLoopApi.SignalEventCb cb);
777 public void set_destroy(MainLoopApi.SignalEventDestroyCb cb);
781 [CCode (cname="pa_mainloop_api", unref_function="", ref_function="", has_type_id=false)]
782 public class MainLoopApi {
783 public void* userdata;
785 /* Callbacks for the consumer to implement*/
786 public delegate void IoEventCb(MainLoopApi a, IoEvent e, int fd, IoEventFlags flags);
787 public delegate void IoEventDestroyCb(MainLoopApi a, IoEvent e);
789 public delegate void TimeEventCb(MainLoopApi a, TimeEvent e, ref timeval t);
790 public delegate void TimeEventDestroyCb(MainLoopApi a, TimeEvent e);
792 public delegate void DeferEventCb(MainLoopApi a, DeferEvent e);
793 public delegate void DeferEventDestroyCb(MainLoopApi a, DeferEvent e);
795 public delegate void SignalEventCb(MainLoopApi a, SignalEvent e);
796 public delegate void SignalEventDestroyCb(MainLoopApi a, SignalEvent e);
798 /* Callbacks for the provider to implement */
799 public delegate IoEvent IoNewCb(MainLoopApi a, int fd, IoEventFlags flags, IoEventCb cb);
800 public delegate void IoEnableCb(MainLoopApi a, IoEvent e, IoEventFlags flags);
801 public delegate void IoFreeCb(MainLoopApi a, IoEvent e);
802 public delegate void IoSetDestroyCb(MainLoopApi a, IoEvent e, IoEventDestroyCb? cb);
804 public delegate TimeEvent TimeNewCb(MainLoopApi a, timeval? t, TimeEventCb cb);
805 public delegate void TimeRestartCb(MainLoopApi a, TimeEvent e, timeval? t);
806 public delegate void TimeFreeCb(MainLoopApi a, TimeEvent e);
807 public delegate void TimeSetDestroyCb(MainLoopApi a, TimeEvent e, TimeEventDestroyCb? cb);
809 public delegate DeferEvent DeferNewCb(MainLoopApi a, DeferEventCb cb);
810 public delegate void DeferEnableCb(MainLoopApi a, DeferEvent e, bool b);
811 public delegate void DeferFreeCb(MainLoopApi a, DeferEvent e);
812 public delegate void DeferSetDestroyCb(MainLoopApi a, DeferEvent e, DeferEventDestroyCb? cb);
814 public delegate void QuitCb(MainLoopApi a, int retval);
816 public delegate void OnceCb(MainLoopApi a);
818 public IoNewCb io_new;
819 public IoEnableCb io_enable;
820 public IoFreeCb io_free;
821 public IoSetDestroyCb io_set_destroy;
823 public TimeNewCb time_new;
824 public TimeRestartCb time_restart;
825 public TimeFreeCb time_free;
826 public TimeSetDestroyCb time_set_destroy;
828 public DeferNewCb defer_new;
829 public DeferEnableCb defer_enable;
830 public DeferFreeCb defer_free;
831 public DeferSetDestroyCb defer_set_destroy;
835 [CCode (cname="pa_mainloop_api_once")]
836 public void once(OnceCb cb);
839 [CCode (cname="pa_signal_init")]
840 public void signal_init(MainLoopApi api);
842 [CCode (cname="pa_signal_done")]
843 public void signal_done();
845 [CCode (cname="pa_poll_func")]
846 public delegate int PollFunc(pollfd[] ufds, int timeout);
849 [CCode (cname="pa_mainloop", cprefix="pa_mainloop_", free_function="pa_mainloop_free", has_type_id=false)]
850 public class MainLoop {
852 [CCode (cname="pa_mainloop_new")]
855 public int prepare(int timeout = -1);
857 public int dispatch();
858 public int get_retval();
859 public int iterate(bool block = true, out int retval = null);
860 public int run(out int retval = null);
861 public unowned MainLoopApi get_api();
862 public void quit(int retval);
863 public void wakeup();
864 public void set_poll_func(PollFunc poll_func);
868 [CCode (cname="pa_threaded_mainloop", cprefix="pa_threaded_mainloop_", free_function="pa_threaded_mainloop_free")]
869 public class ThreadedMainLoop {
871 [CCode (cname="pa_threaded_mainloop_new")]
872 public ThreadedMainLoop();
877 public void unlock();
879 public void signal(bool WaitForAccept = false);
880 public void accept();
881 public int get_retval();
882 public unowned MainLoopApi get_api();
883 public bool in_thread();
887 [CCode (cname="pa_operation", cprefix="pa_operation_", unref_function="pa_operation_unref", ref_function="pa_operation_ref", has_type_id=false)]
888 public class Operation {
890 [CCode (cname="pa_operation_state_t", cprefix="PA_OPERATION_", has_type_id=false)]
897 public void cancel();
898 public State get_state();
902 [CCode (cname="pa_context", cprefix="pa_context_", unref_function="pa_context_unref", ref_function="pa_context_ref", has_type_id=false)]
903 public class Context {
905 [CCode (cname="pa_context_flags_t", cprefix="PA_CONTEXT_", has_type_id=false)]
911 [CCode (cname="pa_context_state_t", cprefix="PA_CONTEXT_", has_type_id=false)]
921 [CCode (cname="PA_CONTEXT_IS_GOOD", has_type_id=false)]
922 public bool IS_GOOD();
925 [CCode (cname="pa_subscription_mask_t", cprefix="PA_SUBSCRIPTION_MASK_", has_type_id=false)]
926 public enum SubscriptionMask {
939 [CCode (cname="pa_subscription_match_flags")]
940 public bool match_flags(SubscriptionEventType t);
943 [CCode (cname="pa_subscription_event_type_t", cprefix="PA_SUBSCRIPTION_EVENT_", has_type_id=false)]
944 public enum SubscriptionEventType {
961 public delegate void NotifyCb(Context c);
962 public delegate void SuccessCb(Context c, int success);
963 public delegate void EventCb(Context c, string name, Proplist? proplist);
964 public delegate void SubscribeCb(Context c, SubscriptionEventType t, uint32 idx);
965 public delegate void SinkInfoCb(Context c, SinkInfo? i, int eol);
966 public delegate void SourceInfoCb(Context c, SourceInfo? i, int eol);
967 public delegate void CardInfoCb(Context c, CardInfo? i, int eol);
968 public delegate void SinkInputInfoCb(Context c, SinkInputInfo? i, int eol);
969 public delegate void SourceOutputInfoCb(Context c, SourceOutputInfo? i, int eol);
970 public delegate void ServerInfoCb(Context c, ServerInfo? i);
971 public delegate void StatInfoCb(Context c, ServerInfo? i);
972 public delegate void ModuleInfoCb(Context c, ModuleInfo? i, int eol);
973 public delegate void ClientInfoCb(Context c, ClientInfo? i, int eol);
974 public delegate void SampleInfoCb(Context c, SampleInfo? i, int eol);
975 public delegate void IndexCb(Context c, uint32 idx);
977 [CCode (cname="pa_context_new_with_proplist")]
978 public Context(MainLoopApi api, string? name, Proplist? proplist = null);
980 public void set_state_callback(NotifyCb? cb = null);
981 public void set_event_callback(EventCb? cb = null);
982 public void set_subscribe_callback(SubscribeCb? cb = null);
984 public Error errno();
986 public int is_pending();
987 public State get_state();
988 public int is_local();
989 public unowned string? get_server();
990 public uint32 get_protocol_version();
991 public uint32 get_server_protocol_version();
992 public uint32 get_index();
994 public int connect(string? server = null, Flags flags = 0, SpawnApi? api = null);
995 public void disconnect();
997 public Operation? drain(NotifyCb? cb = null);
998 public Operation? exit_daemon(SuccessCb? cb = null);
999 public Operation? set_default_sink(string name, SuccessCb? cb = null);
1000 public Operation? set_default_source(string name, SuccessCb? cb = null);
1001 public Operation? set_name(string name, SuccessCb? cb = null);
1003 [CCode (array_length = false)]
1004 public Operation? proplist_remove(string[] keys, SuccessCb? cb = null);
1005 public Operation? proplist_update(UpdateMode mode, Proplist pl, SuccessCb? cb = null);
1007 public Operation? subscribe(SubscriptionMask mask, SuccessCb? cb = null);
1009 public Operation? get_sink_info_by_name(string name, SinkInfoCb cb);
1010 public Operation? get_sink_info_by_index(uint32 idx, SinkInfoCb cb);
1011 public Operation? get_sink_info_list(SinkInfoCb cb);
1013 public Operation? set_sink_volume_by_name(string name, CVolume volume, SuccessCb? cb = null);
1014 public Operation? set_sink_volume_by_index(uint32 idx, CVolume volume, SuccessCb? cb = null);
1015 public Operation? set_sink_mute_by_name(string name, bool mute, SuccessCb? cb = null);
1016 public Operation? set_sink_mute_by_index(uint32 idx, bool mute, SuccessCb? cb = null);
1018 public Operation? suspend_sink_by_name(string name, bool suspend, SuccessCb? cb = null);
1019 public Operation? suspend_sink_by_index(uint32 idx, bool suspend, SuccessCb? cb = null);
1021 public Operation? set_sink_port_by_name(string name, string port, SuccessCb? cb = null);
1022 public Operation? set_sink_port_by_index(uint32 idx, string port, SuccessCb? cb = null);
1024 public Operation? get_source_info_by_name(string name, SourceInfoCb cb);
1025 public Operation? get_source_info_by_index(uint32 idx, SourceInfoCb cb);
1026 public Operation? get_source_info_list(SourceInfoCb cb);
1028 public Operation? set_source_volume_by_name(string name, CVolume volume, SuccessCb? cb = null);
1029 public Operation? set_source_volume_by_index(uint32 idx, CVolume volume, SuccessCb? cb = null);
1030 public Operation? set_source_mute_by_name(string name, bool mute, SuccessCb? cb = null);
1031 public Operation? set_source_mute_by_index(uint32 idx, bool mute, SuccessCb? cb = null);
1033 public Operation? suspend_source_by_name(string name, bool suspend, SuccessCb? cb = null);
1034 public Operation? suspend_source_by_index(uint32 idx, bool suspend, SuccessCb? cb = null);
1036 public Operation? set_source_port_by_name(string name, string port, SuccessCb? cb = null);
1037 public Operation? set_source_port_by_index(uint32 idx, string port, SuccessCb? cb = null);
1039 public Operation? get_server_info(ServerInfoCb cb);
1041 public Operation? get_module_info(uint32 idx, ModuleInfoCb cb);
1042 public Operation? get_module_info_list(ModuleInfoCb cb);
1044 public Operation? load_module(string name, string? argument, IndexCb? cb = null);
1045 public Operation? unload_module(uint32 idx, SuccessCb? cb = null);
1047 public Operation? get_client_info(uint32 idx, ClientInfoCb cb);
1048 public Operation? get_client_info_list(ClientInfoCb cb);
1050 public Operation? kill_client(uint32 idx, SuccessCb? cb = null);
1052 public Operation? get_card_info_by_name(string name, CardInfoCb cb);
1053 public Operation? get_card_info_by_index(uint32 idx, CardInfoCb cb);
1054 public Operation? get_card_info_list(CardInfoCb cb);
1056 public Operation? set_card_profile_by_index(uint32 idx, string profile, SuccessCb? cb = null);
1057 public Operation? set_card_profile_by_name(string name, string profile, SuccessCb? cb = null);
1059 public Operation? get_sink_input_info(uint32 idx, SinkInputInfoCb cb);
1060 public Operation? get_sink_input_info_list(SinkInputInfoCb cb);
1062 public Operation? move_sink_input_by_index(uint32 idx, uint32 sink_idx, SuccessCb? cb = null);
1063 public Operation? move_sink_input_by_name(uint32 idx, string sink_name, SuccessCb? cb = null);
1065 public Operation? set_sink_input_volume(uint32 idx, CVolume volume, SuccessCb? cb = null);
1066 public Operation? set_sink_input_mute(uint32 idx, bool mute, SuccessCb? cb = null);
1068 public Operation? kill_sink_input(uint32 idx, SuccessCb? cb = null);
1070 public Operation? get_source_output_info(uint32 idx, SourceOutputInfoCb cb);
1071 public Operation? get_source_output_info_list(SourceOutputInfoCb cb);
1073 public Operation? move_source_output_by_index(uint32 idx, uint32 source_idx, SuccessCb? cb = null);
1074 public Operation? move_source_output_by_name(uint32 idx, string source_name, SuccessCb? cb = null);
1076 public Operation? kill_source_output(uint32 idx, SuccessCb? cb = null);
1078 public Operation? stat(StatInfoCb cb);
1080 public Operation? get_sample_info_by_name(string name, SampleInfoCb cb);
1081 public Operation? get_sample_info_by_index(uint32 idx, SampleInfoCb cb);
1082 public Operation? get_sample_info_list(SampleInfoCb cb);
1084 public Operation? remove_sample(string name, SuccessCb? cb = null);
1086 public Operation? play_sample(string name, string? device = null, Volume volume = Volume.INVALID, SuccessCb? cb = null);
1087 public Operation? play_sample_with_proplist(string name, string? device = null, Volume volume = Volume.INVALID, Proplist? p = null, IndexCb? cb = null);
1091 [CCode (cname="pa_stream", cprefix="pa_stream_", unref_function="pa_stream_unref", ref_function="pa_stream_ref", has_type_id=false)]
1092 public class Stream {
1094 [CCode (cname="pa_stream_flags_t", cprefix="PA_STREAM_", has_type_id=false)]
1111 DONT_INHIBIT_AUTO_SUSPEND,
1116 [CCode (cname="pa_stream_state_t", cprefix="PA_STREAM_", has_type_id=false)]
1124 [CCode (cname="PA_STREAM_IS_GOOD")]
1125 public bool IS_GOOD();
1128 [CCode (cname="pa_stream_direction_t", cprefix="PA_STREAM_", has_type_id=false)]
1129 public enum Direction {
1136 [CCode (cname="pa_seek_mode_t", cprefix="PA_SEEK_", has_type_id=false)]
1137 public enum SeekMode {
1144 [CCode (cname="pa_buffer_attr", has_type_id=false)]
1145 public struct BufferAttr {
1153 [CCode (cname="pa_timing_info", has_type_id=false)]
1154 public struct TimingInfo {
1156 int synchronized_clocks;
1159 usec transport_usec;
1161 int write_index_corrupt;
1163 int read_index_corrupt;
1165 usec configured_sink_usec;
1166 usec configured_source_usec;
1167 int64 since_underrun;
1170 [CCode (cname="PA_STREAM_EVENT_REQUEST_CORK")]
1171 public const string EVENT_REQUEST_CORK;
1173 [CCode (cname="PA_STREAM_EVENT_REQUEST_UNCORK")]
1174 public const string EVENT_REQUEST_UNCORK;
1176 public delegate void SuccessCb(Stream s, int success);
1177 public delegate void RequestCb(Stream s, size_t nbytes);
1178 public delegate void NotifyCb(Stream s);
1179 public delegate void EventCb(Stream s, string name, Proplist proplist);
1181 [CCode (cname="pa_stream_new_with_proplist")]
1182 public Stream(Context c, string name, SampleSpec ss, ChannelMap? map = null, Proplist? proplist = null);
1184 public State get_state();
1185 public Context get_context();
1186 public uint32 get_index();
1187 public uint32 get_device_index();
1188 public unowned string? get_device_name();
1189 public int is_suspended();
1190 public int is_corked();
1192 public int connect_playback(string? dev = null, BufferAttr? a = null, Flags flags = 0, CVolume? volume = null, Stream? sync_stream = null);
1193 public int connect_record(string? dev = null, BufferAttr? a = null, Flags flags = 0);
1194 public int connect_upload(size_t length);
1195 public int disconnect();
1196 public int finish_upload();
1198 public int begin_write(out void* data, out size_t nbytes);
1199 public int cancel_write();
1200 public int write(void *data, size_t bytes, FreeCb? free_cb = null, int64 offset = 0, SeekMode mode = SeekMode.RELATIVE);
1201 public int peek(out void *data, out size_t nbytes);
1203 public size_t writable_size();
1204 public size_t readable_size();
1206 public void set_state_callback(NotifyCb? cb = null);
1207 public void set_write_callback(RequestCb? cb = null);
1208 public void set_read_callback(RequestCb? cb = null);
1209 public void set_overflow_callback(NotifyCb? cb = null);
1210 public void set_underflow_callback(NotifyCb? cb = null);
1211 public void set_started_callback(NotifyCb? cb = null);
1212 public void set_latency_update_callback(NotifyCb? cb = null);
1213 public void set_moved_callback(NotifyCb? cb = null);
1214 public void set_suspended_callback(NotifyCb? cb = null);
1215 public void set_event_callback(EventCb? cb = null);
1216 public void set_buffer_attr_callback(NotifyCb? cb = null);
1218 public Operation? drain(SuccessCb? cb = null);
1219 public Operation? update_timing_info(SuccessCb? cb = null);
1221 public Operation? cork(bool b, SuccessCb? cb = null);
1222 public Operation? flush(SuccessCb? cb = null);
1223 public Operation? prebuf(SuccessCb? cb = null);
1224 public Operation? trigger(SuccessCb? cb = null);
1226 public Operation? set_name(string name, SuccessCb? cb = null);
1227 public Operation? set_buffer_attr(BufferAttr attr, SuccessCb? cb = null);
1228 public Operation? update_sample_rate(uint32 rate, SuccessCb? cb = null);
1230 [CCode (array_length = false)]
1231 public Operation? proplist_remove(string[] keys, SuccessCb? cb = null);
1232 public Operation? proplist_update(UpdateMode mode, Proplist pl, SuccessCb? cb = null);
1234 public unowned TimingInfo? get_timing_info();
1235 public int get_time(out usec u);
1236 public int get_latency(out usec u, out bool negative = null);
1238 public unowned SampleSpec? get_sample_spec();
1239 public unowned ChannelMap? get_channel_map();
1240 public unowned BufferAttr? get_buffer_attr();
1242 public int set_monitor_stream(uint32 sink_input);
1243 public uint32 get_monitor_stream();
1246 [CCode (cname="pa_sink_port_info", has_type_id=false)]
1247 public struct SinkPortInfo {
1249 public string description;
1250 public uint32 priority;
1253 [CCode (cname="pa_sink_info", has_type_id=false)]
1254 public struct SinkInfo {
1256 public uint32 index;
1257 public string description;
1258 public SampleSpec sample_spec;
1259 public ChannelMap channel_map;
1260 public uint32 owner_module;
1261 public CVolume volume;
1263 public uint32 monitor_source;
1264 public string monitor_source_name;
1265 public usec latency;
1266 public string driver;
1267 public SinkFlags flags;
1268 public Proplist proplist;
1269 public usec configured_latency;
1270 public Volume base_volume;
1271 public SinkState state;
1272 public uint32 n_volume_steps;
1274 public uint32 n_ports;
1275 public SinkPortInfo*[] ports;
1276 public SinkPortInfo* active_port;
1279 [CCode (cname="pa_source_port_info", has_type_id=false)]
1280 public struct SourcePortInfo {
1282 public string description;
1283 public uint32 priority;
1286 [CCode (cname="pa_source_info", has_type_id=false)]
1287 public struct SourceInfo {
1289 public uint32 index;
1290 public string description;
1291 public SampleSpec sample_spec;
1292 public ChannelMap channel_map;
1293 public uint32 owner_module;
1294 public CVolume volume;
1296 public uint32 monitor_of_sink;
1297 public string monitor_of_sink_name;
1298 public usec latency;
1299 public string driver;
1300 public SourceFlags flags;
1301 public Proplist proplist;
1302 public usec configured_latency;
1303 public Volume base_volume;
1304 public SourceState state;
1305 public uint32 n_volume_steps;
1307 public uint32 n_ports;
1308 public SourcePortInfo*[] ports;
1309 public SourcePortInfo* active_port;
1312 [CCode (cname="pa_server_info", has_type_id=false)]
1313 public struct ServerInfo {
1314 public string user_name;
1315 public string host_name;
1316 public string server_version;
1317 public string server_name;
1318 public SampleSpec sample_spec;
1319 public string default_sink_name;
1320 public string default_source_name;
1321 public ChannelMap channel_map;
1324 [CCode (cname="pa_module_info", has_type_id=false)]
1325 public struct ModuleInfo {
1326 public uint32 index;
1328 public string argument;
1329 public uint32 n_used;
1330 public Proplist proplist;
1333 [CCode (cname="pa_client_info", has_type_id=false)]
1334 public struct ClientInfo {
1335 public uint32 index;
1337 public uint32 owner_module;
1338 public string driver;
1339 public Proplist proplist;
1342 [CCode (cname="pa_card_profile_info", has_type_id=false)]
1343 public struct CardProfileInfo {
1345 public string description;
1346 public uint32 n_sinks;
1347 public uint32 n_sources;
1348 public uint32 priority;
1351 [CCode (cname="pa_card_info", has_type_id=false)]
1352 public struct CardInfo {
1353 public uint32 index;
1355 public uint32 owner_module;
1356 public string driver;
1357 public uint32 n_profiles;
1358 public CardProfileInfo[] profiles;
1359 public CardProfileInfo *active_profile;
1360 public Proplist proplist;
1363 [CCode (cname="pa_sink_input_info", has_type_id=false)]
1364 public struct SinkInputInfo {
1365 public uint32 index;
1367 public uint32 owner_module;
1368 public uint32 client;
1370 public SampleSpec sample_spec;
1371 public ChannelMap channel_map;
1372 public CVolume volume;
1373 public uint32 buffer_usec;
1374 public uint32 sink_usec;
1375 public string resample_method;
1376 public string driver;
1378 public Proplist proplist;
1381 [CCode (cname="pa_source_output_info", has_type_id=false)]
1382 public struct SourceOutputInfo {
1383 public uint32 index;
1385 public uint32 owner_module;
1386 public uint32 client;
1387 public uint32 source;
1388 public SampleSpec sample_spec;
1389 public ChannelMap channel_map;
1390 public uint32 buffer_usec;
1391 public uint32 sink_usec;
1392 public string resample_method;
1393 public string driver;
1394 public Proplist proplist;
1397 [CCode (cname="pa_stat_info", has_type_id=false)]
1398 public struct StatInfo {
1399 public uint32 memblock_total;
1400 public uint32 memblock_total_size;
1401 public uint32 memblock_allocated;
1402 public uint32 memblock_allocated_size;
1403 public uint32 scache_size;
1406 [CCode (cname="pa_sample_info", has_type_id=false)]
1407 public struct SampleInfo {
1408 public uint32 index;
1410 public CVolume volume;
1411 public SampleSpec sample_spec;
1412 public ChannelMap channel_map;
1413 public usec duration;
1414 public uint32 bytes;
1416 public string filename;
1417 public Proplist proplist;
1420 [CCode (cname="pa_sink_flags_t", cprefix="PA_SINK_", has_type_id=false)]
1421 public enum SinkFlags {
1432 [CCode (cname="pa_source_flags_t", cprefix="PA_SOURCE_", has_type_id=false)]
1433 public enum SourceFlags {
1443 [CCode (cname="pa_sink_state_t", cprefix="PA_SINK_", has_type_id=false)]
1444 public enum SinkState {
1450 [CCode (cname="PA_SINK_IS_OPENED")]
1451 public bool IS_OPENED();
1454 [CCode (cname="pa_source_state_t", cprefix="PA_SOURCE_", has_type_id=false)]
1455 public enum SourceState {
1461 [CCode (cname="PA_SOURCE_IS_OPENED")]
1462 public bool IS_OPENED();
1465 [CCode (cname="pa_gettimeofday")]
1466 public unowned timeval gettimeofday(out timeval tv);
1468 [CCode (cname="pa_timeval_diff")]
1469 public usec timeval_diff(ref timeval a, ref timeval b);
1471 [CCode (cname="pa_timeval_cmp")]
1472 public int timeval_cmp(ref timeval a, ref timeval b);
1474 [CCode (cname="pa_timeval_age")]
1475 public usec timeval_age(ref timeval a);
1477 [CCode (cname="pa_timeval_add")]
1478 public unowned timeval timeval_add(ref timeval tv, usec x);
1480 [CCode (cname="pa_timeval_sub")]
1481 public unowned timeval timeval_sub(ref timeval tv, usec x);
1483 [CCode (cname="pa_timeval_store")]
1484 public unowned timeval timeval_store(out timeval tv, usec c);
1486 [CCode (cname="pa_timeval_load")]
1487 public usec timeval_load(timeval tv);
1489 [CCode (cname="PA_USEC_MAX")]
1490 public const usec USEC_MAX;
1492 [CCode (cname="PA_USEC_INVALID")]
1493 public const usec USEC_INVALID;
1495 [CCode (cname="PA_MSEC_PER_SEC")]
1496 public const usec MSEC_PER_SEC;
1498 [CCode (cname="PA_USEC_PER_SEC")]
1499 public const usec USEC_PER_SEC;
1501 [CCode (cname="PA_NSEC_PER_SEC")]
1502 public const uint64 NSEC_PER_SEC;
1505 [CCode (cname="PA_USEC_PER_MSEC")]
1506 public const usec USEC_PER_MSEC;
1508 [CCode (cname="PA_NSEC_PER_MSEC")]
1509 public const uint64 NSEC_PER_MSEC;
1512 [CCode (cname="PA_NSEC_PER_USEC")]
1513 public const uint64 NSEC_PER_USEC;