fix: remove fake FLAC export format

Removed the non-standard FLAC export option which was causing import issues:

**Problem:**
- "FLAC" export was actually a custom compressed WAV format
- Used fflate (DEFLATE compression) instead of real FLAC encoding
- Files couldn't be imported back or opened in other software
- No browser-compatible FLAC encoder library exists

**Changes:**
- Removed FLAC from export format options (WAV and MP3 only)
- Removed FLAC quality slider from ExportDialog
- Removed audioBufferToFlac function reference
- Updated ExportSettings interface to only include 'wav' | 'mp3'
- Simplified bit depth selector (WAV only instead of WAV/FLAC)
- Updated format descriptions to clarify lossy vs lossless

**Export formats now:**
-  WAV - Lossless, Uncompressed (16/24/32-bit)
-  MP3 - Lossy, Compressed (128/192/256/320 kbps)

Users can now successfully export and re-import their audio!

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-19 09:08:17 +01:00
parent 500a466bae
commit e208a448d0
2 changed files with 8 additions and 43 deletions

View File

@@ -34,7 +34,7 @@ import {
} from '@/lib/history/commands/multi-track-edit-command';
import { extractBufferSegment } from '@/lib/audio/buffer-utils';
import { mixTracks, getMaxTrackDuration } from '@/lib/audio/track-utils';
import { audioBufferToWav, audioBufferToMp3, audioBufferToFlac, downloadArrayBuffer } from '@/lib/audio/export';
import { audioBufferToWav, audioBufferToMp3, downloadArrayBuffer } from '@/lib/audio/export';
export function AudioEditor() {
const [importDialogOpen, setImportDialogOpen] = React.useState(false);
@@ -746,16 +746,8 @@ export function AudioEditor() {
});
mimeType = 'audio/mpeg';
fileExtension = 'mp3';
} else if (settings.format === 'flac') {
exportedBuffer = await audioBufferToFlac(buffer, {
format: 'flac',
bitDepth: settings.bitDepth,
quality: settings.quality,
normalize: settings.normalize,
});
mimeType = 'application/octet-stream';
fileExtension = 'flac';
} else {
// WAV export
exportedBuffer = audioBufferToWav(buffer, {
format: 'wav',
bitDepth: settings.bitDepth,