set-source-volume 和 set-source-output-volume 有什么区别?来源是指麦克风。那么输出音量又是多少呢?
手册页实际上没有帮助......
set-source-volume SOURCE VOLUME [VOLUME ...]
Set the volume of the specified source (identified by its symbolic name or
numerical index). VOLUME can be specified as an integer (e.g. 2000, 16384), a
linear factor (e.g. 0.4, 1.100), a percentage (e.g. 10%, 100%) or a decibel value
(e.g. 0dB, 20dB). If the volume specification start with a + or - the volume
adjustment will be relative to the current source volume. A single volume value
affects all channels; if multiple volume values are given their number has to match
the source's number of channels.
set-source-output-volume OUTPUT VOLUME [VOLUME ...]
Set the volume of the specified source output (identified by its numerical index).
VOLUME can be specified as an integer (e.g. 2000, 16384), a linear factor (e.g.
0.4, 1.100), a percentage (e.g. 10%, 100%) or a decibel value (e.g. 0dB, 20dB). If
the volume specification start with a + or - the volume adjustment will be relative
to the current source output volume. A single volume value affects all channels; if
multiple volume values are given their number has to match the source output's
number of channels.
答案1
我不太清楚使用pactl
和之间有什么区别,pacmd
但我使用后者,它有一个list-source-outputs
命令。
您可以使用 返回的索引pacmd list-source-outputs
来配置每个源输出的输出量。
例如,现在我有一个 loobpack 模块,将来自麦克风/线路输入输入的手机音乐与计算机声音混合,并将它们通过扬声器播放,我在下面单独列出:
index: 291
driver: <module-loopback.c>
flags: START_CORKED
state: RUNNING
source: 213 <alsa_input.pci-0000_00_14.2.analog-stereo>
volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
muted: no
current latency: 0.00 ms
requested latency: 66.67 ms
sample spec: s16le 2ch 44100Hz
channel map: front-left,front-right
Stereo
resample method: (null)
owner module: 204
properties:
media.role = "abstract"
module-stream-restore.id = "source-output-by-media-role:abstract"
media.name = "Loopback to Built-in Audio Analog Stereo"
media.icon_name = "audio-card-pci"
我可以使用以下命令将音量设置为 50%:
pacmd set-source-output-volume 291 32768
我当然可以根据输入做同样的事情,尽管我的粒度会更小。为了将其用作线路输入,我将音量设置为基本音量,即 10% (6554)。该输入兼作麦克风输入,因此前置放大器必须调低。
设置源接收器音量还可用于从单个相同输入获取多个接收器上的不同音量级别。你可以为前任。以 100% 录制多个主通道,同时在监视器上以不同电平混合它们。