fix: mapping correct devices PipeWire inputTargetDevice/outputTargetDevice

- AudioBridge passe inputTargetDevice et outputTargetDevice à PipeWire
- Fix: PipeWire utilisait targetDevice au lieu de input/outputTargetDevice
- Devrait maintenant démarrer les streams pw-cat correctement
This commit is contained in:
2026-05-28 14:04:05 +02:00
parent 061872b2d7
commit 7e6798cf92
2 changed files with 24 additions and 12 deletions
+6 -5
View File
@@ -23,7 +23,8 @@ export class PipeWireBackend extends EventEmitter {
sampleRate: options.sampleRate || 48000,
channels: options.channels || 1,
framesPerBuffer: options.framesPerBuffer || 960,
targetDevice: options.targetDevice || null,
inputTargetDevice: options.inputTargetDevice || null,
outputTargetDevice: options.outputTargetDevice || null,
latency: options.latency || 20, // ms
...options
};
@@ -186,8 +187,8 @@ export class PipeWireBackend extends EventEmitter {
];
// Ajoute le device cible si spécifié
if (this.options.targetDevice) {
args.push(`--target=${this.options.targetDevice}`);
if (this.options.inputTargetDevice) {
args.push(`--target=${this.options.inputTargetDevice}`);
}
this.captureProcess = spawn('pw-cat', args);
@@ -258,8 +259,8 @@ export class PipeWireBackend extends EventEmitter {
'-' // Lecture depuis stdin
];
if (this.options.targetDevice) {
args.push(`--target=${this.options.targetDevice}`);
if (this.options.outputTargetDevice) {
args.push(`--target=${this.options.outputTargetDevice}`);
}
this.playbackProcess = spawn('pw-cat', args);