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_get_balance")]
344 public float get_balance(ChannelMap map);
346 [CCode (cname="pa_cvolume_set_balance")]
347 public unowned CVolume? set_balance(ChannelMap map, float b);
349 [CCode (cname="pa_cvolume_get_fade")]
350 public float get_fade(ChannelMap map);
352 [CCode (cname="pa_cvolume_set_fade")]
353 public unowned CVolume? set_fade(ChannelMap map, float f);
355 [CCode (cname="pa_cvolume_scale")]
356 public unowned CVolume? scale(Volume max);
358 [CCode (cname="pa_cvolume_scale_mask")]
359 public unowned CVolume? scale_mask(Volume max, ChannelMap map, ChannelPositionMask mask);
361 [CCode (cname="pa_cvolume_set_position")]
362 public unowned CVolume? set_position(ChannelMap map, ChannelPosition p, Volume v);
364 [CCode (cname="pa_cvolume_get_position")]
365 public Volume get_position(ChannelMap map, ChannelPosition p);
367 [CCode (cname="pa_cvolume_merge")]
368 public unowned CVolume? merge(CVolume other);
370 [CCode (cname="pa_cvolume_inc")]
371 public unowned CVolume? inc(Volume plus = 1);
373 [CCode (cname="pa_cvolume_dec")]
374 public unowned CVolume? dec(Volume minus = 1);
377 [CCode (cname="pa_channel_map", has_type_id=false)]
378 public struct ChannelMap {
379 public uint8 channels;
380 // TODO: Replace array length with CHANNELS_MAX once vala's bug #647788 is fixed
381 public ChannelPosition map[32];
383 [CCode (cname="PA_CHANNEL_MAP_SNPRINT_MAX")]
384 public static const size_t SNPRINT_MAX;
386 [CCode (cname="pa_channel_map_init")]
389 [CCode (cname="pa_channel_map_init")]
390 public unowned ChannelMap? init();
392 [CCode (cname="pa_channel_map_init_mono")]
393 public unowned ChannelMap? init_mono();
395 [CCode (cname="pa_channel_map_init_stereo")]
396 public unowned ChannelMap? init_stereo();
398 [CCode (cname="pa_channel_map_init_auto")]
399 public unowned ChannelMap? init_auto(uint8 channels, ChannelMapDef def = ChannelMapDef.DEFAULT);
401 [CCode (cname="pa_channel_map_init_extend")]
402 public unowned ChannelMap? init_extend(uint8 channels, ChannelMapDef def = ChannelMapDef.DEFAULT);
404 [CCode (cname="pa_channel_map_snprint", instance_pos = 3.1)]
405 public unowned string snprint(char[] s);
407 public string sprint() {
408 var buffer = new char[SNPRINT_MAX];
409 this.snprint(buffer);
410 return (string) buffer;
413 public string to_string() {
417 [CCode (cname="pa_channel_map_parse")]
418 public unowned ChannelMap? parse(string s);
420 [CCode (cname="pa_channel_map_equal")]
421 public bool equal(ChannelMap other);
423 [CCode (cname="pa_channel_map_superset")]
424 public bool superset(ChannelMap other);
426 [CCode (cname="pa_channel_map_valid")]
429 [CCode (cname="pa_channel_map_compatible")]
430 public bool compatible(SampleSpec ss);
432 [CCode (cname="pa_channel_map_can_balance")]
433 public bool can_balance();
435 [CCode (cname="pa_channel_map_can_fade")]
436 public bool can_fade();
438 [CCode (cname="pa_channel_map_to_name")]
439 public unowned string? to_name();
441 [CCode (cname="pa_channel_map_to_pretty_name")]
442 public unowned string? to_pretty_name();
444 [CCode (cname="pa_channel_map_has_position")]
445 public bool has_position(ChannelPosition p);
447 [CCode (cname="pa_channel_map_mask")]
448 public ChannelPositionMask mask();
451 [CCode (cname="pa_channel_position_mask_t", has_type_id=false)]
452 public struct ChannelPositionMask : uint64 {
455 [CCode (cname="pa_channel_position_t", cprefix="PA_CHANNEL_POSITION_", has_type_id=false)]
456 public enum ChannelPosition {
466 FRONT_LEFT_OF_CENTER,
467 FRONT_RIGHT_OF_CENTER,
505 [CCode (cname="PA_CHANNEL_POSITION_MASK")]
506 public ChannelPositionMask mask();
508 [CCode (cname="pa_channel_position_to_string")]
509 public unowned string? to_string();
511 [CCode (cname="pa_channel_position_to_pretty_string")]
512 public unowned string? to_pretty_string();
514 [CCode (cname="pa_channel_position_from_string")]
515 public static ChannelPosition from_string(string s);
518 [CCode (cname="pa_channel_map_def_t", cprefix="PA_CHANNEL_MAP_", has_type_id=false)]
519 public enum ChannelMapDef {
525 [CCode (cname="PA_CHANNEL_MAP_DEF_MAX")]
530 [CCode (cname="pa_proplist", cprefix="pa_proplist_", free_function="pa_proplist_free", has_type_id=false)]
531 public class Proplist {
533 [CCode (cname="PA_PROP_MEDIA_NAME")]
534 public static const string PROP_MEDIA_NAME;
535 [CCode (cname="PA_PROP_MEDIA_TITLE")]
536 public static const string PROP_MEDIA_TITLE;
537 [CCode (cname="PA_PROP_MEDIA_ARTIST")]
538 public static const string PROP_MEDIA_ARTIST;
539 [CCode (cname="PA_PROP_MEDIA_COPYRIGHT")]
540 public static const string PROP_MEDIA_COPYRIGHT;
541 [CCode (cname="PA_PROP_MEDIA_SOFTWARE")]
542 public static const string PROP_MEDIA_SOFTWARE;
543 [CCode (cname="PA_PROP_MEDIA_LANGUAGE")]
544 public static const string PROP_MEDIA_LANGUAGE;
545 [CCode (cname="PA_PROP_MEDIA_FILENAME")]
546 public static const string PROP_MEDIA_FILENAME;
547 [CCode (cname="PA_PROP_MEDIA_ICON_NAME")]
548 public static const string PROP_MEDIA_ICON_NAME;
549 [CCode (cname="PA_PROP_MEDIA_ROLE")]
550 public static const string PROP_MEDIA_ROLE;
551 [CCode (cname="PA_PROP_EVENT_ID")]
552 public static const string PROP_EVENT_ID;
553 [CCode (cname="PA_PROP_EVENT_DESCRIPTION")]
554 public static const string PROP_EVENT_DESCRIPTION;
555 [CCode (cname="PA_PROP_EVENT_MOUSE_X")]
556 public static const string PROP_EVENT_MOUSE_X;
557 [CCode (cname="PA_PROP_EVENT_MOUSE_Y")]
558 public static const string PROP_EVENT_MOUSE_Y;
559 [CCode (cname="PA_PROP_EVENT_MOUSE_HPOS")]
560 public static const string PROP_EVENT_MOUSE_HPOS;
561 [CCode (cname="PA_PROP_EVENT_MOUSE_VPOS")]
562 public static const string PROP_EVENT_MOUSE_VPOS;
563 [CCode (cname="PA_PROP_EVENT_MOUSE_BUTTON")]
564 public static const string PROP_EVENT_MOUSE_BUTTON;
565 [CCode (cname="PA_PROP_WINDOW_NAME")]
566 public static const string PROP_WINDOW_NAME;
567 [CCode (cname="PA_PROP_WINDOW_ID")]
568 public static const string PROP_WINDOW_ID;
569 [CCode (cname="PA_PROP_WINDOW_ICON_NAME")]
570 public static const string PROP_WINDOW_ICON_NAME;
571 [CCode (cname="PA_PROP_WINDOW_X11_DISPLAY")]
572 public static const string PROP_WINDOW_X11_DISPLAY;
573 [CCode (cname="PA_PROP_WINDOW_X11_SCREEN")]
574 public static const string PROP_WINDOW_X11_SCREEN;
575 [CCode (cname="PA_PROP_WINDOW_X11_MONITOR")]
576 public static const string PROP_WINDOW_X11_MONITOR;
577 [CCode (cname="PA_PROP_WINDOW_X11_XID")]
578 public static const string PROP_WINDOW_X11_XID;
579 [CCode (cname="PA_PROP_APPLICATION_NAME")]
580 public static const string PROP_APPLICATION_NAME;
581 [CCode (cname="PA_PROP_APPLICATION_ID")]
582 public static const string PROP_APPLICATION_ID;
583 [CCode (cname="PA_PROP_APPLICATION_VERSION")]
584 public static const string PROP_APPLICATION_VERSION;
585 [CCode (cname="PA_PROP_APPLICATION_ICON_NAME")]
586 public static const string PROP_APPLICATION_ICON_NAME;
587 [CCode (cname="PA_PROP_APPLICATION_LANGUAGE")]
588 public static const string PROP_APPLICATION_LANGUAGE;
589 [CCode (cname="PA_PROP_APPLICATION_PROCESS_ID")]
590 public static const string PROP_APPLICATION_PROCESS_ID;
591 [CCode (cname="PA_PROP_APPLICATION_PROCESS_BINARY")]
592 public static const string PROP_APPLICATION_PROCESS_BINARY;
593 [CCode (cname="PA_PROP_APPLICATION_PROCESS_USER")]
594 public static const string PROP_APPLICATION_PROCESS_USER;
595 [CCode (cname="PA_PROP_APPLICATION_PROCESS_HOST")]
596 public static const string PROP_APPLICATION_PROCESS_HOST;
597 [CCode (cname="PA_PROP_APPLICATION_PROCESS_MACHINE_ID")]
598 public static const string PROP_APPLICATION_PROCESS_MACHINE_ID;
599 [CCode (cname="PA_PROP_APPLICATION_PROCESS_SESSION_ID")]
600 public static const string PROP_APPLICATION_PROCESS_SESSION_ID;
601 [CCode (cname="PA_PROP_DEVICE_STRING")]
602 public static const string PROP_DEVICE_STRING;
603 [CCode (cname="PA_PROP_DEVICE_API")]
604 public static const string PROP_DEVICE_API;
605 [CCode (cname="PA_PROP_DEVICE_DESCRIPTION")]
606 public static const string PROP_DEVICE_DESCRIPTION;
607 [CCode (cname="PA_PROP_DEVICE_BUS_PATH")]
608 public static const string PROP_DEVICE_BUS_PATH;
609 [CCode (cname="PA_PROP_DEVICE_SERIAL")]
610 public static const string PROP_DEVICE_SERIAL;
611 [CCode (cname="PA_PROP_DEVICE_VENDOR_ID")]
612 public static const string PROP_DEVICE_VENDOR_ID;
613 [CCode (cname="PA_PROP_DEVICE_VENDOR_NAME")]
614 public static const string PROP_DEVICE_VENDOR_NAME;
615 [CCode (cname="PA_PROP_DEVICE_PRODUCT_ID")]
616 public static const string PROP_DEVICE_PRODUCT_ID;
617 [CCode (cname="PA_PROP_DEVICE_PRODUCT_NAME")]
618 public static const string PROP_DEVICE_PRODUCT_NAME;
619 [CCode (cname="PA_PROP_DEVICE_CLASS")]
620 public static const string PROP_DEVICE_CLASS;
621 [CCode (cname="PA_PROP_DEVICE_FORM_FACTOR")]
622 public static const string PROP_DEVICE_FORM_FACTOR;
623 [CCode (cname="PA_PROP_DEVICE_BUS")]
624 public static const string PROP_DEVICE_BUS;
625 [CCode (cname="PA_PROP_DEVICE_ICON_NAME")]
626 public static const string PROP_DEVICE_ICON_NAME;
627 [CCode (cname="PA_PROP_DEVICE_ACCESS_MODE")]
628 public static const string PROP_DEVICE_ACCESS_MODE;
629 [CCode (cname="PA_PROP_DEVICE_MASTER_DEVICE")]
630 public static const string PROP_DEVICE_MASTER_DEVICE;
631 [CCode (cname="PA_PROP_DEVICE_BUFFERING_BUFFER_SIZE")]
632 public static const string PROP_DEVICE_BUFFERING_BUFFER_SIZE;
633 [CCode (cname="PA_PROP_DEVICE_BUFFERING_FRAGMENT_SIZE")]
634 public static const string PROP_DEVICE_BUFFERING_FRAGMENT_SIZE;
635 [CCode (cname="PA_PROP_DEVICE_PROFILE_NAME")]
636 public static const string PROP_DEVICE_PROFILE_NAME;
637 [CCode (cname="PA_PROP_DEVICE_INTENDED_ROLES")]
638 public static const string PROP_DEVICE_INTENDED_ROLES;
639 [CCode (cname="PA_PROP_DEVICE_PROFILE_DESCRIPTION")]
640 public static const string PROP_DEVICE_PROFILE_DESCRIPTION;
641 [CCode (cname="PA_PROP_MODULE_AUTHOR")]
642 public static const string PROP_MODULE_AUTHOR;
643 [CCode (cname="PA_PROP_MODULE_DESCRIPTION")]
644 public static const string PROP_MODULE_DESCRIPTION;
645 [CCode (cname="PA_PROP_MODULE_USAGE")]
646 public static const string PROP_MODULE_USAGE;
647 [CCode (cname="PA_PROP_MODULE_VERSION")]
648 public static const string PROP_MODULE_VERSION;
650 [CCode (cname="pa_proplist_new")]
653 public int sets(string key, string value);
654 public int setp(string pair);
657 public int setf(string key, string format, ...);
659 public int set(string key, void* data, size_t size);
661 public unowned string? gets(string key);
663 public int get(string key, out void* data, out size_t size);
665 public void update(UpdateMode mode, Proplist other);
667 public void unset(string key);
669 [CCode (array_length = false)]
670 public void unset_many(string[] key);
672 public unowned string? iterate(ref void* state);
674 public string to_string();
676 public string to_string_sep(string sep);
678 public static Proplist? from_string(string s);
680 public int contains(string key);
684 public Proplist copy();
688 public bool is_empty();
691 [CCode (cname="pa_update_mode_t", cprefix="PA_UPDATE_", has_type_id=false)]
692 public enum UpdateMode {
698 [CCode (cname="PA_OK")]
701 [CCode (cname="int", cprefix="PA_ERR_", has_type_id=false)]
713 CONNECTIONTERMINATED,
731 [CCode (cname="pa_strerror")]
732 public unowned string? strerror(Error e);
734 public delegate void VoidFunc();
736 [CCode (cname="pa_spawn_api", has_type_id=false)]
737 public struct SpawnApi {
743 [CCode (cname="pa_io_event_flags_t", cprefix="PA_IO_EVENT_", has_type_id=false)]
744 public enum IoEventFlags {
753 [CCode (cname="pa_io_event", unref_function="", ref_function="", has_type_id=false)]
754 public struct IoEvent {
758 [CCode (cname="pa_time_event", unref_function="", ref_function="", has_type_id=false)]
759 public struct TimeEvent {
763 [CCode (cname="pa_defer_event", unref_function="", ref_function="", has_type_id=false)]
764 public struct DeferEvent {
768 [CCode (cname="pa_signal_event", cprefix="pa_signal_", free_function="pa_signal_free", has_type_id=false)]
769 public struct SignalEvent {
771 [CCode (cname="pa_signal_new")]
772 public SignalEvent(int sig, MainLoopApi.SignalEventCb cb);
774 public void set_destroy(MainLoopApi.SignalEventDestroyCb cb);
778 [CCode (cname="pa_mainloop_api", unref_function="", ref_function="", has_type_id=false)]
779 public class MainLoopApi {
780 public void* userdata;
782 /* Callbacks for the consumer to implement*/
783 public delegate void IoEventCb(MainLoopApi a, IoEvent e, int fd, IoEventFlags flags);
784 public delegate void IoEventDestroyCb(MainLoopApi a, IoEvent e);
786 public delegate void TimeEventCb(MainLoopApi a, TimeEvent e, ref timeval t);
787 public delegate void TimeEventDestroyCb(MainLoopApi a, TimeEvent e);
789 public delegate void DeferEventCb(MainLoopApi a, DeferEvent e);
790 public delegate void DeferEventDestroyCb(MainLoopApi a, DeferEvent e);
792 public delegate void SignalEventCb(MainLoopApi a, SignalEvent e);
793 public delegate void SignalEventDestroyCb(MainLoopApi a, SignalEvent e);
795 /* Callbacks for the provider to implement */
796 public delegate IoEvent IoNewCb(MainLoopApi a, int fd, IoEventFlags flags, IoEventCb cb);
797 public delegate void IoEnableCb(MainLoopApi a, IoEvent e, IoEventFlags flags);
798 public delegate void IoFreeCb(MainLoopApi a, IoEvent e);
799 public delegate void IoSetDestroyCb(MainLoopApi a, IoEvent e, IoEventDestroyCb? cb);
801 public delegate TimeEvent TimeNewCb(MainLoopApi a, timeval? t, TimeEventCb cb);
802 public delegate void TimeRestartCb(MainLoopApi a, TimeEvent e, timeval? t);
803 public delegate void TimeFreeCb(MainLoopApi a, TimeEvent e);
804 public delegate void TimeSetDestroyCb(MainLoopApi a, TimeEvent e, TimeEventDestroyCb? cb);
806 public delegate DeferEvent DeferNewCb(MainLoopApi a, DeferEventCb cb);
807 public delegate void DeferEnableCb(MainLoopApi a, DeferEvent e, bool b);
808 public delegate void DeferFreeCb(MainLoopApi a, DeferEvent e);
809 public delegate void DeferSetDestroyCb(MainLoopApi a, DeferEvent e, DeferEventDestroyCb? cb);
811 public delegate void QuitCb(MainLoopApi a, int retval);
813 public delegate void OnceCb(MainLoopApi a);
815 public IoNewCb io_new;
816 public IoEnableCb io_enable;
817 public IoFreeCb io_free;
818 public IoSetDestroyCb io_set_destroy;
820 public TimeNewCb time_new;
821 public TimeRestartCb time_restart;
822 public TimeFreeCb time_free;
823 public TimeSetDestroyCb time_set_destroy;
825 public DeferNewCb defer_new;
826 public DeferEnableCb defer_enable;
827 public DeferFreeCb defer_free;
828 public DeferSetDestroyCb defer_set_destroy;
832 [CCode (cname="pa_mainloop_api_once")]
833 public void once(OnceCb cb);
836 [CCode (cname="pa_signal_init")]
837 public void signal_init(MainLoopApi api);
839 [CCode (cname="pa_signal_done")]
840 public void signal_done();
842 [CCode (cname="pa_poll_func")]
843 public delegate int PollFunc(pollfd[] ufds, int timeout);
846 [CCode (cname="pa_mainloop", cprefix="pa_mainloop_", free_function="pa_mainloop_free", has_type_id=false)]
847 public class MainLoop {
849 [CCode (cname="pa_mainloop_new")]
852 public int prepare(int timeout = -1);
854 public int dispatch();
855 public int get_retval();
856 public int iterate(bool block = true, out int retval = null);
857 public int run(out int retval = null);
858 public unowned MainLoopApi get_api();
859 public void quit(int retval);
860 public void wakeup();
861 public void set_poll_func(PollFunc poll_func);
865 [CCode (cname="pa_threaded_mainloop", cprefix="pa_threaded_mainloop_", free_function="pa_threaded_mainloop_free")]
866 public class ThreadedMainLoop {
868 [CCode (cname="pa_threaded_mainloop_new")]
869 public ThreadedMainLoop();
874 public void unlock();
876 public void signal(bool WaitForAccept = false);
877 public void accept();
878 public int get_retval();
879 public unowned MainLoopApi get_api();
880 public bool in_thread();
884 [CCode (cname="pa_operation", cprefix="pa_operation_", unref_function="pa_operation_unref", ref_function="pa_operation_ref", has_type_id=false)]
885 public class Operation {
887 [CCode (cname="pa_operation_state_t", cprefix="PA_OPERATION_", has_type_id=false)]
894 public void cancel();
895 public State get_state();
899 [CCode (cname="pa_context", cprefix="pa_context_", unref_function="pa_context_unref", ref_function="pa_context_ref", has_type_id=false)]
900 public class Context {
902 [CCode (cname="pa_context_flags_t", cprefix="PA_CONTEXT_", has_type_id=false)]
908 [CCode (cname="pa_context_state_t", cprefix="PA_CONTEXT_", has_type_id=false)]
918 [CCode (cname="PA_CONTEXT_IS_GOOD", has_type_id=false)]
919 public bool IS_GOOD();
922 [CCode (cname="pa_subscription_mask_t", cprefix="PA_SUBSCRIPTION_MASK_", has_type_id=false)]
923 public enum SubscriptionMask {
936 [CCode (cname="pa_subscription_match_flags")]
937 public bool match_flags(SubscriptionEventType t);
940 [CCode (cname="pa_subscription_event_type_t", cprefix="PA_SUBSCRIPTION_EVENT_", has_type_id=false)]
941 public enum SubscriptionEventType {
958 public delegate void NotifyCb(Context c);
959 public delegate void SuccessCb(Context c, int success);
960 public delegate void EventCb(Context c, string name, Proplist? proplist);
961 public delegate void SubscribeCb(Context c, SubscriptionEventType t, uint32 idx);
962 public delegate void SinkInfoCb(Context c, SinkInfo? i, int eol);
963 public delegate void SourceInfoCb(Context c, SourceInfo? i, int eol);
964 public delegate void CardInfoCb(Context c, CardInfo? i, int eol);
965 public delegate void SinkInputInfoCb(Context c, SinkInputInfo? i, int eol);
966 public delegate void SourceOutputInfoCb(Context c, SourceOutputInfo? i, int eol);
967 public delegate void ServerInfoCb(Context c, ServerInfo? i);
968 public delegate void StatInfoCb(Context c, ServerInfo? i);
969 public delegate void ModuleInfoCb(Context c, ModuleInfo? i, int eol);
970 public delegate void ClientInfoCb(Context c, ClientInfo? i, int eol);
971 public delegate void SampleInfoCb(Context c, SampleInfo? i, int eol);
972 public delegate void IndexCb(Context c, uint32 idx);
974 [CCode (cname="pa_context_new_with_proplist")]
975 public Context(MainLoopApi api, string? name, Proplist? proplist = null);
977 public void set_state_callback(NotifyCb? cb = null);
978 public void set_event_callback(EventCb? cb = null);
979 public void set_subscribe_callback(SubscribeCb? cb = null);
981 public Error errno();
983 public int is_pending();
984 public State get_state();
985 public int is_local();
986 public unowned string? get_server();
987 public uint32 get_protocol_version();
988 public uint32 get_server_protocol_version();
989 public uint32 get_index();
991 public int connect(string? server = null, Flags flags = 0, SpawnApi? api = null);
992 public void disconnect();
994 public Operation? drain(NotifyCb? cb = null);
995 public Operation? exit_daemon(SuccessCb? cb = null);
996 public Operation? set_default_sink(string name, SuccessCb? cb = null);
997 public Operation? set_default_source(string name, SuccessCb? cb = null);
998 public Operation? set_name(string name, SuccessCb? cb = null);
1000 [CCode (array_length = false)]
1001 public Operation? proplist_remove(string[] keys, SuccessCb? cb = null);
1002 public Operation? proplist_update(UpdateMode mode, Proplist pl, SuccessCb? cb = null);
1004 public Operation? subscribe(SubscriptionMask mask, SuccessCb? cb = null);
1006 public Operation? get_sink_info_by_name(string name, SinkInfoCb cb);
1007 public Operation? get_sink_info_by_index(uint32 idx, SinkInfoCb cb);
1008 public Operation? get_sink_info_list(SinkInfoCb cb);
1010 public Operation? set_sink_volume_by_name(string name, CVolume volume, SuccessCb? cb = null);
1011 public Operation? set_sink_volume_by_index(uint32 idx, CVolume volume, SuccessCb? cb = null);
1012 public Operation? set_sink_mute_by_name(string name, bool mute, SuccessCb? cb = null);
1013 public Operation? set_sink_mute_by_index(uint32 idx, bool mute, SuccessCb? cb = null);
1015 public Operation? suspend_sink_by_name(string name, bool suspend, SuccessCb? cb = null);
1016 public Operation? suspend_sink_by_index(uint32 idx, bool suspend, SuccessCb? cb = null);
1018 public Operation? set_sink_port_by_name(string name, string port, SuccessCb? cb = null);
1019 public Operation? set_sink_port_by_index(uint32 idx, string port, SuccessCb? cb = null);
1021 public Operation? get_source_info_by_name(string name, SourceInfoCb cb);
1022 public Operation? get_source_info_by_index(uint32 idx, SourceInfoCb cb);
1023 public Operation? get_source_info_list(SourceInfoCb cb);
1025 public Operation? set_source_volume_by_name(string name, CVolume volume, SuccessCb? cb = null);
1026 public Operation? set_source_volume_by_index(uint32 idx, CVolume volume, SuccessCb? cb = null);
1027 public Operation? set_source_mute_by_name(string name, bool mute, SuccessCb? cb = null);
1028 public Operation? set_source_mute_by_index(uint32 idx, bool mute, SuccessCb? cb = null);
1030 public Operation? suspend_source_by_name(string name, bool suspend, SuccessCb? cb = null);
1031 public Operation? suspend_source_by_index(uint32 idx, bool suspend, SuccessCb? cb = null);
1033 public Operation? set_source_port_by_name(string name, string port, SuccessCb? cb = null);
1034 public Operation? set_source_port_by_index(uint32 idx, string port, SuccessCb? cb = null);
1036 public Operation? get_server_info(ServerInfoCb cb);
1038 public Operation? get_module_info(uint32 idx, ModuleInfoCb cb);
1039 public Operation? get_module_info_list(ModuleInfoCb cb);
1041 public Operation? load_module(string name, string? argument, IndexCb? cb = null);
1042 public Operation? unload_module(uint32 idx, SuccessCb? cb = null);
1044 public Operation? get_client_info(uint32 idx, ClientInfoCb cb);
1045 public Operation? get_client_info_list(ClientInfoCb cb);
1047 public Operation? kill_client(uint32 idx, SuccessCb? cb = null);
1049 public Operation? get_card_info_by_name(string name, CardInfoCb cb);
1050 public Operation? get_card_info_by_index(uint32 idx, CardInfoCb cb);
1051 public Operation? get_card_info_list(CardInfoCb cb);
1053 public Operation? set_card_profile_by_index(uint32 idx, string profile, SuccessCb? cb = null);
1054 public Operation? set_card_profile_by_name(string name, string profile, SuccessCb? cb = null);
1056 public Operation? get_sink_input_info(uint32 idx, SinkInputInfoCb cb);
1057 public Operation? get_sink_input_info_list(SinkInputInfoCb cb);
1059 public Operation? move_sink_input_by_index(uint32 idx, uint32 sink_idx, SuccessCb? cb = null);
1060 public Operation? move_sink_input_by_name(uint32 idx, string sink_name, SuccessCb? cb = null);
1062 public Operation? set_sink_input_volume(uint32 idx, CVolume volume, SuccessCb? cb = null);
1063 public Operation? set_sink_input_mute(uint32 idx, bool mute, SuccessCb? cb = null);
1065 public Operation? kill_sink_input(uint32 idx, SuccessCb? cb = null);
1067 public Operation? get_source_output_info(uint32 idx, SourceOutputInfoCb cb);
1068 public Operation? get_source_output_info_list(SourceOutputInfoCb cb);
1070 public Operation? move_source_output_by_index(uint32 idx, uint32 source_idx, SuccessCb? cb = null);
1071 public Operation? move_source_output_by_name(uint32 idx, string source_name, SuccessCb? cb = null);
1073 public Operation? kill_source_output(uint32 idx, SuccessCb? cb = null);
1075 public Operation? stat(StatInfoCb cb);
1077 public Operation? get_sample_info_by_name(string name, SampleInfoCb cb);
1078 public Operation? get_sample_info_by_index(uint32 idx, SampleInfoCb cb);
1079 public Operation? get_sample_info_list(SampleInfoCb cb);
1081 public Operation? remove_sample(string name, SuccessCb? cb = null);
1083 public Operation? play_sample(string name, string? device = null, Volume volume = Volume.INVALID, SuccessCb? cb = null);
1084 public Operation? play_sample_with_proplist(string name, string? device = null, Volume volume = Volume.INVALID, Proplist? p = null, IndexCb? cb = null);
1088 [CCode (cname="pa_stream", cprefix="pa_stream_", unref_function="pa_stream_unref", ref_function="pa_stream_ref", has_type_id=false)]
1089 public class Stream {
1091 [CCode (cname="pa_stream_flags_t", cprefix="PA_STREAM_", has_type_id=false)]
1108 DONT_INHIBIT_AUTO_SUSPEND,
1113 [CCode (cname="pa_stream_state_t", cprefix="PA_STREAM_", has_type_id=false)]
1121 [CCode (cname="PA_STREAM_IS_GOOD")]
1122 public bool IS_GOOD();
1125 [CCode (cname="pa_stream_direction_t", cprefix="PA_STREAM_", has_type_id=false)]
1126 public enum Direction {
1133 [CCode (cname="pa_seek_mode_t", cprefix="PA_SEEK_", has_type_id=false)]
1134 public enum SeekMode {
1141 [CCode (cname="pa_buffer_attr", has_type_id=false)]
1142 public struct BufferAttr {
1150 [CCode (cname="pa_timing_info", has_type_id=false)]
1151 public struct TimingInfo {
1153 int synchronized_clocks;
1156 usec transport_usec;
1158 int write_index_corrupt;
1160 int read_index_corrupt;
1162 usec configured_sink_usec;
1163 usec configured_source_usec;
1164 int64 since_underrun;
1167 [CCode (cname="PA_STREAM_EVENT_REQUEST_CORK")]
1168 public const string EVENT_REQUEST_CORK;
1170 [CCode (cname="PA_STREAM_EVENT_REQUEST_UNCORK")]
1171 public const string EVENT_REQUEST_UNCORK;
1173 public delegate void SuccessCb(Stream s, int success);
1174 public delegate void RequestCb(Stream s, size_t nbytes);
1175 public delegate void NotifyCb(Stream s);
1176 public delegate void EventCb(Stream s, string name, Proplist proplist);
1178 [CCode (cname="pa_stream_new_with_proplist")]
1179 public Stream(Context c, string name, SampleSpec ss, ChannelMap? map = null, Proplist? proplist = null);
1181 public State get_state();
1182 public Context get_context();
1183 public uint32 get_index();
1184 public uint32 get_device_index();
1185 public unowned string? get_device_name();
1186 public int is_suspended();
1187 public int is_corked();
1189 public int connect_playback(string? dev = null, BufferAttr? a = null, Flags flags = 0, CVolume? volume = null, Stream? sync_stream = null);
1190 public int connect_record(string? dev = null, BufferAttr? a = null, Flags flags = 0);
1191 public int connect_upload(size_t length);
1192 public int disconnect();
1193 public int finish_upload();
1195 public int begin_write(out void* data, out size_t nbytes);
1196 public int cancel_write();
1197 public int write(void *data, size_t bytes, FreeCb? free_cb = null, int64 offset = 0, SeekMode mode = SeekMode.RELATIVE);
1198 public int peek(out void *data, out size_t nbytes);
1200 public size_t writable_size();
1201 public size_t readable_size();
1203 public void set_state_callback(NotifyCb? cb = null);
1204 public void set_write_callback(RequestCb? cb = null);
1205 public void set_read_callback(RequestCb? cb = null);
1206 public void set_overflow_callback(NotifyCb? cb = null);
1207 public void set_underflow_callback(NotifyCb? cb = null);
1208 public void set_started_callback(NotifyCb? cb = null);
1209 public void set_latency_update_callback(NotifyCb? cb = null);
1210 public void set_moved_callback(NotifyCb? cb = null);
1211 public void set_suspended_callback(NotifyCb? cb = null);
1212 public void set_event_callback(EventCb? cb = null);
1213 public void set_buffer_attr_callback(NotifyCb? cb = null);
1215 public Operation? drain(SuccessCb? cb = null);
1216 public Operation? update_timing_info(SuccessCb? cb = null);
1218 public Operation? cork(bool b, SuccessCb? cb = null);
1219 public Operation? flush(SuccessCb? cb = null);
1220 public Operation? prebuf(SuccessCb? cb = null);
1221 public Operation? trigger(SuccessCb? cb = null);
1223 public Operation? set_name(string name, SuccessCb? cb = null);
1224 public Operation? set_buffer_attr(BufferAttr attr, SuccessCb? cb = null);
1225 public Operation? update_sample_rate(uint32 rate, SuccessCb? cb = null);
1227 [CCode (array_length = false)]
1228 public Operation? proplist_remove(string[] keys, SuccessCb? cb = null);
1229 public Operation? proplist_update(UpdateMode mode, Proplist pl, SuccessCb? cb = null);
1231 public unowned TimingInfo? get_timing_info();
1232 public int get_time(out usec u);
1233 public int get_latency(out usec u, out bool negative = null);
1235 public unowned SampleSpec? get_sample_spec();
1236 public unowned ChannelMap? get_channel_map();
1237 public unowned BufferAttr? get_buffer_attr();
1239 public int set_monitor_stream(uint32 sink_input);
1240 public uint32 get_monitor_stream();
1243 [CCode (cname="pa_sink_port_info", has_type_id=false)]
1244 public struct SinkPortInfo {
1246 public string description;
1247 public uint32 priority;
1250 [CCode (cname="pa_sink_info", has_type_id=false)]
1251 public struct SinkInfo {
1253 public uint32 index;
1254 public string description;
1255 public SampleSpec sample_spec;
1256 public ChannelMap channel_map;
1257 public uint32 owner_module;
1258 public CVolume volume;
1260 public uint32 monitor_source;
1261 public string monitor_source_name;
1262 public usec latency;
1263 public string driver;
1264 public SinkFlags flags;
1265 public Proplist proplist;
1266 public usec configured_latency;
1267 public Volume base_volume;
1268 public SinkState state;
1269 public uint32 n_volume_steps;
1271 public uint32 n_ports;
1272 public SinkPortInfo*[] ports;
1273 public SinkPortInfo* active_port;
1276 [CCode (cname="pa_source_port_info", has_type_id=false)]
1277 public struct SourcePortInfo {
1279 public string description;
1280 public uint32 priority;
1283 [CCode (cname="pa_source_info", has_type_id=false)]
1284 public struct SourceInfo {
1286 public uint32 index;
1287 public string description;
1288 public SampleSpec sample_spec;
1289 public ChannelMap channel_map;
1290 public uint32 owner_module;
1291 public CVolume volume;
1293 public uint32 monitor_of_sink;
1294 public string monitor_of_sink_name;
1295 public usec latency;
1296 public string driver;
1297 public SourceFlags flags;
1298 public Proplist proplist;
1299 public usec configured_latency;
1300 public Volume base_volume;
1301 public SourceState state;
1302 public uint32 n_volume_steps;
1304 public uint32 n_ports;
1305 public SourcePortInfo*[] ports;
1306 public SourcePortInfo* active_port;
1309 [CCode (cname="pa_server_info", has_type_id=false)]
1310 public struct ServerInfo {
1311 public string user_name;
1312 public string host_name;
1313 public string server_version;
1314 public string server_name;
1315 public SampleSpec sample_spec;
1316 public string default_sink_name;
1317 public string default_source_name;
1318 public ChannelMap channel_map;
1321 [CCode (cname="pa_module_info", has_type_id=false)]
1322 public struct ModuleInfo {
1323 public uint32 index;
1325 public string argument;
1326 public uint32 n_used;
1327 public Proplist proplist;
1330 [CCode (cname="pa_client_info", has_type_id=false)]
1331 public struct ClientInfo {
1332 public uint32 index;
1334 public uint32 owner_module;
1335 public string driver;
1336 public Proplist proplist;
1339 [CCode (cname="pa_card_profile_info", has_type_id=false)]
1340 public struct CardProfileInfo {
1342 public string description;
1343 public uint32 n_sinks;
1344 public uint32 n_sources;
1345 public uint32 priority;
1348 [CCode (cname="pa_card_info", has_type_id=false)]
1349 public struct CardInfo {
1350 public uint32 index;
1352 public uint32 owner_module;
1353 public string driver;
1354 public uint32 n_profiles;
1355 public CardProfileInfo[] profiles;
1356 public CardProfileInfo *active_profile;
1357 public Proplist proplist;
1360 [CCode (cname="pa_sink_input_info", has_type_id=false)]
1361 public struct SinkInputInfo {
1362 public uint32 index;
1364 public uint32 owner_module;
1365 public uint32 client;
1367 public SampleSpec sample_spec;
1368 public ChannelMap channel_map;
1369 public CVolume volume;
1370 public uint32 buffer_usec;
1371 public uint32 sink_usec;
1372 public string resample_method;
1373 public string driver;
1375 public Proplist proplist;
1378 [CCode (cname="pa_source_output_info", has_type_id=false)]
1379 public struct SourceOutputInfo {
1380 public uint32 index;
1382 public uint32 owner_module;
1383 public uint32 client;
1384 public uint32 source;
1385 public SampleSpec sample_spec;
1386 public ChannelMap channel_map;
1387 public uint32 buffer_usec;
1388 public uint32 sink_usec;
1389 public string resample_method;
1390 public string driver;
1391 public Proplist proplist;
1394 [CCode (cname="pa_stat_info", has_type_id=false)]
1395 public struct StatInfo {
1396 public uint32 memblock_total;
1397 public uint32 memblock_total_size;
1398 public uint32 memblock_allocated;
1399 public uint32 memblock_allocated_size;
1400 public uint32 scache_size;
1403 [CCode (cname="pa_sample_info", has_type_id=false)]
1404 public struct SampleInfo {
1405 public uint32 index;
1407 public CVolume volume;
1408 public SampleSpec sample_spec;
1409 public ChannelMap channel_map;
1410 public usec duration;
1411 public uint32 bytes;
1413 public string filename;
1414 public Proplist proplist;
1417 [CCode (cname="pa_sink_flags_t", cprefix="PA_SINK_", has_type_id=false)]
1418 public enum SinkFlags {
1429 [CCode (cname="pa_source_flags_t", cprefix="PA_SOURCE_", has_type_id=false)]
1430 public enum SourceFlags {
1440 [CCode (cname="pa_sink_state_t", cprefix="PA_SINK_", has_type_id=false)]
1441 public enum SinkState {
1447 [CCode (cname="PA_SINK_IS_OPENED")]
1448 public bool IS_OPENED();
1451 [CCode (cname="pa_source_state_t", cprefix="PA_SOURCE_", has_type_id=false)]
1452 public enum SourceState {
1458 [CCode (cname="PA_SOURCE_IS_OPENED")]
1459 public bool IS_OPENED();
1462 [CCode (cname="pa_gettimeofday")]
1463 public unowned timeval gettimeofday(out timeval tv);
1465 [CCode (cname="pa_timeval_diff")]
1466 public usec timeval_diff(ref timeval a, ref timeval b);
1468 [CCode (cname="pa_timeval_cmp")]
1469 public int timeval_cmp(ref timeval a, ref timeval b);
1471 [CCode (cname="pa_timeval_age")]
1472 public usec timeval_age(ref timeval a);
1474 [CCode (cname="pa_timeval_add")]
1475 public unowned timeval timeval_add(ref timeval tv, usec x);
1477 [CCode (cname="pa_timeval_sub")]
1478 public unowned timeval timeval_sub(ref timeval tv, usec x);
1480 [CCode (cname="pa_timeval_store")]
1481 public unowned timeval timeval_store(out timeval tv, usec c);
1483 [CCode (cname="pa_timeval_load")]
1484 public usec timeval_load(timeval tv);
1486 [CCode (cname="PA_USEC_MAX")]
1487 public const usec USEC_MAX;
1489 [CCode (cname="PA_USEC_INVALID")]
1490 public const usec USEC_INVALID;
1492 [CCode (cname="PA_MSEC_PER_SEC")]
1493 public const usec MSEC_PER_SEC;
1495 [CCode (cname="PA_USEC_PER_SEC")]
1496 public const usec USEC_PER_SEC;
1498 [CCode (cname="PA_NSEC_PER_SEC")]
1499 public const uint64 NSEC_PER_SEC;
1502 [CCode (cname="PA_USEC_PER_MSEC")]
1503 public const usec USEC_PER_MSEC;
1505 [CCode (cname="PA_NSEC_PER_MSEC")]
1506 public const uint64 NSEC_PER_MSEC;
1509 [CCode (cname="PA_NSEC_PER_USEC")]
1510 public const uint64 NSEC_PER_USEC;