[polypaudio-commits] r662 - /trunk/src/utils/pactl.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Fri Apr 7 16:05:46 PDT 2006
Author: lennart
Date: Sat Apr 8 01:05:45 2006
New Revision: 662
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=662&root=polypaudio&view=rev
Log:
* show flags value when dumping sink/source info in pactl.
* show volume for sources, too
* show value of "mute" field for sinks/sources
Modified:
trunk/src/utils/pactl.c
Modified: trunk/src/utils/pactl.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/utils/pactl.c?rev=662&root=polypaudio&r1=661&r2=662&view=diff
==============================================================================
--- trunk/src/utils/pactl.c (original)
+++ trunk/src/utils/pactl.c Sat Apr 8 01:05:45 2006
@@ -175,7 +175,8 @@
"Owner Module: %u\n"
"Volume: %s\n"
"Monitor Source: %u\n"
- "Latency: %0.0f usec\n",
+ "Latency: %0.0f usec\n"
+ "Flags: %s%s\n",
i->index,
i->name,
i->driver,
@@ -183,14 +184,16 @@
pa_sample_spec_snprint(s, sizeof(s), &i->sample_spec),
pa_channel_map_snprint(cm, sizeof(cm), &i->channel_map),
i->owner_module,
- pa_cvolume_snprint(cv, sizeof(cv), &i->volume),
+ i->mute ? "muted" : pa_cvolume_snprint(cv, sizeof(cv), &i->volume),
i->monitor_source,
- (double) i->latency);
+ (double) i->latency,
+ i->flags & PA_SINK_HW_VOLUME_CTRL ? "HW_VOLUME_CTRL " : "",
+ i->flags & PA_SINK_LATENCY ? "LATENCY" : "");
}
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], t[32], cm[PA_CHANNEL_MAP_SNPRINT_MAX];
+ char s[PA_SAMPLE_SPEC_SNPRINT_MAX], t[32], cv[PA_CVOLUME_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX];
if (is_last < 0) {
fprintf(stderr, "Failed to get source information: %s\n", pa_strerror(pa_context_errno(c)));
@@ -218,8 +221,10 @@
"Sample Specification: %s\n"
"Channel Map: %s\n"
"Owner Module: %u\n"
+ "Volume: %s\n"
"Monitor of Sink: %s\n"
- "Latency: %0.0f usec\n",
+ "Latency: %0.0f usec\n"
+ "Flags: %s%s\n",
i->index,
i->driver,
i->name,
@@ -227,9 +232,12 @@
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),
i->monitor_of_sink != PA_INVALID_INDEX ? t : "no",
- (double) i->latency);
-
+ (double) i->latency,
+ i->flags & PA_SOURCE_HW_VOLUME_CTRL ? "HW_VOLUME_CTRL " : "",
+ i->flags & PA_SOURCE_LATENCY ? "LATENCY" : "");
+
}
static void get_module_info_callback(pa_context *c, const pa_module_info *i, int is_last, void *userdata) {
More information about the pulseaudio-commits
mailing list