PulseAudio 无法更改某一特定程序的接收器

PulseAudio 无法更改某一特定程序的接收器

我正在尝试通过带有内置声卡的耳机播放 Telegram 中的声音。

以下是产生音频输出通道的程序列表:

$ pactl list sink-inputs      
Sink Input #4
        Driver: protocol-native.c
        Owner Module: 12
        Client: 19
        Sink: 2
        Sample Specification: s16le 2ch 44100Hz
        Channel Map: front-left,front-right
        Format: pcm, format.sample_format = "\"s16le\""  format.rate = "44100"  format.channels = "2"  format.channel_map = "\"front-left,front-right\""
        Corked: no
        Mute: no
        Volume: front-left: 42604 /  65% / -11,22 dB,   front-right: 42604 /  65% / -11,22 dB
                balance 0,00
        Buffer Latency: 30725 usec
        Sink Latency: 38824 usec
        Resample method: n/a
        Properties:
                application.icon_name = "google-chrome"
                media.name = "Playback"
                application.name = "Chrome"
                native-protocol.peer = "UNIX socket client"
                native-protocol.version = "30"
                application.process.id = "3991"
                application.process.user = "pastafarianist"
                application.process.host = "DesktopPC"
                application.process.binary = "chrome"
                window.x11.display = ":0"
                application.language = "es_ES.UTF-8"
                application.process.machine_id = <long ID>
                module-stream-restore.id = "sink-input-by-application-name:Chrome"

Sink Input #8
        Driver: protocol-native.c
        Owner Module: 12
        Client: 29
        Sink: 1                                                                                                                                                                                                                                    
        Sample Specification: float32le 2ch 44100Hz                                                                                                                                                                                                
        Channel Map: front-left,front-right                                                                                                                                                                                                        
        Format: pcm, format.sample_format = "\"float32le\""  format.channels = "2"  format.channel_map = "\"front-left,front-right\""                                                                                                              
        Corked: yes                                                                                                                                                                                                                                
        Mute: no                                                                                                                                                                                                                                   
        Volume: front-left: 36052 /  55% / -15,57 dB,   front-right: 36052 /  55% / -15,57 dB                                                                                                                                                      
                balance 0,00                                                                                                                                                                                                                       
        Buffer Latency: 69659 usec                                                                                                                                                                                                                 
        Sink Latency: 18820 usec                                                                                                                                                                                                                   
        Resample method: copy                                                                                                                                                                                                                      
        Properties:                                                                                                                                                                                                                                
                media.role = hex:                                                                                                                                                                                                                  
                phonon.streamid = hex:                                                                                                                                                                                                             
                media.name = "Playback Stream"                                                                                                                                                                                                     
                application.name = "Telegram"                                                                                                                                                                                                      
                native-protocol.peer = "UNIX socket client"                                                                                                                                                                                        
                native-protocol.version = "30"                                                                                                                                                                                                     
                application.process.id = "7257"                                                                                                                                                                                                    
                application.process.user = "pastafarianist"
                application.process.host = "DesktopPC"
                application.process.binary = "Telegram"
                application.language = "es_ES.UTF-8"
                window.x11.display = ":0"
                application.process.machine_id = <long ID>
                module-stream-restore.id = "sink-input-by-application-name:Telegram"

根据man pactl

move-sink-input ID SINK
              Move the specified playback stream 
              (identified by its numerical index)
              to the specified sink (identified
              by its symbolic name or numerical index).

但是当我尝试移动 Telegram 的频道时,

$ pactl move-sink-input 8 2
Failure: Invalid argument

移动 Chrome 有效。

$ pactl move-sink-input 4 1

不会产生任何错误。

Telegram 与 Chrome 有何不同?

答案1

这是因为 Telegram 指定音频流为 DONT_MOVE。您可以flags在输出中的字段下检查它pacmd list-sink-inputs

相关内容