Index: /trunk/src/VBox/Devices/Audio/pulse_mangling.h
===================================================================
--- /trunk/src/VBox/Devices/Audio/pulse_mangling.h	(revision 67951)
+++ /trunk/src/VBox/Devices/Audio/pulse_mangling.h	(revision 67952)
@@ -22,7 +22,32 @@
 #define PULSE_MANGLER(symbol) VBox_##symbol
 
+#define pa_bytes_per_second                     PULSE_MANGLER(pa_bytes_per_second)
+#define pa_bytes_to_usec                        PULSE_MANGLER(pa_bytes_to_usec)
+#define pa_channel_map_init_auto                PULSE_MANGLER(pa_channel_map_init_auto)
+
+#define pa_context_connect                      PULSE_MANGLER(pa_context_connect)
+#define pa_context_disconnect                   PULSE_MANGLER(pa_context_disconnect)
+#define pa_context_get_server_info              PULSE_MANGLER(pa_context_get_server_info)
+#define pa_context_get_sink_info_by_name        PULSE_MANGLER(pa_context_get_sink_info_by_name)
+#define pa_context_get_source_info_by_name      PULSE_MANGLER(pa_context_get_source_info_by_name)
+#define pa_context_get_state                    PULSE_MANGLER(pa_context_get_state)
+#define pa_context_unref                        PULSE_MANGLER(pa_context_unref)
+#define pa_context_errno                        PULSE_MANGLER(pa_context_errno)
+#define pa_context_new                          PULSE_MANGLER(pa_context_new)
+#define pa_context_set_state_callback           PULSE_MANGLER(pa_context_set_state_callback)
+
+#define pa_frame_size                           PULSE_MANGLER(pa_frame_size)
+#define pa_operation_unref                      PULSE_MANGLER(pa_operation_unref)
+#define pa_operation_get_state                  PULSE_MANGLER(pa_operation_get_state)
+#define pa_operation_cancel                     PULSE_MANGLER(pa_operation_cancel)
+#define pa_rtclock_now                          PULSE_MANGLER(pa_rtclock_now)
+#define pa_sample_format_to_string              PULSE_MANGLER(pa_sample_format_to_string)
+#define pa_sample_spec_valid                    PULSE_MANGLER(pa_sample_spec_valid)
+
 #define pa_stream_connect_playback              PULSE_MANGLER(pa_stream_connect_playback)
 #define pa_stream_connect_record                PULSE_MANGLER(pa_stream_connect_record)
+#define pa_stream_cork                          PULSE_MANGLER(pa_stream_cork)
 #define pa_stream_disconnect                    PULSE_MANGLER(pa_stream_disconnect)
+#define pa_stream_drop                          PULSE_MANGLER(pa_stream_drop)
 #define pa_stream_get_sample_spec               PULSE_MANGLER(pa_stream_get_sample_spec)
 #define pa_stream_set_latency_update_callback   PULSE_MANGLER(pa_stream_set_latency_update_callback)
@@ -42,17 +67,9 @@
 #define pa_stream_get_buffer_attr               PULSE_MANGLER(pa_stream_get_buffer_attr)
 #define pa_stream_peek                          PULSE_MANGLER(pa_stream_peek)
-#define pa_stream_cork                          PULSE_MANGLER(pa_stream_cork)
-#define pa_stream_drop                          PULSE_MANGLER(pa_stream_drop)
+#define pa_stream_readable_size                 PULSE_MANGLER(pa_stream_readable_size)
 #define pa_stream_writable_size                 PULSE_MANGLER(pa_stream_writable_size)
-#define pa_context_connect                      PULSE_MANGLER(pa_context_connect)
-#define pa_context_disconnect                   PULSE_MANGLER(pa_context_disconnect)
-#define pa_context_get_server_info              PULSE_MANGLER(pa_context_get_server_info)
-#define pa_context_get_sink_info_by_name        PULSE_MANGLER(pa_context_get_sink_info_by_name)
-#define pa_context_get_source_info_by_name      PULSE_MANGLER(pa_context_get_source_info_by_name)
-#define pa_context_get_state                    PULSE_MANGLER(pa_context_get_state)
-#define pa_context_unref                        PULSE_MANGLER(pa_context_unref)
-#define pa_context_errno                        PULSE_MANGLER(pa_context_errno)
-#define pa_context_new                          PULSE_MANGLER(pa_context_new)
-#define pa_context_set_state_callback           PULSE_MANGLER(pa_context_set_state_callback)
+
+#define pa_strerror                             PULSE_MANGLER(pa_strerror)
+
 #define pa_threaded_mainloop_stop               PULSE_MANGLER(pa_threaded_mainloop_stop)
 #define pa_threaded_mainloop_get_api            PULSE_MANGLER(pa_threaded_mainloop_get_api)
@@ -64,17 +81,6 @@
 #define pa_threaded_mainloop_start              PULSE_MANGLER(pa_threaded_mainloop_start)
 #define pa_threaded_mainloop_lock               PULSE_MANGLER(pa_threaded_mainloop_lock)
-#define pa_bytes_per_second                     PULSE_MANGLER(pa_bytes_per_second)
-#define pa_bytes_to_usec                        PULSE_MANGLER(pa_bytes_to_usec)
+
 #define pa_usec_to_bytes                        PULSE_MANGLER(pa_usec_to_bytes)
-#define pa_rtclock_now                          PULSE_MANGLER(pa_rtclock_now)
-#define pa_frame_size                           PULSE_MANGLER(pa_frame_size)
-#define pa_sample_format_to_string              PULSE_MANGLER(pa_sample_format_to_string)
-#define pa_sample_spec_valid                    PULSE_MANGLER(pa_sample_spec_valid)
-#define pa_channel_map_init_auto                PULSE_MANGLER(pa_channel_map_init_auto)
-#define pa_operation_unref                      PULSE_MANGLER(pa_operation_unref)
-#define pa_operation_get_state                  PULSE_MANGLER(pa_operation_get_state)
-#define pa_operation_cancel                     PULSE_MANGLER(pa_operation_cancel)
-#define pa_strerror                             PULSE_MANGLER(pa_strerror)
-#define pa_stream_readable_size                 PULSE_MANGLER(pa_stream_readable_size)
 
 #endif /* !AUDIO_PULSE_MANGLING_H */
Index: /trunk/src/VBox/Devices/Audio/pulse_stubs.c
===================================================================
--- /trunk/src/VBox/Devices/Audio/pulse_stubs.c	(revision 67951)
+++ /trunk/src/VBox/Devices/Audio/pulse_stubs.c	(revision 67952)
@@ -45,84 +45,14 @@
     }
 
-#if PA_PROTOCOL_VERSION >= 16
-PROXY_STUB     (pa_stream_connect_playback, int,
-                (pa_stream *s, const char *dev, const pa_buffer_attr *attr,
-                 pa_stream_flags_t flags, const pa_cvolume *volume, pa_stream *sync_stream),
-                (s, dev, attr, flags, volume, sync_stream))
-#else
-PROXY_STUB     (pa_stream_connect_playback, int,
-                (pa_stream *s, const char *dev, const pa_buffer_attr *attr,
-                 pa_stream_flags_t flags, pa_cvolume *volume, pa_stream *sync_stream),
-                (s, dev, attr, flags, volume, sync_stream))
-#endif
-PROXY_STUB     (pa_stream_connect_record, int,
-                (pa_stream *s, const char *dev, const pa_buffer_attr *attr,
-                pa_stream_flags_t flags),
-                (s, dev, attr, flags))
-PROXY_STUB     (pa_stream_disconnect, int,
-                (pa_stream *s),
-                (s))
-PROXY_STUB     (pa_stream_get_sample_spec, const pa_sample_spec*,
-                (pa_stream *s),
-                (s))
-PROXY_STUB_VOID(pa_stream_set_latency_update_callback,
-                (pa_stream *p, pa_stream_notify_cb_t cb, void *userdata),
-                (p, cb, userdata))
-PROXY_STUB     (pa_stream_write, int,
-                (pa_stream *p, const void *data, size_t bytes, pa_free_cb_t free_cb,
-                 int64_t offset, pa_seek_mode_t seek),
-                (p, data, bytes, free_cb, offset, seek))
-PROXY_STUB_VOID(pa_stream_unref,
-                (pa_stream *s),
-                (s))
-PROXY_STUB     (pa_stream_get_state, pa_stream_state_t,
-                (pa_stream *p),
-                (p))
-PROXY_STUB     (pa_stream_get_latency, int,
-                (pa_stream *s, pa_usec_t *r_usec, int *negative),
-                (s, r_usec, negative))
-PROXY_STUB     (pa_stream_get_timing_info, pa_timing_info*,
-                (pa_stream *s),
-                (s))
-PROXY_STUB      (pa_stream_set_buffer_attr, pa_operation *,
-                (pa_stream *s, const pa_buffer_attr *attr, pa_stream_success_cb_t cb, void *userdata),
-                (s, attr, cb, userdata))
-PROXY_STUB_VOID(pa_stream_set_state_callback,
-                (pa_stream *s, pa_stream_notify_cb_t cb, void *userdata),
-                (s, cb, userdata))
-PROXY_STUB_VOID(pa_stream_set_underflow_callback,
-                (pa_stream *s, pa_stream_notify_cb_t cb, void *userdata),
-                (s, cb, userdata))
-PROXY_STUB_VOID(pa_stream_set_write_callback,
-                (pa_stream *s, pa_stream_request_cb_t cb, void *userdata),
-                (s, cb, userdata))
-PROXY_STUB     (pa_stream_flush, pa_operation*,
-                (pa_stream *s, pa_stream_success_cb_t cb, void *userdata),
-                (s, cb, userdata))
-PROXY_STUB     (pa_stream_drain, pa_operation*,
-                (pa_stream *s, pa_stream_success_cb_t cb, void *userdata),
-                (s, cb, userdata))
-PROXY_STUB     (pa_stream_trigger, pa_operation*,
-                (pa_stream *s, pa_stream_success_cb_t cb, void *userdata),
-                (s, cb, userdata))
-PROXY_STUB     (pa_stream_new, pa_stream*,
-                (pa_context *c, const char *name, const pa_sample_spec *ss,
-                 const pa_channel_map *map),
-                (c, name, ss, map))
-PROXY_STUB     (pa_stream_get_buffer_attr, const pa_buffer_attr*,
-                (pa_stream *s),
-                (s))
-PROXY_STUB     (pa_stream_peek, int,
-                (pa_stream *p, const void **data, size_t *bytes),
-                (p, data, bytes))
-PROXY_STUB     (pa_stream_cork, pa_operation*,
-                (pa_stream *s, int b, pa_stream_success_cb_t cb, void *userdata),
-                (s, b, cb, userdata))
-PROXY_STUB     (pa_stream_drop, int,
-                (pa_stream *p),
-                (p))
-PROXY_STUB     (pa_stream_writable_size, size_t,
-                (pa_stream *p),
-                (p))
+PROXY_STUB     (pa_bytes_per_second, size_t,
+                (const pa_sample_spec *spec),
+                (spec))
+PROXY_STUB     (pa_bytes_to_usec, pa_usec_t,
+                (uint64_t l, const pa_sample_spec *spec),
+                (l, spec))
+PROXY_STUB     (pa_channel_map_init_auto, pa_channel_map*,
+                (pa_channel_map *m, unsigned channels, pa_channel_map_def_t def),
+                (m, channels, def))
+
 PROXY_STUB     (pa_context_connect, int,
                 (pa_context *c, const char *server, pa_context_flags_t flags,
@@ -156,55 +86,9 @@
                 (pa_context *c, pa_context_notify_cb_t cb, void *userdata),
                 (c, cb, userdata))
-PROXY_STUB_VOID(pa_threaded_mainloop_stop,
-                (pa_threaded_mainloop *m),
-                (m))
-PROXY_STUB     (pa_threaded_mainloop_get_api, pa_mainloop_api*,
-                (pa_threaded_mainloop *m),
-                (m))
-PROXY_STUB_VOID(pa_threaded_mainloop_free,
-                (pa_threaded_mainloop* m),
-                (m))
-PROXY_STUB_VOID(pa_threaded_mainloop_signal,
-                (pa_threaded_mainloop *m, int wait_for_accept),
-                (m, wait_for_accept))
-PROXY_STUB_VOID(pa_threaded_mainloop_unlock,
-                (pa_threaded_mainloop *m),
-                (m))
-PROXY_STUB     (pa_threaded_mainloop_new, pa_threaded_mainloop *,
-                (void),
-                ())
-PROXY_STUB_VOID(pa_threaded_mainloop_wait,
-                (pa_threaded_mainloop *m),
-                (m))
-PROXY_STUB     (pa_threaded_mainloop_start, int,
-                (pa_threaded_mainloop *m),
-                (m))
-PROXY_STUB_VOID(pa_threaded_mainloop_lock,
-                (pa_threaded_mainloop *m),
-                (m))
-PROXY_STUB     (pa_bytes_per_second, size_t,
-                (const pa_sample_spec *spec),
-                (spec))
-PROXY_STUB     (pa_bytes_to_usec, pa_usec_t,
-                (uint64_t l, const pa_sample_spec *spec),
-                (l, spec))
-PROXY_STUB     (pa_usec_to_bytes, size_t,
-                (pa_usec_t t, const pa_sample_spec *spec),
-                (t, spec))
-PROXY_STUB     (pa_rtclock_now, pa_usec_t,
-                (void),
-                ())
+
+
 PROXY_STUB     (pa_frame_size, size_t,
                 (const pa_sample_spec *spec),
                 (spec))
-PROXY_STUB     (pa_sample_format_to_string, const char*,
-                (pa_sample_format_t f),
-                (f))
-PROXY_STUB     (pa_sample_spec_valid, int,
-                (const pa_sample_spec *spec),
-                (spec))
-PROXY_STUB     (pa_channel_map_init_auto, pa_channel_map*,
-                (pa_channel_map *m, unsigned channels, pa_channel_map_def_t def),
-                (m, channels, def))
 PROXY_STUB_VOID(pa_operation_unref,
                 (pa_operation *o),
@@ -216,11 +100,133 @@
                 (pa_operation *o),
                 (o))
+
+PROXY_STUB     (pa_rtclock_now, pa_usec_t,
+                (void),
+                ())
+PROXY_STUB     (pa_sample_format_to_string, const char*,
+                (pa_sample_format_t f),
+                (f))
+PROXY_STUB     (pa_sample_spec_valid, int,
+                (const pa_sample_spec *spec),
+                (spec))
 PROXY_STUB     (pa_strerror, const char*,
                 (int error),
                 (error))
+
+#if PA_PROTOCOL_VERSION >= 16
+PROXY_STUB     (pa_stream_connect_playback, int,
+                (pa_stream *s, const char *dev, const pa_buffer_attr *attr,
+                 pa_stream_flags_t flags, const pa_cvolume *volume, pa_stream *sync_stream),
+                (s, dev, attr, flags, volume, sync_stream))
+#else
+PROXY_STUB     (pa_stream_connect_playback, int,
+                (pa_stream *s, const char *dev, const pa_buffer_attr *attr,
+                 pa_stream_flags_t flags, pa_cvolume *volume, pa_stream *sync_stream),
+                (s, dev, attr, flags, volume, sync_stream))
+#endif
+PROXY_STUB     (pa_stream_connect_record, int,
+                (pa_stream *s, const char *dev, const pa_buffer_attr *attr,
+                pa_stream_flags_t flags),
+                (s, dev, attr, flags))
+PROXY_STUB     (pa_stream_disconnect, int,
+                (pa_stream *s),
+                (s))
+PROXY_STUB     (pa_stream_get_sample_spec, const pa_sample_spec*,
+                (pa_stream *s),
+                (s))
+PROXY_STUB_VOID(pa_stream_set_latency_update_callback,
+                (pa_stream *p, pa_stream_notify_cb_t cb, void *userdata),
+                (p, cb, userdata))
+PROXY_STUB     (pa_stream_write, int,
+                (pa_stream *p, const void *data, size_t bytes, pa_free_cb_t free_cb,
+                 int64_t offset, pa_seek_mode_t seek),
+                (p, data, bytes, free_cb, offset, seek))
+PROXY_STUB_VOID(pa_stream_unref,
+                (pa_stream *s),
+                (s))
+PROXY_STUB     (pa_stream_get_state, pa_stream_state_t,
+                (pa_stream *p),
+                (p))
+PROXY_STUB     (pa_stream_get_latency, int,
+                (pa_stream *s, pa_usec_t *r_usec, int *negative),
+                (s, r_usec, negative))
+PROXY_STUB     (pa_stream_get_timing_info, pa_timing_info*,
+                (pa_stream *s),
+                (s))
 PROXY_STUB     (pa_stream_readable_size, size_t,
                 (pa_stream *p),
                 (p))
-
+PROXY_STUB      (pa_stream_set_buffer_attr, pa_operation *,
+                (pa_stream *s, const pa_buffer_attr *attr, pa_stream_success_cb_t cb, void *userdata),
+                (s, attr, cb, userdata))
+PROXY_STUB_VOID(pa_stream_set_state_callback,
+                (pa_stream *s, pa_stream_notify_cb_t cb, void *userdata),
+                (s, cb, userdata))
+PROXY_STUB_VOID(pa_stream_set_underflow_callback,
+                (pa_stream *s, pa_stream_notify_cb_t cb, void *userdata),
+                (s, cb, userdata))
+PROXY_STUB_VOID(pa_stream_set_write_callback,
+                (pa_stream *s, pa_stream_request_cb_t cb, void *userdata),
+                (s, cb, userdata))
+PROXY_STUB     (pa_stream_flush, pa_operation*,
+                (pa_stream *s, pa_stream_success_cb_t cb, void *userdata),
+                (s, cb, userdata))
+PROXY_STUB     (pa_stream_drain, pa_operation*,
+                (pa_stream *s, pa_stream_success_cb_t cb, void *userdata),
+                (s, cb, userdata))
+PROXY_STUB     (pa_stream_trigger, pa_operation*,
+                (pa_stream *s, pa_stream_success_cb_t cb, void *userdata),
+                (s, cb, userdata))
+PROXY_STUB     (pa_stream_new, pa_stream*,
+                (pa_context *c, const char *name, const pa_sample_spec *ss,
+                 const pa_channel_map *map),
+                (c, name, ss, map))
+PROXY_STUB     (pa_stream_get_buffer_attr, const pa_buffer_attr*,
+                (pa_stream *s),
+                (s))
+PROXY_STUB     (pa_stream_peek, int,
+                (pa_stream *p, const void **data, size_t *bytes),
+                (p, data, bytes))
+PROXY_STUB     (pa_stream_cork, pa_operation*,
+                (pa_stream *s, int b, pa_stream_success_cb_t cb, void *userdata),
+                (s, b, cb, userdata))
+PROXY_STUB     (pa_stream_drop, int,
+                (pa_stream *p),
+                (p))
+PROXY_STUB     (pa_stream_writable_size, size_t,
+                (pa_stream *p),
+                (p))
+
+PROXY_STUB_VOID(pa_threaded_mainloop_stop,
+                (pa_threaded_mainloop *m),
+                (m))
+PROXY_STUB     (pa_threaded_mainloop_get_api, pa_mainloop_api*,
+                (pa_threaded_mainloop *m),
+                (m))
+PROXY_STUB_VOID(pa_threaded_mainloop_free,
+                (pa_threaded_mainloop* m),
+                (m))
+PROXY_STUB_VOID(pa_threaded_mainloop_signal,
+                (pa_threaded_mainloop *m, int wait_for_accept),
+                (m, wait_for_accept))
+PROXY_STUB_VOID(pa_threaded_mainloop_unlock,
+                (pa_threaded_mainloop *m),
+                (m))
+PROXY_STUB     (pa_threaded_mainloop_new, pa_threaded_mainloop *,
+                (void),
+                ())
+PROXY_STUB_VOID(pa_threaded_mainloop_wait,
+                (pa_threaded_mainloop *m),
+                (m))
+PROXY_STUB     (pa_threaded_mainloop_start, int,
+                (pa_threaded_mainloop *m),
+                (m))
+PROXY_STUB_VOID(pa_threaded_mainloop_lock,
+                (pa_threaded_mainloop *m),
+                (m))
+
+PROXY_STUB     (pa_usec_to_bytes, size_t,
+                (pa_usec_t t, const pa_sample_spec *spec),
+                (t, spec))
 
 typedef struct
@@ -233,4 +239,28 @@
 static SHARED_FUNC SharedFuncs[] =
 {
+    ELEMENT(pa_bytes_per_second),
+    ELEMENT(pa_bytes_to_usec),
+    ELEMENT(pa_channel_map_init_auto),
+
+    ELEMENT(pa_context_connect),
+    ELEMENT(pa_context_disconnect),
+    ELEMENT(pa_context_get_server_info),
+    ELEMENT(pa_context_get_sink_info_by_name),
+    ELEMENT(pa_context_get_source_info_by_name),
+    ELEMENT(pa_context_get_state),
+    ELEMENT(pa_context_unref),
+    ELEMENT(pa_context_errno),
+    ELEMENT(pa_context_new),
+    ELEMENT(pa_context_set_state_callback),
+
+    ELEMENT(pa_frame_size),
+    ELEMENT(pa_operation_unref),
+    ELEMENT(pa_operation_get_state),
+    ELEMENT(pa_operation_cancel),
+    ELEMENT(pa_rtclock_now),
+    ELEMENT(pa_sample_format_to_string),
+    ELEMENT(pa_sample_spec_valid),
+    ELEMENT(pa_strerror),
+
     ELEMENT(pa_stream_connect_playback),
     ELEMENT(pa_stream_connect_record),
@@ -243,4 +273,5 @@
     ELEMENT(pa_stream_get_latency),
     ELEMENT(pa_stream_get_timing_info),
+    ELEMENT(pa_stream_readable_size),
     ELEMENT(pa_stream_set_buffer_attr),
     ELEMENT(pa_stream_set_state_callback),
@@ -256,14 +287,5 @@
     ELEMENT(pa_stream_drop),
     ELEMENT(pa_stream_writable_size),
-    ELEMENT(pa_context_connect),
-    ELEMENT(pa_context_disconnect),
-    ELEMENT(pa_context_get_server_info),
-    ELEMENT(pa_context_get_sink_info_by_name),
-    ELEMENT(pa_context_get_source_info_by_name),
-    ELEMENT(pa_context_get_state),
-    ELEMENT(pa_context_unref),
-    ELEMENT(pa_context_errno),
-    ELEMENT(pa_context_new),
-    ELEMENT(pa_context_set_state_callback),
+
     ELEMENT(pa_threaded_mainloop_stop),
     ELEMENT(pa_threaded_mainloop_get_api),
@@ -275,17 +297,6 @@
     ELEMENT(pa_threaded_mainloop_start),
     ELEMENT(pa_threaded_mainloop_lock),
-    ELEMENT(pa_bytes_per_second),
-    ELEMENT(pa_bytes_to_usec),
-    ELEMENT(pa_usec_to_bytes),
-    ELEMENT(pa_rtclock_now),
-    ELEMENT(pa_frame_size),
-    ELEMENT(pa_sample_format_to_string),
-    ELEMENT(pa_sample_spec_valid),
-    ELEMENT(pa_channel_map_init_auto),
-    ELEMENT(pa_operation_unref),
-    ELEMENT(pa_operation_get_state),
-    ELEMENT(pa_operation_cancel),
-    ELEMENT(pa_strerror),
-    ELEMENT(pa_stream_readable_size)
+
+    ELEMENT(pa_usec_to_bytes)
 };
 #undef ELEMENT
