Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: amplitude range (floating point) (Read 4595 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

amplitude range (floating point)

hello,

i use ov_read_float in my vorbis-player-project to get my pcm data.
i've noticed, that many of these floating point values are slightly out of the "official" amplitude range between -1.0f and 1.0f.
so why is that?
is it okay, just to clip it? JACK expect values *only* in range of -1 and 1.

thank you!

marco

amplitude range (floating point)

Reply #1
hello,

i use ov_read_float in my vorbis-player-project to get my pcm data.
i've noticed, that many of these floating point values are slightly out of the "official" amplitude range between -1.0f and 1.0f.
so why is that?
is it okay, just to clip it? JACK expect values *only* in range of -1 and 1.

thank you!

marco


Because the reverse transform generates transients that can peak higher than the original sound.  This is common for all transform codecs - I've seen as high as 1.5 before.  Most players are clipping this before outputting to the soundcard.  I've seen some code that will distort the audio (via tanh or similiar) in hopes that it will sound better than clipping, and I've also seen look-ahead limiting done.  These higher-than-1 peaks are one reason why ReplayGain is so popular around here