[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.13-292-g5f6641c

Lennart Poettering gitmailer-noreply at 0pointer.de
Mon Jan 19 14:07:45 PST 2009


This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.

The master branch has been updated
      from  b987e5eeb88be8b9e041899abc7616482564f070 (commit)

- Log -----------------------------------------------------------------
5f6641c... Beef pactl output up a bit
ed65081... show dB and balance for cached samples
033791c... fix up balance format string a bit
23cd942... fix doxygen version references
-----------------------------------------------------------------------

Summary of changes:
 src/pulse/def.h          |    4 +-
 src/pulse/introspect.h   |    4 +-
 src/pulse/volume.c       |    2 +-
 src/pulse/volume.h       |    8 +-
 src/pulsecore/cli-text.c |   12 ++-
 src/utils/pactl.c        |  212 ++++++++++++++++++++++++++++------------------
 6 files changed, 148 insertions(+), 94 deletions(-)

-----------------------------------------------------------------------

commit 23cd942a0da6db301a2166d4d51c730e4388d271
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Jan 19 23:03:22 2009 +0100

    fix doxygen version references

diff --git a/src/pulse/def.h b/src/pulse/def.h
index 9e424d4..d43c070 100644
--- a/src/pulse/def.h
+++ b/src/pulse/def.h
@@ -234,13 +234,13 @@ typedef enum pa_stream_flags {
     PA_STREAM_DONT_INHIBIT_AUTO_SUSPEND = 0x8000U,
     /**< If set this stream won't be taken into account when we it is
      * checked whether the device this stream is connected to should
-     * auto-suspend. \ since 0.9.14 */
+     * auto-suspend. \ since 0.9.15 */
 
     PA_STREAM_START_UNMUTED = 0x10000U
     /**< Create in unmuted state. If neither PA_STREAM_START_UNMUTED
      * nor PA_STREAM_START_MUTED it is left to the server to decide
      * whether to create the stream in muted or in unmuted
-     * state. \since 0.9.14 */
+     * state. \since 0.9.15 */
 
 } pa_stream_flags_t;
 
diff --git a/src/pulse/introspect.h b/src/pulse/introspect.h
index 428826e..a656d1c 100644
--- a/src/pulse/introspect.h
+++ b/src/pulse/introspect.h
@@ -211,7 +211,7 @@ typedef struct pa_sink_info {
     pa_sink_flags_t flags;             /**< Flags */
     pa_proplist *proplist;             /**< Property list \since 0.9.11 */
     pa_usec_t configured_latency;      /**< The latency this device has been configured to. \since 0.9.11 */
-    pa_volume_t base_volume;           /**< Some kind of "base" volume that refers to unamplified/unattenuated volume in the context of the output device. \since 0.9.14 */
+    pa_volume_t base_volume;           /**< Some kind of "base" volume that refers to unamplified/unattenuated volume in the context of the output device. \since 0.9.15 */
 } pa_sink_info;
 
 /** Callback prototype for pa_context_get_sink_info_by_name() and friends */
@@ -267,7 +267,7 @@ typedef struct pa_source_info {
     pa_source_flags_t flags;            /**< Flags */
     pa_proplist *proplist;              /**< Property list \since 0.9.11 */
     pa_usec_t configured_latency;       /**< The latency this device has been configured to. \since 0.9.11 */
-    pa_volume_t base_volume;           /**< Some kind of "base" volume that refers to unamplified/unattenuated volume in the context of the input device. \since 0.9.14 */
+    pa_volume_t base_volume;           /**< Some kind of "base" volume that refers to unamplified/unattenuated volume in the context of the input device. \since 0.9.15 */
 } pa_source_info;
 
 /** Callback prototype for pa_context_get_source_info_by_name() and friends */
diff --git a/src/pulse/volume.h b/src/pulse/volume.h
index 08683ac..38da5df 100644
--- a/src/pulse/volume.h
+++ b/src/pulse/volume.h
@@ -154,20 +154,20 @@ char *pa_sw_cvolume_snprint_dB(char *s, size_t l, const pa_cvolume *c);
  * pa_volume_snprint(). Please note that this value can change with
  * any release without warning and without being considered API or ABI
  * breakage. You should not use this definition anywhere where it
- * might become part of an ABI. \since 0.9.14 */
+ * might become part of an ABI. \since 0.9.15 */
 #define PA_VOLUME_SNPRINT_MAX 10
 
-/** Pretty print a volume \since 0.9.14 */
+/** Pretty print a volume \since 0.9.15 */
 char *pa_volume_snprint(char *s, size_t l, pa_volume_t v);
 
 /** Maximum length of the strings returned by
  * pa_volume_snprint_dB(). Please note that this value can change with
  * any release without warning and without being considered API or ABI
  * breakage. You should not use this definition anywhere where it
- * might become part of an ABI. \since 0.9.14 */
+ * might become part of an ABI. \since 0.9.15 */
 #define PA_SW_VOLUME_SNPRINT_DB_MAX 10
 
-/** Pretty print a volume but show dB values. \since 0.9.14 */
+/** Pretty print a volume but show dB values. \since 0.9.15 */
 char *pa_sw_volume_snprint_dB(char *s, size_t l, pa_volume_t v);
 
 /** Return the average volume of all channels */

commit 033791ca9ff583eb2f1eb1b14424cfee57c1af47
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Jan 19 23:06:37 2009 +0100

    fix up balance format string a bit

diff --git a/src/pulsecore/cli-text.c b/src/pulsecore/cli-text.c
index cbd36e2..31d2b35 100644
--- a/src/pulsecore/cli-text.c
+++ b/src/pulsecore/cli-text.c
@@ -186,7 +186,7 @@ char *pa_sink_list_to_string(pa_core *c) {
             "\tflags: %s%s%s%s%s%s\n"
             "\tstate: %s\n"
             "\tvolume: %s%s%s\n"
-            "\t        balance %-20.2f\n"
+            "\t        balance %0.2f\n"
             "\tbase volume: %s%s%s\n"
             "\tmuted: %s\n"
             "\tcurrent latency: %0.2f ms\n"
@@ -278,7 +278,7 @@ char *pa_source_list_to_string(pa_core *c) {
             "\tflags: %s%s%s%s%s%s\n"
             "\tstate: %s\n"
             "\tvolume: %s%s%s\n"
-            "\t        balance %-20.2f\n"
+            "\t        balance %0.2f\n"
             "\tbase volume: %s%s%s\n"
             "\tmuted: %s\n"
             "\tcurrent latency: %0.2f ms\n"
@@ -441,7 +441,7 @@ char *pa_sink_input_list_to_string(pa_core *c) {
             "\tsink: %u <%s>\n"
             "\tvolume: %s\n"
             "\t        %s\n"
-            "\t        balance %-20.2f\n"
+            "\t        balance %0.2f\n"
             "\tmuted: %s\n"
             "\tcurrent latency: %0.2f ms\n"
             "\trequested latency: %s\n"

commit ed65081dd82cf60160b4800fd4a6e11b39e5695e
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Jan 19 23:07:13 2009 +0100

    show dB and balance for cached samples

diff --git a/src/pulsecore/cli-text.c b/src/pulsecore/cli-text.c
index 31d2b35..7962039 100644
--- a/src/pulsecore/cli-text.c
+++ b/src/pulsecore/cli-text.c
@@ -497,7 +497,7 @@ char *pa_scache_list_to_string(pa_core *c) {
 
         for (e = pa_idxset_first(c->scache, &idx); e; e = pa_idxset_next(c->scache, &idx)) {
             double l = 0;
-            char ss[PA_SAMPLE_SPEC_SNPRINT_MAX] = "n/a", cv[PA_CVOLUME_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX] = "n/a", *t;
+            char ss[PA_SAMPLE_SPEC_SNPRINT_MAX] = "n/a", cv[PA_CVOLUME_SNPRINT_MAX], cvdb[PA_SW_CVOLUME_SNPRINT_DB_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX] = "n/a", *t;
 
             if (e->memchunk.memblock) {
                 pa_sample_spec_snprint(ss, sizeof(ss), &e->sample_spec);
@@ -514,6 +514,8 @@ char *pa_scache_list_to_string(pa_core *c) {
                 "\tlength: %lu\n"
                 "\tduration: %0.1f s\n"
                 "\tvolume: %s\n"
+                "\t        %s\n"
+                "\t        balance %0.2f\n"
                 "\tlazy: %s\n"
                 "\tfilename: <%s>\n",
                 e->name,
@@ -523,6 +525,8 @@ char *pa_scache_list_to_string(pa_core *c) {
                 (long unsigned)(e->memchunk.memblock ? e->memchunk.length : 0),
                 l,
                 pa_cvolume_snprint(cv, sizeof(cv), &e->volume),
+                pa_sw_cvolume_snprint_dB(cvdb, sizeof(cvdb), &e->volume),
+                e->memchunk.memblock ? pa_cvolume_get_balance(&e->channel_map, &e->volume) : 0.0f,
                 pa_yes_no(e->lazy),
                 e->filename ? e->filename : "n/a");
 

commit 5f6641cfdd49d64b1cbc68ed025f9d22edc2665c
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Jan 19 23:07:34 2009 +0100

    Beef pactl output up a bit

diff --git a/src/pulse/volume.c b/src/pulse/volume.c
index d4b1fd9..9191a07 100644
--- a/src/pulse/volume.c
+++ b/src/pulse/volume.c
@@ -458,8 +458,8 @@ float pa_cvolume_get_balance(const pa_channel_map *map, const pa_cvolume *v) {
 pa_cvolume* pa_cvolume_set_balance(const pa_channel_map *map, pa_cvolume *v, float new_balance) {
     pa_volume_t left, nleft, right, nright, m;
     unsigned c;
-    pa_assert(map->channels == v->channels);
 
+    pa_assert(map->channels == v->channels);
     pa_assert(map);
     pa_assert(v);
     pa_assert(new_balance >= -1.0f);
diff --git a/src/utils/pactl.c b/src/utils/pactl.c
index 2fc1733..1ff979e 100644
--- a/src/utils/pactl.c
+++ b/src/utils/pactl.c
@@ -153,7 +153,13 @@ static void get_server_info_callback(pa_context *c, const pa_server_info *i, voi
 }
 
 static void get_sink_info_callback(pa_context *c, const pa_sink_info *i, int is_last, void *userdata) {
-    char s[PA_SAMPLE_SPEC_SNPRINT_MAX], cv[PA_CVOLUME_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX];
+    char
+        s[PA_SAMPLE_SPEC_SNPRINT_MAX],
+        cv[PA_CVOLUME_SNPRINT_MAX],
+        cvdb[PA_SW_CVOLUME_SNPRINT_DB_MAX],
+        v[PA_VOLUME_SNPRINT_MAX],
+        vdb[PA_SW_VOLUME_SNPRINT_DB_MAX],
+        cm[PA_CHANNEL_MAP_SNPRINT_MAX];
     char *pl;
 
     if (is_last < 0) {
@@ -173,24 +179,36 @@ static void get_sink_info_callback(pa_context *c, const pa_sink_info *i, int is_
         printf("\n");
     nl = 1;
 
-    printf(_("*** Sink #%u ***\n"
-           "Name: %s\n"
-           "Driver: %s\n"
-           "Sample Specification: %s\n"
-           "Channel Map: %s\n"
-           "Owner Module: %u\n"
-           "Volume: %s\n"
-           "Monitor Source: %s\n"
-           "Latency: %0.0f usec, configured %0.0f usec\n"
-           "Flags: %s%s%s%s%s%s\n"
-           "Properties:\n%s"),
+    printf(_("Sink #%u\n"
+             "\tName: %s\n"
+             "\tDescription: %s\n"
+             "\tDriver: %s\n"
+             "\tSample Specification: %s\n"
+             "\tChannel Map: %s\n"
+             "\tOwner Module: %u\n"
+             "\tMute: %s\n"
+             "\tVolume: %s%s%s\n"
+             "\t        balance %0.2f\n"
+             "\tBase Volume: %s%s%s\n"
+             "\tMonitor Source: %s\n"
+             "\tLatency: %0.0f usec, configured %0.0f usec\n"
+             "\tFlags: %s%s%s%s%s%s\n"
+             "\tProperties:\n\t\t%s\n"),
            i->index,
            i->name,
+           pa_strnull(i->description),
            pa_strnull(i->driver),
            pa_sample_spec_snprint(s, sizeof(s), &i->sample_spec),
            pa_channel_map_snprint(cm, sizeof(cm), &i->channel_map),
            i->owner_module,
-           i->mute ? _("muted") : pa_cvolume_snprint(cv, sizeof(cv), &i->volume),
+           pa_yes_no(i->mute),
+           pa_cvolume_snprint(cv, sizeof(cv), &i->volume),
+           i->flags & PA_SINK_DECIBEL_VOLUME ? "\n\t        " : "",
+           i->flags & PA_SINK_DECIBEL_VOLUME ? pa_sw_cvolume_snprint_dB(cvdb, sizeof(cvdb), &i->volume) : "",
+           pa_cvolume_get_balance(&i->channel_map, &i->volume),
+           pa_volume_snprint(v, sizeof(v), i->base_volume),
+           i->flags & PA_SINK_DECIBEL_VOLUME ? "\n\t             " : "",
+           i->flags & PA_SINK_DECIBEL_VOLUME ? pa_sw_volume_snprint_dB(vdb, sizeof(vdb), i->base_volume) : "",
            pa_strnull(i->monitor_source_name),
            (double) i->latency, (double) i->configured_latency,
            i->flags & PA_SINK_HARDWARE ? "HARDWARE " : "",
@@ -199,13 +217,19 @@ static void get_sink_info_callback(pa_context *c, const pa_sink_info *i, int is_
            i->flags & PA_SINK_HW_VOLUME_CTRL ? "HW_VOLUME_CTRL " : "",
            i->flags & PA_SINK_DECIBEL_VOLUME ? "DECIBEL_VOLUME " : "",
            i->flags & PA_SINK_LATENCY ? "LATENCY " : "",
-           pl = pa_proplist_to_string(i->proplist));
+           pl = pa_proplist_to_string_sep(i->proplist, "\n\t\t"));
 
     pa_xfree(pl);
 }
 
 static void get_source_info_callback(pa_context *c, const pa_source_info *i, int is_last, void *userdata) {
-    char s[PA_SAMPLE_SPEC_SNPRINT_MAX], cv[PA_CVOLUME_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX];
+    char
+        s[PA_SAMPLE_SPEC_SNPRINT_MAX],
+        cv[PA_CVOLUME_SNPRINT_MAX],
+        cvdb[PA_SW_CVOLUME_SNPRINT_DB_MAX],
+        v[PA_VOLUME_SNPRINT_MAX],
+        vdb[PA_SW_VOLUME_SNPRINT_DB_MAX],
+        cm[PA_CHANNEL_MAP_SNPRINT_MAX];
     char *pl;
 
     if (is_last < 0) {
@@ -225,24 +249,36 @@ static void get_source_info_callback(pa_context *c, const pa_source_info *i, int
         printf("\n");
     nl = 1;
 
-    printf(_("*** Source #%u ***\n"
-           "Name: %s\n"
-           "Driver: %s\n"
-           "Sample Specification: %s\n"
-           "Channel Map: %s\n"
-           "Owner Module: %u\n"
-           "Volume: %s\n"
-           "Monitor of Sink: %s\n"
-           "Latency: %0.0f usec, configured %0.0f usec\n"
-           "Flags: %s%s%s%s%s%s\n"
-           "Properties:\n%s"),
+    printf(_("Source #%u\n"
+             "\tName: %s\n"
+             "\tDescription: %s\n"
+             "\tDriver: %s\n"
+             "\tSample Specification: %s\n"
+             "\tChannel Map: %s\n"
+             "\tOwner Module: %u\n"
+             "\tMute: %s\n"
+             "\tVolume: %s%s%s\n"
+             "\t        balance %0.2f\n"
+             "\tBase Volume: %s%s%s\n"
+             "\tMonitor of Sink: %s\n"
+             "\tLatency: %0.0f usec, configured %0.0f usec\n"
+             "\tFlags: %s%s%s%s%s%s\n"
+             "\tProperties:\n\t\t%s\n"),
            i->index,
            i->name,
+           pa_strnull(i->description),
            pa_strnull(i->driver),
            pa_sample_spec_snprint(s, sizeof(s), &i->sample_spec),
            pa_channel_map_snprint(cm, sizeof(cm), &i->channel_map),
            i->owner_module,
-           i->mute ? "muted" : pa_cvolume_snprint(cv, sizeof(cv), &i->volume),
+           pa_yes_no(i->mute),
+           pa_cvolume_snprint(cv, sizeof(cv), &i->volume),
+           i->flags & PA_SOURCE_DECIBEL_VOLUME ? "\n\t        " : "",
+           i->flags & PA_SOURCE_DECIBEL_VOLUME ? pa_sw_cvolume_snprint_dB(cvdb, sizeof(cvdb), &i->volume) : "",
+           pa_cvolume_get_balance(&i->channel_map, &i->volume),
+           pa_volume_snprint(v, sizeof(v), i->base_volume),
+           i->flags & PA_SOURCE_DECIBEL_VOLUME ? "\n\t             " : "",
+           i->flags & PA_SOURCE_DECIBEL_VOLUME ? pa_sw_volume_snprint_dB(vdb, sizeof(vdb), i->base_volume) : "",
            i->monitor_of_sink_name ? i->monitor_of_sink_name : _("n/a"),
            (double) i->latency, (double) i->configured_latency,
            i->flags & PA_SOURCE_HARDWARE ? "HARDWARE " : "",
@@ -251,13 +287,14 @@ static void get_source_info_callback(pa_context *c, const pa_source_info *i, int
            i->flags & PA_SOURCE_HW_VOLUME_CTRL ? "HW_VOLUME_CTRL " : "",
            i->flags & PA_SOURCE_DECIBEL_VOLUME ? "DECIBEL_VOLUME " : "",
            i->flags & PA_SOURCE_LATENCY ? "LATENCY " : "",
-           pl = pa_proplist_to_string(i->proplist));
+           pl = pa_proplist_to_string_sep(i->proplist, "\n\t\t"));
 
     pa_xfree(pl);
 }
 
 static void get_module_info_callback(pa_context *c, const pa_module_info *i, int is_last, void *userdata) {
     char t[32];
+    char *pl;
 
     if (is_last < 0) {
         fprintf(stderr, _("Failed to get module information: %s\n"), pa_strerror(pa_context_errno(c)));
@@ -278,14 +315,18 @@ static void get_module_info_callback(pa_context *c, const pa_module_info *i, int
 
     snprintf(t, sizeof(t), "%u", i->n_used);
 
-    printf(_("*** Module #%u ***\n"
-           "Name: %s\n"
-           "Argument: %s\n"
-           "Usage counter: %s\n"),
+    printf(_("Module #%u\n"
+             "\tName: %s\n"
+             "\tArgument: %s\n"
+             "\tUsage counter: %s\n"
+             "\tProperties:\n\t\t%s\n"),
            i->index,
            i->name,
            i->argument ? i->argument : "",
-           i->n_used != PA_INVALID_INDEX ? t : _("n/a"));
+           i->n_used != PA_INVALID_INDEX ? t : _("n/a"),
+           pl = pa_proplist_to_string_sep(i->proplist, "\n\t\t"));
+
+    pa_xfree(pl);
 }
 
 static void get_client_info_callback(pa_context *c, const pa_client_info *i, int is_last, void *userdata) {
@@ -311,20 +352,20 @@ static void get_client_info_callback(pa_context *c, const pa_client_info *i, int
 
     snprintf(t, sizeof(t), "%u", i->owner_module);
 
-    printf(_("*** Client #%u ***\n"
-           "Driver: %s\n"
-           "Owner Module: %s\n"
-           "Properties:\n%s"),
+    printf(_("Client #%u\n"
+             "\tDriver: %s\n"
+             "\tOwner Module: %s\n"
+             "\tProperties:\n\t\t%s\n"),
            i->index,
            pa_strnull(i->driver),
            i->owner_module != PA_INVALID_INDEX ? t : _("n/a"),
-           pl = pa_proplist_to_string(i->proplist));
+           pl = pa_proplist_to_string_sep(i->proplist, "\n\t\t"));
 
     pa_xfree(pl);
 }
 
 static void get_sink_input_info_callback(pa_context *c, const pa_sink_input_info *i, int is_last, void *userdata) {
-    char t[32], k[32], s[PA_SAMPLE_SPEC_SNPRINT_MAX], cv[PA_CVOLUME_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX];
+    char t[32], k[32], s[PA_SAMPLE_SPEC_SNPRINT_MAX], cv[PA_CVOLUME_SNPRINT_MAX], cvdb[PA_SW_CVOLUME_SNPRINT_DB_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX];
     char *pl;
 
     if (is_last < 0) {
@@ -347,18 +388,21 @@ static void get_sink_input_info_callback(pa_context *c, const pa_sink_input_info
     snprintf(t, sizeof(t), "%u", i->owner_module);
     snprintf(k, sizeof(k), "%u", i->client);
 
-    printf(_("*** Sink Input #%u ***\n"
-           "Driver: %s\n"
-           "Owner Module: %s\n"
-           "Client: %s\n"
-           "Sink: %u\n"
-           "Sample Specification: %s\n"
-           "Channel Map: %s\n"
-           "Volume: %s\n"
-           "Buffer Latency: %0.0f usec\n"
-           "Sink Latency: %0.0f usec\n"
-           "Resample method: %s\n"
-             "Properties:\n%s"),
+    printf(_("Sink Input #%u\n"
+             "\tDriver: %s\n"
+             "\tOwner Module: %s\n"
+             "\tClient: %s\n"
+             "\tSink: %u\n"
+             "\tSample Specification: %s\n"
+             "\tChannel Map: %s\n"
+             "\tMute: %s\n"
+             "\tVolume: %s\n"
+             "\t        %s\n"
+             "\t        balance %0.2f\n"
+             "\tBuffer Latency: %0.0f usec\n"
+             "\tSink Latency: %0.0f usec\n"
+             "\tResample method: %s\n"
+             "\tProperties:\n\t\t%s\n"),
            i->index,
            pa_strnull(i->driver),
            i->owner_module != PA_INVALID_INDEX ? t : _("n/a"),
@@ -366,11 +410,14 @@ static void get_sink_input_info_callback(pa_context *c, const pa_sink_input_info
            i->sink,
            pa_sample_spec_snprint(s, sizeof(s), &i->sample_spec),
            pa_channel_map_snprint(cm, sizeof(cm), &i->channel_map),
-           i->mute ? _("muted") : pa_cvolume_snprint(cv, sizeof(cv), &i->volume),
+           pa_yes_no(i->mute),
+           pa_cvolume_snprint(cv, sizeof(cv), &i->volume),
+           pa_sw_cvolume_snprint_dB(cvdb, sizeof(cvdb), &i->volume),
+           pa_cvolume_get_balance(&i->channel_map, &i->volume),
            (double) i->buffer_usec,
            (double) i->sink_usec,
            i->resample_method ? i->resample_method : _("n/a"),
-           pl = pa_proplist_to_string(i->proplist));
+           pl = pa_proplist_to_string_sep(i->proplist, "\n\t\t"));
 
     pa_xfree(pl);
 }
@@ -400,17 +447,17 @@ static void get_source_output_info_callback(pa_context *c, const pa_source_outpu
     snprintf(t, sizeof(t), "%u", i->owner_module);
     snprintf(k, sizeof(k), "%u", i->client);
 
-    printf(_("*** Source Output #%u ***\n"
-           "Driver: %s\n"
-           "Owner Module: %s\n"
-           "Client: %s\n"
-           "Source: %u\n"
-           "Sample Specification: %s\n"
-           "Channel Map: %s\n"
-           "Buffer Latency: %0.0f usec\n"
-           "Source Latency: %0.0f usec\n"
-           "Resample method: %s\n"
-           "Properties:\n%s"),
+    printf(_("Source Output #%u\n"
+             "\tDriver: %s\n"
+             "\tOwner Module: %s\n"
+             "\tClient: %s\n"
+             "\tSource: %u\n"
+             "\tSample Specification: %s\n"
+             "\tChannel Map: %s\n"
+             "\tBuffer Latency: %0.0f usec\n"
+             "\tSource Latency: %0.0f usec\n"
+             "\tResample method: %s\n"
+             "\tProperties:\n\t\t%s\n"),
            i->index,
            pa_strnull(i->driver),
            i->owner_module != PA_INVALID_INDEX ? t : _("n/a"),
@@ -421,13 +468,13 @@ static void get_source_output_info_callback(pa_context *c, const pa_source_outpu
            (double) i->buffer_usec,
            (double) i->source_usec,
            i->resample_method ? i->resample_method : _("n/a"),
-           pl = pa_proplist_to_string(i->proplist));
+           pl = pa_proplist_to_string_sep(i->proplist, "\n\t\t"));
 
     pa_xfree(pl);
 }
 
 static void get_sample_info_callback(pa_context *c, const pa_sample_info *i, int is_last, void *userdata) {
-    char t[32], s[PA_SAMPLE_SPEC_SNPRINT_MAX], cv[PA_CVOLUME_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX];
+    char t[32], s[PA_SAMPLE_SPEC_SNPRINT_MAX], cv[PA_CVOLUME_SNPRINT_MAX], cvdb[PA_SW_CVOLUME_SNPRINT_DB_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX];
     char *pl;
 
     if (is_last < 0) {
@@ -447,29 +494,32 @@ static void get_sample_info_callback(pa_context *c, const pa_sample_info *i, int
         printf("\n");
     nl = 1;
 
-
     pa_bytes_snprint(t, sizeof(t), i->bytes);
 
-    printf(_("*** Sample #%u ***\n"
-           "Name: %s\n"
-           "Volume: %s\n"
-           "Sample Specification: %s\n"
-           "Channel Map: %s\n"
-           "Duration: %0.1fs\n"
-           "Size: %s\n"
-           "Lazy: %s\n"
-           "Filename: %s\n"
-           "Properties:\n%s"),
+    printf(_("Sample #%u\n"
+             "\tName: %s\n"
+             "\tSample Specification: %s\n"
+             "\tChannel Map: %s\n"
+             "\tVolume: %s\n"
+             "\t        %s\n"
+             "\t        balance %0.2f\n"
+             "\tDuration: %0.1fs\n"
+             "\tSize: %s\n"
+             "\tLazy: %s\n"
+             "\tFilename: %s\n"
+             "\tProperties:\n\t\t%s\n"),
            i->index,
            i->name,
-           pa_cvolume_snprint(cv, sizeof(cv), &i->volume),
            pa_sample_spec_valid(&i->sample_spec) ? pa_sample_spec_snprint(s, sizeof(s), &i->sample_spec) : _("n/a"),
            pa_sample_spec_valid(&i->sample_spec) ? pa_channel_map_snprint(cm, sizeof(cm), &i->channel_map) : _("n/a"),
-           (double) i->duration/1000000,
+           pa_cvolume_snprint(cv, sizeof(cv), &i->volume),
+           pa_sw_cvolume_snprint_dB(cvdb, sizeof(cvdb), &i->volume),
+           pa_cvolume_get_balance(&i->channel_map, &i->volume),
+           (double) i->duration/1000000.0,
            t,
            pa_yes_no(i->lazy),
            i->filename ? i->filename : _("n/a"),
-           pl = pa_proplist_to_string(i->proplist));
+           pl = pa_proplist_to_string_sep(i->proplist, "\n\t\t"));
 
     pa_xfree(pl);
 }
@@ -579,7 +629,7 @@ static void context_state_callback(pa_context *c, void *userdata) {
                     break;
 
                 case LIST:
-                    actions = 8;
+                    actions = 7;
                     pa_operation_unref(pa_context_get_module_info_list(c, get_module_info_callback, NULL));
                     pa_operation_unref(pa_context_get_sink_info_list(c, get_sink_info_callback, NULL));
                     pa_operation_unref(pa_context_get_source_info_list(c, get_source_info_callback, NULL));

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list