mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-07-02 19:05:57 +02:00
feat: cap bit depth/sample rate on lossless conversion + WAV/AIFF
- LosslessConversionQuality model with bit depth/sample rate caps, applied only when they reduce source quality - FFmpegService probes sample rate and appends codec-specific args (-ar, -sample_fmt, -bits_per_raw_sample) for FLAC/ALAC/WAV/AIFF - Batch + single-track convert sheets expose quality cap options - Persist real converted bit depth/sample rate to history/library DB - track_metadata: recognize and convert to WAV/AIFF targets - convertedAudioQualityLabel reflects actual output quality
This commit is contained in:
@@ -1735,6 +1735,8 @@ class LibraryDatabase {
|
||||
required String newFilePath,
|
||||
required String targetFormat,
|
||||
required String bitrate,
|
||||
int? bitDepth,
|
||||
int? sampleRate,
|
||||
}) async {
|
||||
final db = await database;
|
||||
final stat = await fileStat(newFilePath);
|
||||
@@ -1755,6 +1757,10 @@ class LibraryDatabase {
|
||||
normalizedFormat == 'opus' ||
|
||||
normalizedFormat == 'aac') {
|
||||
updated['bitDepth'] = null;
|
||||
updated['sampleRate'] = null;
|
||||
} else {
|
||||
updated['bitDepth'] = bitDepth ?? item.bitDepth;
|
||||
updated['sampleRate'] = sampleRate ?? item.sampleRate;
|
||||
}
|
||||
|
||||
await db.transaction((txn) async {
|
||||
|
||||
Reference in New Issue
Block a user