mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
* show flags value when dumping sink/source info in pactl.
* show volume for sources, too * show value of "mute" field for sinks/sources git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@662 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
f6d95b7291
commit
a546c76a1c
1 changed files with 15 additions and 7 deletions
|
|
@ -175,7 +175,8 @@ static void get_sink_info_callback(pa_context *c, const pa_sink_info *i, int is_
|
|||
"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 @@ static void get_sink_info_callback(pa_context *c, const pa_sink_info *i, int is_
|
|||
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 @@ static void get_source_info_callback(pa_context *c, const pa_source_info *i, int
|
|||
"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,8 +232,11 @@ static void get_source_info_callback(pa_context *c, const pa_source_info *i, int
|
|||
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" : "");
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue