clean up dead code

This commit is contained in:
Boof2015
2026-03-28 16:46:26 -04:00
parent 9b22400747
commit a38b54b5e2
4 changed files with 1 additions and 32 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ function isDocumentHidden(): boolean {
return typeof document !== 'undefined' && document.hidden === true
}
export function resolveNativeCapturePollDelay(chunkCount: number): number {
function resolveNativeCapturePollDelay(chunkCount: number): number {
if (isDocumentHidden()) {
return 16
}
-8
View File
@@ -253,18 +253,10 @@ export class AudioRouter {
}
}
setSampleRate(rate: number): void {
this._sampleRate = rate
}
getSampleRate(): number {
return this._sampleRate
}
setCapturing(capturing: boolean): void {
this._capturing = capturing
}
isCapturing(): boolean {
return this._capturing
}
@@ -127,28 +127,6 @@ export class NativeVisualizerTransport {
this.demand = nextDemand
}
setSampleRate(sampleRate: number): void {
const nextSampleRate = Math.max(1, Math.floor(sampleRate) || 1)
if (nextSampleRate === this.sampleRate) {
return
}
this.sampleRate = nextSampleRate
if (!this.bridge.isAvailable()) {
return
}
if (this.demand.oscilloscope) {
this.bridge.oscilloscope.setSampleRate(nextSampleRate)
}
if (this.demand.spectrum) {
this.bridge.spectrum.setSampleRate(nextSampleRate)
}
if (this.demand.vectorscope) {
this.bridge.vectorscope.setSampleRate(nextSampleRate)
}
}
handleChunk(left: Float32Array, right: Float32Array, meta: NativeVisualizerTransportChunkMeta = {}): void {
if (!this.capturing || !this.bridge.isAvailable()) {
return