Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#971 Inverted samples in WAV recording when clipping

Current_GIT
closed
nobody
None
unspecified
5
2013-11-07
2013-03-14
Marc Sowen
No

I'm not sure whether this is related to Mumble or libsndfile, but when I record into a WAV file I get really heavy noise when samples are clipped. Instead of just being clipped to value 1.0 or -1.0 they somehow change sign and "jump" to the other side. To demonstrate this, I have attached a screenshot from Audacity where on the top I did a direct audio recording using Audacity and on the bottom you see the recorded WAV from Mumble of the same voice.

So, on the top this is how I would expect the waveform to look like and on the bottom you see the inverted samples. This makes the clipping noise much worse than it should be. Instead of sounding just a bit distorted, you get a very loud click noise.

I have tried and switched line 198 in VoiceRecorder.cpp from

sfinfo.format = SF_FORMAT_WAV | SF_FORMAT_PCM_24;

to

sfinfo.format = SF_FORMAT_WAV | SF_FORMAT_FLOAT;

and the inverted samples are gone. But this is probably just a work-around.

Any clue?

1 Attachments

Discussion

  • Stefan H.
    Stefan H.
    2013-11-07

    • status: open --> closed
    • Version: --> unspecified