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 return typeof document !== 'undefined' && document.hidden === true
} }
export function resolveNativeCapturePollDelay(chunkCount: number): number { function resolveNativeCapturePollDelay(chunkCount: number): number {
if (isDocumentHidden()) { if (isDocumentHidden()) {
return 16 return 16
} }
-8
View File
@@ -253,18 +253,10 @@ export class AudioRouter {
} }
} }
setSampleRate(rate: number): void {
this._sampleRate = rate
}
getSampleRate(): number { getSampleRate(): number {
return this._sampleRate return this._sampleRate
} }
setCapturing(capturing: boolean): void {
this._capturing = capturing
}
isCapturing(): boolean { isCapturing(): boolean {
return this._capturing return this._capturing
} }
@@ -127,28 +127,6 @@ export class NativeVisualizerTransport {
this.demand = nextDemand 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 { handleChunk(left: Float32Array, right: Float32Array, meta: NativeVisualizerTransportChunkMeta = {}): void {
if (!this.capturing || !this.bridge.isAvailable()) { if (!this.capturing || !this.bridge.isAvailable()) {
return return
-1
View File
@@ -699,7 +699,6 @@ test('NativeVisualizerTransport resets cached state on session changes and sampl
}) })
assert.deepEqual(Array.from(transport.getLatestSpectrumMagnitudes() ?? []), [1, 1]) assert.deepEqual(Array.from(transport.getLatestSpectrumMagnitudes() ?? []), [1, 1])
transport.setSampleRate(96000)
transport.reset({ transport.reset({
sessionId: 8, sessionId: 8,
sampleRate: 96000, sampleRate: 96000,