The confusion arises from the fact that the decibel (dB) is a relative unit of measurement, not an absolute one. The dB scale in audio can reference different things depending on the context, which can make interpreting dB values somewhat challenging.
For example, the dB value in digital audio is usually a measure of amplitude relative to the maximum possible amplitude before clipping (distortion) occurs. This is called dBFS (decibels relative to Full Scale), where 0 dBFS is the maximum possible level, and everything else is negative. So, when you see a dB value of -40 or -10 in your Sonic Visualizer app, it's showing you how much quieter the signal is compared to the maximum possible level.
On the other hand, when we talk about the audibility threshold in terms of decibels, we're usually using a different reference point, often Sound Pressure Level (SPL). The "threshold of hearing" is typically defined as 0 dB SPL, which corresponds to the quietest sound that the average human ear can hear. Sounds that are louder than this threshold have positive dB SPL values, and sounds that are quieter have negative dB SPL values. However, in practice, sounds quieter than the threshold of hearing are not usually discussed, because they're... well, inaudible.
So, to directly answer your question: the dB values you're seeing in your audio software don't directly translate to dB SPL values in audibility studies. They're relative to different reference points. The 0 dBFS in digital audio doesn't correspond to 0 dB SPL. Instead, 0 dBFS is the highest level a digital system can handle, while 0 dB SPL is the quietest sound the average human ear can detect.
Moreover, the mapping from dBFS to dB SPL can vary widely depending on factors like the specific hardware used for playback, the volume setting on that hardware, distance from the speakers, ambient noise levels, and so on. There's not a fixed conversion between the two: what might be -20 dBFS in your digital audio file could end up being played back at any number of dB SPL in the real world, depending on these factors.