macos #1
@@ -81,7 +81,7 @@ define(['./workbox-290dd570'], (function (workbox) { 'use strict';
|
||||
"revision": "3ca0b8505b4bec776b69afdba2768812"
|
||||
}, {
|
||||
"url": "index.html",
|
||||
"revision": "0.881sreuemg"
|
||||
"revision": "0.0p0vks93ec8"
|
||||
}], {});
|
||||
workbox.cleanupOutdatedCaches();
|
||||
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -491,12 +491,23 @@ export class AudioBridge extends EventEmitter {
|
||||
|
||||
const accumulator = this.liveKitFrameAccumulators.get(groupName);
|
||||
|
||||
// Vérifier que le buffer ne débordera pas
|
||||
const availableSpace = 960 - accumulator.offset;
|
||||
const samplesToCopy = Math.min(samplesReceived, availableSpace);
|
||||
|
||||
// Copier les samples dans l'accumulateur
|
||||
accumulator.buffer.set(float32Data, accumulator.offset);
|
||||
accumulator.offset += samplesReceived;
|
||||
if (samplesToCopy > 0) {
|
||||
accumulator.buffer.set(float32Data.subarray(0, samplesToCopy), accumulator.offset);
|
||||
accumulator.offset += samplesToCopy;
|
||||
}
|
||||
|
||||
// Si on a accumulé assez de samples (960), router vers les outputs
|
||||
if (accumulator.offset >= 960) {
|
||||
// Vérifier que le backend est toujours actif (évite crash pendant shutdown)
|
||||
if (!this.audioBackend) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Stocker le buffer complet pour le routing
|
||||
this.groupBuffersFromLiveKit.set(groupName, accumulator.buffer);
|
||||
|
||||
|
||||
@@ -349,7 +349,14 @@ export class LiveKitClient extends EventEmitter {
|
||||
if (this.room) {
|
||||
// Unpublish track
|
||||
if (this.localAudioTrack) {
|
||||
await this.room.localParticipant.unpublishTrack(this.localAudioTrack.sid);
|
||||
try {
|
||||
await this.room.localParticipant.unpublishTrack(this.localAudioTrack.sid);
|
||||
} catch (error) {
|
||||
// Ignorer l'erreur si le track n'existe plus (shutdown rapide)
|
||||
if (!error.message?.includes('track not found')) {
|
||||
console.warn('⚠️ Erreur unpublish track:', error.message);
|
||||
}
|
||||
}
|
||||
this.localAudioTrack = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,10 +4,8 @@ audio:
|
||||
defaultBitrate: 96
|
||||
jitterBufferMs: 40
|
||||
device:
|
||||
# Laissez null pour auto-détection du device par défaut
|
||||
# Ou spécifiez le nom exact via l'interface /admin
|
||||
inputDeviceId: alsa_input.pci-0000_00_01.0.analog-stereo
|
||||
outputDeviceId: alsa_output.pci-0000_00_01.0.analog-stereo
|
||||
inputDeviceId: Microphone MacBook Pro
|
||||
outputDeviceId: Haut-parleurs MacBook Pro
|
||||
sampleRate: 48000
|
||||
routing:
|
||||
inputToGroup:
|
||||
@@ -52,8 +50,8 @@ server:
|
||||
host: 0.0.0.0
|
||||
port: 3000
|
||||
livekit:
|
||||
url: AUTO # AUTO = détection automatique IP réseau | ou ws://IP:7880 pour manuel
|
||||
url: AUTO
|
||||
logging:
|
||||
level: debug # Changez à 'debug' pour voir plus de détails
|
||||
level: debug
|
||||
logLatency: false
|
||||
logAudioStats: false
|
||||
|
||||
Reference in New Issue
Block a user