mirror of https://github.com/jetkvm/kvm.git
Fix: linter errors
This commit is contained in:
parent
1e1677b35a
commit
e360348829
|
@ -91,4 +91,4 @@ func StopAudioOutputStreaming() {
|
||||||
for atomic.LoadInt32(&outputStreamingRunning) == 1 {
|
for atomic.LoadInt32(&outputStreamingRunning) == 1 {
|
||||||
time.Sleep(10 * time.Millisecond)
|
time.Sleep(10 * time.Millisecond)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,13 +12,13 @@ import (
|
||||||
// AudioRelay handles forwarding audio frames from the audio server subprocess
|
// AudioRelay handles forwarding audio frames from the audio server subprocess
|
||||||
// to WebRTC without any CGO audio processing. This runs in the main process.
|
// to WebRTC without any CGO audio processing. This runs in the main process.
|
||||||
type AudioRelay struct {
|
type AudioRelay struct {
|
||||||
client *AudioClient
|
client *AudioClient
|
||||||
ctx context.Context
|
ctx context.Context
|
||||||
cancel context.CancelFunc
|
cancel context.CancelFunc
|
||||||
wg sync.WaitGroup
|
wg sync.WaitGroup
|
||||||
logger *zerolog.Logger
|
logger *zerolog.Logger
|
||||||
running bool
|
running bool
|
||||||
mutex sync.RWMutex
|
mutex sync.RWMutex
|
||||||
|
|
||||||
// WebRTC integration
|
// WebRTC integration
|
||||||
audioTrack AudioTrackWriter
|
audioTrack AudioTrackWriter
|
||||||
|
@ -35,8 +35,6 @@ type AudioTrackWriter interface {
|
||||||
WriteSample(sample media.Sample) error
|
WriteSample(sample media.Sample) error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// NewAudioRelay creates a new audio relay for the main process
|
// NewAudioRelay creates a new audio relay for the main process
|
||||||
func NewAudioRelay() *AudioRelay {
|
func NewAudioRelay() *AudioRelay {
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
|
@ -195,4 +193,4 @@ func (r *AudioRelay) incrementDropped() {
|
||||||
r.mutex.Lock()
|
r.mutex.Lock()
|
||||||
r.framesDropped++
|
r.framesDropped++
|
||||||
r.mutex.Unlock()
|
r.mutex.Unlock()
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,4 +106,4 @@ func UpdateAudioRelayTrack(audioTrack AudioTrackWriter) error {
|
||||||
// Update the track in the existing relay
|
// Update the track in the existing relay
|
||||||
globalRelay.UpdateTrack(audioTrack)
|
globalRelay.UpdateTrack(audioTrack)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue