feat(audio): add an Audio Inspector tool (closes #94) - #95
Merged
Conversation
Import any audio file the browser can decode and see its duration, channel count, size, type and a waveform — decoded locally, nothing uploaded. No dependencies, no licensing. Because decodeAudioData resamples to the AudioContext's rate, the decoded sample rate is not the file's. So the true sample rate and bit depth are read straight from the WAV header when the file is a WAV; compressed formats contribute duration, channels and the waveform, with a note that sample rate/bit depth are WAV-only. - Pure formatting + WAV-header parsing (`audioInfo.js`) is unit-tested; the waveform reuses the editor's `computePeaks`. - Registered as the `audio-inspector` tool. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Import any audio file the browser can decode and see its duration, channel count, size, type and a waveform — decoded locally, nothing uploaded. No dependencies, no licensing.
Accuracy note:
decodeAudioDataresamples to the AudioContext's rate, so the decoded sample rate isn't the file's. The true sample rate and bit depth are read straight from the WAV header when the file is a WAV; compressed formats contribute duration, channels and the waveform, with a note that sample rate/bit depth are WAV-only.audioInfo.js) is unit-tested; the waveform reuses the editor'scomputePeaks.audio-inspectortool.Verification
Closes #94
🤖 Generated with Claude Code