Feature request: option to apply 6dB gain to DSD files during playback #368
Labels
No labels
2230
2243
App version
Apple OS errata
Apple SDK
bug
bugsnag
build
dlt
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: chris/Cog#368
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
DSD content is typically mastered at -6dB full scale per the Scarlet Book SACD specification. The result of this is that playback levels can vary dramatically between DSD and PCM content. It would be nice to have an option to apply 6dB of gain to DSD files during playback to level this out.
I may add an option for this. I wasn't aware that DSD mastering targeted a reduced volume level. That may explain why the decimator I borrowed in the first place was built to apply a 2.0x / +6 dB gain, instead of targeting 0 gain.
Interestingly enough, both FFmpeg and WavPack default to outputting through their own decimators which target 0 gain. FFmpeg, in fact, cannot output anything but PCM, unless you go in and dodge using libavcodec with the output of libavformat just for the four DSD codecs. (2x2 matrix of: Most significant bit first or least significant bit first, planar or interleaved. My decoder normalizes these to MSB interleaved, because that's what the decimator expects.)
Cog currently commands WavPack (easy) and FFmpeg (a bit complicated) to output DSD directly to the player. Maybe if someone wants me to figure out some way to bypass macOS's sound output and output directly to a DSD capable sound device, and wants to send me the hardware or the money to buy the hardware that can do this, I may look into supporting it. For now, it takes the path of least resistance and converts DSD to high sample rate PCM.
Oh, yeah, and also, due to limitations of the sound output API I use now (mainly to support the AirPods positional audio), I can only output 192 kHz mono/stereo, or 352800 Hz surround, "safe" values I found from testing. I'm not sure if newer macOS fixed these limitations. I found that exceeding the limitations would cause the sound output to do funny things or even crash. I also keep another downsampler running to run the visualizations at a consistent sample rate.