[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.12-121-g28af994

Lennart Poettering gitmailer-noreply at 0pointer.de
Fri Oct 3 08:46:16 PDT 2008


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  33b186e74dc2de6fa363d10d3450c354ec99f864 (commit)

- Log -----------------------------------------------------------------
28af994... increase PA_CVOLUME_SNPRINT_MAX to a proper value and document that it is not considered part of the ABI
bde142c... when checking the validity of a cvolume check whether all values are not -1
c0a9e8b... add missing calls to map file
ebb2ecb... add new API call pa_cvolume_compatible()
619ed8a... add new API call pa_cvolume_snprint_dB()
be77bcd... add new API call pa_cvolume_init()
db975c7... extend documentation for pa_channel_map_init()
2367212... make a few casts explicit to remove compiler warnings
7c2cb77... a bit of late pa_bool_t'ization
d56f375... treat a channel map only then as compatible with a sample spec if it is valid
8919898... add new API function pa_sample_spec_init()
8a50105... if a volume or channel map is invalid show so when printing it
-----------------------------------------------------------------------

Summary of changes:
 src/map-file                |    4 ++
 src/pulse/channelmap.c      |   13 +++++++
 src/pulse/channelmap.h      |   10 ++++-
 src/pulse/sample.c          |   12 ++++++-
 src/pulse/sample.h          |   11 +++++-
 src/pulse/volume.c          |   78 +++++++++++++++++++++++++++++++++++++++++--
 src/pulse/volume.h          |   27 ++++++++++++++-
 src/pulsecore/namereg.c     |    2 +-
 src/pulsecore/namereg.h     |    2 +-
 src/pulsecore/sample-util.c |    4 +-
 src/tests/voltest.c         |   12 +++++++
 11 files changed, 162 insertions(+), 13 deletions(-)

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

commit 8a50105fe0568598ef5bc0f5360d60536a8bf5cd
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Oct 3 15:16:26 2008 +0200

    if a volume or channel map is invalid show so when printing it

diff --git a/src/pulse/channelmap.c b/src/pulse/channelmap.c
index 3730875..db6577e 100644
--- a/src/pulse/channelmap.c
+++ b/src/pulse/channelmap.c
@@ -466,6 +466,13 @@ char* pa_channel_map_snprint(char *s, size_t l, const pa_channel_map *map) {
     pa_assert(l > 0);
     pa_assert(map);
 
+    pa_init_i18n();
+
+    if (!pa_channel_map_valid(map)) {
+        pa_snprintf(s, l, _("(invalid)"));
+        return s;
+    }
+
     *(e = s) = 0;
 
     for (channel = 0; channel < map->channels && l > 1; channel++) {
diff --git a/src/pulse/sample.c b/src/pulse/sample.c
index 93da246..39891d2 100644
--- a/src/pulse/sample.c
+++ b/src/pulse/sample.c
@@ -131,7 +131,7 @@ char *pa_sample_spec_snprint(char *s, size_t l, const pa_sample_spec *spec) {
     pa_init_i18n();
 
     if (!pa_sample_spec_valid(spec))
-        pa_snprintf(s, l, _("Invalid"));
+        pa_snprintf(s, l, _("(invalid)"));
     else
         pa_snprintf(s, l, "%s %uch %uHz", pa_sample_format_to_string(spec->format), spec->channels, spec->rate);
 
diff --git a/src/pulse/volume.c b/src/pulse/volume.c
index 6907dc8..60a86be 100644
--- a/src/pulse/volume.c
+++ b/src/pulse/volume.c
@@ -26,6 +26,7 @@
 #include <stdio.h>
 #include <string.h>
 
+#include <pulse/i18n.h>
 #include <pulsecore/core-util.h>
 #include <pulsecore/macro.h>
 
@@ -134,6 +135,13 @@ char *pa_cvolume_snprint(char *s, size_t l, const pa_cvolume *c) {
     pa_assert(l > 0);
     pa_assert(c);
 
+    pa_init_i18n();
+
+    if (!pa_cvolume_valid(c)) {
+        pa_snprintf(s, l, _("(invalid)"));
+        return s;
+    }
+
     *(e = s) = 0;
 
     for (channel = 0; channel < c->channels && l > 1; channel++) {

commit 891989896d8c8c2d3645933c7ff93527d4eb4a9c
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Oct 3 17:13:17 2008 +0200

    add new API function pa_sample_spec_init()

diff --git a/src/pulse/sample.c b/src/pulse/sample.c
index 39891d2..2950159 100644
--- a/src/pulse/sample.c
+++ b/src/pulse/sample.c
@@ -80,6 +80,16 @@ size_t pa_usec_to_bytes(pa_usec_t t, const pa_sample_spec *spec) {
     return (size_t) (((t * spec->rate) / PA_USEC_PER_SEC)) * pa_frame_size(spec);
 }
 
+pa_sample_spec* pa_sample_spec_init(pa_sample_spec *spec) {
+    pa_assert(spec);
+
+    spec->format = PA_SAMPLE_INVALID;
+    spec->rate = 0;
+    spec->channels = 0;
+
+    return spec;
+}
+
 int pa_sample_spec_valid(const pa_sample_spec *spec) {
     pa_assert(spec);
 
diff --git a/src/pulse/sample.h b/src/pulse/sample.h
index 3f1b2fc..0053bf0 100644
--- a/src/pulse/sample.h
+++ b/src/pulse/sample.h
@@ -232,6 +232,11 @@ pa_usec_t pa_bytes_to_usec(uint64_t length, const pa_sample_spec *spec) PA_GCC_P
  * return values. \since 0.9 */
 size_t pa_usec_to_bytes(pa_usec_t t, const pa_sample_spec *spec) PA_GCC_PURE;
 
+/** Initialize the specified sample spec and return a pointer to
+ * it. The sample spec will have a defined state but
+ * pa_sample_spec_valid() will fail for it. \since 0.9.13 */
+pa_sample_spec* pa_sample_spec_init(pa_sample_spec *spec);
+
 /** Return non-zero when the sample type specification is valid */
 int pa_sample_spec_valid(const pa_sample_spec *spec) PA_GCC_PURE;
 

commit d56f3751fe234162ee71c573fd4be9086af35ea4
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Oct 3 17:14:02 2008 +0200

    treat a channel map only then as compatible with a sample spec if it is valid

diff --git a/src/pulse/channelmap.c b/src/pulse/channelmap.c
index db6577e..fd313bd 100644
--- a/src/pulse/channelmap.c
+++ b/src/pulse/channelmap.c
@@ -569,5 +569,11 @@ int pa_channel_map_compatible(const pa_channel_map *map, const pa_sample_spec *s
     pa_assert(map);
     pa_assert(ss);
 
+    if (!pa_channel_map_valid(map))
+        return 0;
+
+    if (!pa_sample_spec_valid(ss))
+        return 0;
+
     return map->channels == ss->channels;
 }

commit 7c2cb775836abc700a8b1e68831ff914ef726303
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Oct 3 17:14:35 2008 +0200

    a bit of late pa_bool_t'ization

diff --git a/src/pulsecore/namereg.c b/src/pulsecore/namereg.c
index ad697ed..ad702e4 100644
--- a/src/pulsecore/namereg.c
+++ b/src/pulsecore/namereg.c
@@ -97,7 +97,7 @@ void pa_namereg_free(pa_core *c) {
     pa_hashmap_free(c->namereg, NULL, NULL);
 }
 
-const char *pa_namereg_register(pa_core *c, const char *name, pa_namereg_type_t type, void *data, int fail) {
+const char *pa_namereg_register(pa_core *c, const char *name, pa_namereg_type_t type, void *data, pa_bool_t fail) {
     struct namereg_entry *e;
     char *n = NULL;
 
diff --git a/src/pulsecore/namereg.h b/src/pulsecore/namereg.h
index 3c1de8e..f458100 100644
--- a/src/pulsecore/namereg.h
+++ b/src/pulsecore/namereg.h
@@ -35,7 +35,7 @@ typedef enum pa_namereg_type {
 
 void pa_namereg_free(pa_core *c);
 
-const char *pa_namereg_register(pa_core *c, const char *name, pa_namereg_type_t type, void *data, int fail);
+const char *pa_namereg_register(pa_core *c, const char *name, pa_namereg_type_t type, void *data, pa_bool_t fail);
 void pa_namereg_unregister(pa_core *c, const char *name);
 void* pa_namereg_get(pa_core *c, const char *name, pa_namereg_type_t type, pa_bool_t autoload);
 int pa_namereg_set_default(pa_core*c, const char *name, pa_namereg_type_t type);

commit 2367212ec3bf399fba070994619b4caa749f89b8
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Oct 3 17:14:58 2008 +0200

    make a few casts explicit to remove compiler warnings

diff --git a/src/pulsecore/sample-util.c b/src/pulsecore/sample-util.c
index 5119ebd..7b9ac7b 100644
--- a/src/pulsecore/sample-util.c
+++ b/src/pulsecore/sample-util.c
@@ -105,7 +105,7 @@ static void calc_linear_integer_volume(int32_t linear[], const pa_cvolume *volum
     pa_assert(volume);
 
     for (channel = 0; channel < volume->channels; channel++)
-        linear[channel] = lrint(pa_sw_volume_to_linear(volume->values[channel]) * 0x10000);
+        linear[channel] = (int32_t) lrint(pa_sw_volume_to_linear(volume->values[channel]) * 0x10000);
 }
 
 static void calc_linear_float_volume(float linear[], const pa_cvolume *volume) {
@@ -132,7 +132,7 @@ static void calc_linear_integer_stream_volumes(pa_mix_info streams[], unsigned n
 
         for (channel = 0; channel < spec->channels; channel++) {
             pa_mix_info *m = streams + k;
-            m->linear[channel].i = lrint(pa_sw_volume_to_linear(m->volume.values[channel]) * linear[channel] * 0x10000);
+            m->linear[channel].i = (int32_t) lrint(pa_sw_volume_to_linear(m->volume.values[channel]) * linear[channel] * 0x10000);
         }
     }
 }

commit db975c7127c15a527ef6277a695eba2870613637
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Oct 3 17:15:43 2008 +0200

    extend documentation for pa_channel_map_init()

diff --git a/src/pulse/channelmap.h b/src/pulse/channelmap.h
index d2dd6f8..8ea3dae 100644
--- a/src/pulse/channelmap.h
+++ b/src/pulse/channelmap.h
@@ -175,7 +175,9 @@ typedef struct pa_channel_map {
     /**< Channel labels */
 } pa_channel_map;
 
-/** Initialize the specified channel map and return a pointer to it */
+/** Initialize the specified channel map and return a pointer to
+ * it. The channel map will have a defined state but
+ * pa_channel_map_valid() will fail for it. */
 pa_channel_map* pa_channel_map_init(pa_channel_map *m);
 
 /** Initialize the specified channel map for monoaural audio and return a pointer to it */

commit be77bcd9ad7e51e51cb3c84d2aed9bd13ddd0a27
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Oct 3 17:16:55 2008 +0200

    add new API call pa_cvolume_init()

diff --git a/src/pulse/volume.c b/src/pulse/volume.c
index 60a86be..7c0522e 100644
--- a/src/pulse/volume.c
+++ b/src/pulse/volume.c
@@ -47,6 +47,19 @@ int pa_cvolume_equal(const pa_cvolume *a, const pa_cvolume *b) {
     return 1;
 }
 
+pa_cvolume* pa_cvolume_init(pa_cvolume *a) {
+    unsigned c;
+
+    pa_assert(a);
+
+    a->channels = 0;
+
+    for (c = 0; c < PA_CHANNELS_MAX; c++)
+        a->values[c] = (pa_volume_t) -1;
+
+    return a;
+}
+
 pa_cvolume* pa_cvolume_set(pa_cvolume *a, unsigned channels, pa_volume_t v) {
     int i;
 
@@ -88,7 +101,7 @@ pa_volume_t pa_cvolume_max(const pa_cvolume *a) {
 }
 
 pa_volume_t pa_sw_volume_multiply(pa_volume_t a, pa_volume_t b) {
-    return pa_sw_volume_from_linear(pa_sw_volume_to_linear(a)* pa_sw_volume_to_linear(b));
+    return pa_sw_volume_from_linear(pa_sw_volume_to_linear(a) * pa_sw_volume_to_linear(b));
 }
 
 #define USER_DECIBEL_RANGE 60
diff --git a/src/pulse/volume.h b/src/pulse/volume.h
index d612c7f..4b2f3a7 100644
--- a/src/pulse/volume.h
+++ b/src/pulse/volume.h
@@ -116,6 +116,11 @@ typedef struct pa_cvolume {
 /** Return non-zero when *a == *b */
 int pa_cvolume_equal(const pa_cvolume *a, const pa_cvolume *b) PA_GCC_PURE;
 
+/** Initialize the specified volume and return a pointer to
+ * it. The sample spec will have a defined state but
+ * pa_cvolume_valid() will fail for it. \since 0.9.13 */
+pa_cvolume* pa_cvolume_init(pa_cvolume *a);
+
 /** Set the volume of all channels to PA_VOLUME_NORM */
 #define pa_cvolume_reset(a, n) pa_cvolume_set((a), (n), PA_VOLUME_NORM)
 

commit 619ed8a82d05ec2c505600ed6937574739220400
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Oct 3 17:42:38 2008 +0200

    add new API call pa_cvolume_snprint_dB()

diff --git a/src/map-file b/src/map-file
index 67a5ee3..2ef2ad6 100644
--- a/src/map-file
+++ b/src/map-file
@@ -103,6 +103,7 @@ pa_cvolume_max;
 pa_cvolume_remap;
 pa_cvolume_set;
 pa_cvolume_snprint;
+pa_cvolume_snprint_dB;
 pa_cvolume_valid;
 pa_ext_stream_restore_delete;
 pa_ext_stream_restore_read;
diff --git a/src/pulse/volume.c b/src/pulse/volume.c
index 7c0522e..4d5fcf0 100644
--- a/src/pulse/volume.c
+++ b/src/pulse/volume.c
@@ -141,7 +141,7 @@ double pa_sw_volume_to_linear(pa_volume_t v) {
 
 char *pa_cvolume_snprint(char *s, size_t l, const pa_cvolume *c) {
     unsigned channel;
-    int first = 1;
+    pa_bool_t first = TRUE;
     char *e;
 
     pa_assert(s);
@@ -164,7 +164,38 @@ char *pa_cvolume_snprint(char *s, size_t l, const pa_cvolume *c) {
                       (c->values[channel]*100)/PA_VOLUME_NORM);
 
         e = strchr(e, 0);
-        first = 0;
+        first = FALSE;
+    }
+
+    return s;
+}
+
+char *pa_cvolume_snprint_dB(char *s, size_t l, const pa_cvolume *c) {
+    unsigned channel;
+    pa_bool_t first = TRUE;
+    char *e;
+
+    pa_assert(s);
+    pa_assert(l > 0);
+    pa_assert(c);
+
+    pa_init_i18n();
+
+    if (!pa_cvolume_valid(c)) {
+        pa_snprintf(s, l, _("(invalid)"));
+        return s;
+    }
+
+    *(e = s) = 0;
+
+    for (channel = 0; channel < c->channels && l > 1; channel++) {
+        l -= pa_snprintf(e, l, "%s%u: %0.2f dB",
+                      first ? "" : " ",
+                      channel,
+                      pa_sw_volume_to_dB(c->values[channel]));
+
+        e = strchr(e, 0);
+        first = FALSE;
     }
 
     return s;
diff --git a/src/pulse/volume.h b/src/pulse/volume.h
index 4b2f3a7..d6eb606 100644
--- a/src/pulse/volume.h
+++ b/src/pulse/volume.h
@@ -136,6 +136,16 @@ pa_cvolume* pa_cvolume_set(pa_cvolume *a, unsigned channels, pa_volume_t v);
 /** Pretty print a volume structure */
 char *pa_cvolume_snprint(char *s, size_t l, const pa_cvolume *c);
 
+/** Maximum length of the strings returned by
+ * pa_cvolume_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.13 */
+#define PA_CVOLUME_SNPRINT_DB_MAX 448
+
+/** Pretty print a volume structure but show dB values. \since 0.9.13 */
+char *pa_cvolume_snprint_dB(char *s, size_t l, const pa_cvolume *c);
+
 /** Return the average volume of all channels */
 pa_volume_t pa_cvolume_avg(const pa_cvolume *a) PA_GCC_PURE;
 
diff --git a/src/tests/voltest.c b/src/tests/voltest.c
index 5b26c0f..bbf3ea1 100644
--- a/src/tests/voltest.c
+++ b/src/tests/voltest.c
@@ -5,6 +5,7 @@
 
 int main(int argc, char *argv[]) {
     pa_volume_t v;
+    pa_cvolume cv;
 
     for (v = PA_VOLUME_MUTED; v <= PA_VOLUME_NORM*2; v += 256) {
 
@@ -13,6 +14,17 @@ int main(int argc, char *argv[]) {
 
         printf("Volume: %3i; percent: %i%%; decibel %0.2f; linear = %0.2f; volume(decibel): %3i; volume(linear): %3i\n",
                v, (v*100)/PA_VOLUME_NORM, dB, f, pa_sw_volume_from_dB(dB), pa_sw_volume_from_linear(f));
+    }
+
+    for (v = PA_VOLUME_MUTED; v <= PA_VOLUME_NORM*2; v += 256) {
+        char s[PA_CVOLUME_SNPRINT_MAX], t[PA_CVOLUME_SNPRINT_DB_MAX];
+
+        pa_cvolume_set(&cv, 2, v);
+
+        printf("Volume: %3i [%s] [%s]\n",
+               v,
+               pa_cvolume_snprint(s, sizeof(s), &cv),
+               pa_cvolume_snprint_dB(t, sizeof(t), &cv));
 
     }
 

commit ebb2ecbe12b30ced855b6497d903e3250e356327
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Oct 3 17:43:40 2008 +0200

    add new API call pa_cvolume_compatible()

diff --git a/src/map-file b/src/map-file
index 2ef2ad6..7f38be1 100644
--- a/src/map-file
+++ b/src/map-file
@@ -98,6 +98,7 @@ pa_context_unload_module;
 pa_context_unref;
 pa_cvolume_avg;
 pa_cvolume_channels_equal_to;
+pa_cvolume_compatible;
 pa_cvolume_equal;
 pa_cvolume_max;
 pa_cvolume_remap;
diff --git a/src/pulse/volume.c b/src/pulse/volume.c
index 4d5fcf0..e809ef9 100644
--- a/src/pulse/volume.c
+++ b/src/pulse/volume.c
@@ -325,3 +325,17 @@ pa_cvolume *pa_cvolume_remap(pa_cvolume *v, pa_channel_map *from, pa_channel_map
     *v = result;
     return v;
 }
+
+int pa_cvolume_compatible(const pa_cvolume *v, const pa_sample_spec *ss) {
+
+    pa_assert(v);
+    pa_assert(ss);
+
+    if (!pa_cvolume_valid(v))
+        return 0;
+
+    if (!pa_sample_spec_valid(ss))
+        return 0;
+
+    return v->channels == ss->channels;
+}
diff --git a/src/pulse/volume.h b/src/pulse/volume.h
index d6eb606..90fb59e 100644
--- a/src/pulse/volume.h
+++ b/src/pulse/volume.h
@@ -192,6 +192,10 @@ double pa_sw_volume_to_linear(pa_volume_t v) PA_GCC_CONST;
 /** Remap a volume from one channel mapping to a different channel mapping. \since 0.9.12 */
 pa_cvolume *pa_cvolume_remap(pa_cvolume *v, pa_channel_map *from, pa_channel_map *to);
 
+/** Return non-zero if the specified volume is compatible with
+ * the specified sample spec. \since 0.9.13 */
+int pa_cvolume_compatible(const pa_cvolume *v, const pa_sample_spec *ss) PA_GCC_PURE;
+
 PA_C_DECL_END
 
 #endif

commit c0a9e8bfb77d5c8dbc8f788b14b3d2b02368d2e9
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Oct 3 17:44:17 2008 +0200

    add missing calls to map file

diff --git a/src/map-file b/src/map-file
index 7f38be1..50cb780 100644
--- a/src/map-file
+++ b/src/map-file
@@ -100,6 +100,7 @@ pa_cvolume_avg;
 pa_cvolume_channels_equal_to;
 pa_cvolume_compatible;
 pa_cvolume_equal;
+pa_cvolume_init;
 pa_cvolume_max;
 pa_cvolume_remap;
 pa_cvolume_set;
@@ -162,6 +163,7 @@ pa_proplist_update;
 pa_sample_format_to_string;
 pa_sample_size;
 pa_sample_spec_equal;
+pa_sample_spec_init;
 pa_sample_spec_snprint;
 pa_sample_spec_valid;
 pa_signal_done;

commit bde142c237924870e9b09d09d5d2a7186de2e249
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Oct 3 17:45:04 2008 +0200

    when checking the validity of a cvolume check whether all values are not -1

diff --git a/src/pulse/volume.c b/src/pulse/volume.c
index e809ef9..0ef02d9 100644
--- a/src/pulse/volume.c
+++ b/src/pulse/volume.c
@@ -233,11 +233,17 @@ pa_cvolume *pa_sw_cvolume_multiply(pa_cvolume *dest, const pa_cvolume *a, const
 }
 
 int pa_cvolume_valid(const pa_cvolume *v) {
+    unsigned c;
+
     pa_assert(v);
 
     if (v->channels <= 0 || v->channels > PA_CHANNELS_MAX)
         return 0;
 
+    for (c = 0; c < v->channels; c++)
+        if (v->values[c] == (pa_volume_t) -1)
+            return 0;
+
     return 1;
 }
 

commit 28af9944fe0560229efdcf9f0180568fd5a444c3
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Oct 3 17:45:55 2008 +0200

    increase PA_CVOLUME_SNPRINT_MAX to a proper value and document that it is not considered part of the ABI

diff --git a/src/pulse/channelmap.h b/src/pulse/channelmap.h
index 8ea3dae..d7d19d7 100644
--- a/src/pulse/channelmap.h
+++ b/src/pulse/channelmap.h
@@ -204,7 +204,11 @@ const char* pa_channel_position_to_string(pa_channel_position_t pos) PA_GCC_PURE
 /** Return a human readable text label for the specified channel position. \since 0.9.7 */
 const char* pa_channel_position_to_pretty_string(pa_channel_position_t pos);
 
-/** The maximum length of strings returned by pa_channel_map_snprint() */
+/** The maximum length of strings returned by
+ * pa_channel_map_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. */
 #define PA_CHANNEL_MAP_SNPRINT_MAX 336
 
 /** Make a humand readable string from the specified channel map */
diff --git a/src/pulse/sample.h b/src/pulse/sample.h
index 0053bf0..3c7dd0e 100644
--- a/src/pulse/sample.h
+++ b/src/pulse/sample.h
@@ -249,7 +249,11 @@ const char *pa_sample_format_to_string(pa_sample_format_t f) PA_GCC_PURE;
 /** Parse a sample format text. Inverse of pa_sample_format_to_string() */
 pa_sample_format_t pa_parse_sample_format(const char *format) PA_GCC_PURE;
 
-/** Maximum required string length for pa_sample_spec_snprint() */
+/** Maximum required string length for
+ * pa_sample_spec_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. */
 #define PA_SAMPLE_SPEC_SNPRINT_MAX 32
 
 /** Pretty print a sample type specification to a string */
diff --git a/src/pulse/volume.h b/src/pulse/volume.h
index 90fb59e..9f6e5f0 100644
--- a/src/pulse/volume.h
+++ b/src/pulse/volume.h
@@ -130,8 +130,12 @@ pa_cvolume* pa_cvolume_init(pa_cvolume *a);
 /** Set the volume of all channels to the specified parameter */
 pa_cvolume* pa_cvolume_set(pa_cvolume *a, unsigned channels, pa_volume_t v);
 
-/** Maximum length of the strings returned by pa_cvolume_snprint() */
-#define PA_CVOLUME_SNPRINT_MAX 64
+/** Maximum length of the strings returned by
+ * pa_cvolume_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.*/
+#define PA_CVOLUME_SNPRINT_MAX 320
 
 /** Pretty print a volume structure */
 char *pa_cvolume_snprint(char *s, size_t l, const pa_cvolume *c);

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list