feat: add MP3 and FLAC export formats
Implemented Phase 11.1 export format support: - Added MP3 export using lamejs library - Added FLAC export using fflate DEFLATE compression - Updated ExportDialog with format selector and format-specific options - MP3: bitrate selector (128/192/256/320 kbps) - FLAC: compression quality slider (0-9) - WAV: bit depth selector (16/24/32-bit) - Updated AudioEditor to route export based on selected format - Created TypeScript declarations for lamejs - Fixed AudioStatistics to use audioBuffer instead of buffer property 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -33,20 +33,20 @@ export function AudioStatistics({ tracks, className }: AudioStatisticsProps) {
|
||||
let channels = 0;
|
||||
|
||||
tracks.forEach(track => {
|
||||
if (!track.buffer) return;
|
||||
if (!track.audioBuffer) return;
|
||||
|
||||
const duration = track.buffer.duration;
|
||||
const duration = track.audioBuffer.duration;
|
||||
maxDuration = Math.max(maxDuration, duration);
|
||||
|
||||
// Get sample rate and channels from first track
|
||||
if (sampleRate === 0) {
|
||||
sampleRate = track.buffer.sampleRate;
|
||||
channels = track.buffer.numberOfChannels;
|
||||
sampleRate = track.audioBuffer.sampleRate;
|
||||
channels = track.audioBuffer.numberOfChannels;
|
||||
}
|
||||
|
||||
// Calculate peak and RMS from buffer
|
||||
for (let ch = 0; ch < track.buffer.numberOfChannels; ch++) {
|
||||
const channelData = track.buffer.getChannelData(ch);
|
||||
for (let ch = 0; ch < track.audioBuffer.numberOfChannels; ch++) {
|
||||
const channelData = track.audioBuffer.getChannelData(ch);
|
||||
let chPeak = 0;
|
||||
let chRmsSum = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user