Repository navigation
[FFmpeg] Add .dsf to extension list (DSD support) - #1336
Conversation
|
@gavtroy, are you still working on this? |
|
I looked into why the limit was 384000 and the resampling was actually working fine, the limit was from the output side (pulse). Do note that although this seems to work fine I'm not absolutely confident if it's "right". Forcing a higher sample rate to a lower sample rate like this behaves completely normally, but doing the opposite is clearly broken - the audio cuts off early and seeking is a bit weird. I think it probably just breaks some assumption we make about the output not growing and that the high->low case is fine, but ideally I'd understand it properly and right now I just don't have the energy to do that. In any case we only downsample when it's >384000 so this isn't relevant for pretty much anything except DSD128. By the way if it's helpful, I just searched https://archive.org/search?query=dsd128 for something to test that case. |
There was a problem hiding this comment.
Code makes sense, shouldn't cause regressions, and seems to work fine with DSD on AAudio and PulseAudio.
The bugfix also fixes playback of 24/32-bit files with ffmpeg.
I think it probably just breaks some assumption we make about the output not growing and that the high->low case is fine, but ideally I'd understand it properly and right now I just don't have the energy to do that
It's not apparent to me either, but this works, and why higher sample rates don't is something we can figure out later, probably when I implement #1328.
In any case we only downsample when it's >384000 so this isn't relevant for pretty much anything except DSD128.
Agreed. This change doesn't affect lower sample rates, and ones higher than this are rarely seen in mainstream formats.
|
@flyingmutant, this should be rebase-merged since the sample size fix commit is a separate (but related) bugfix. |
+ resample to a lower sample rate if needed, as some variants of DSD exceed the 524kHz we support internally -- and the 384kHz limit of at least some outputs (pulse). Fixes cmus#796.
406edec to
ff6317b
Compare
+ resample to a lower sample rate if needed, as some variants of DSD exceed the 524kHz we support internally -- and the 384kHz limit of at least some outputs (pulse).
Fixes #796.