It is currently 22 Jun 2017, 19:21



Audio overflow fixed in server 2.0.7

CasparCG Server, Client and development

Moderators: Macey, Jonas Hummelstrand, didikunz

Audio overflow fixed in server 2.0.7

Postby elanvrt » 02 Mar 2016, 16:45

When mixing multiple audio layers with levels that go near 0dB, or pushing the volume above 1, integer overflow may occur. This results in a very disturbing, crackling sound. Audio should be clipped in this case. Clipping is still a distortion, but anyway a LOT less disturbing than overflow. And clipping is what made rock 'n roll great ;-)

Because this bug bothered me (and our sound technicians) for years now, and because server 2.1.0 (where this is already fixed) is far from production-ready, I finally found time to delve into the source code and port this fix to server 2.0.7.

For those who can compile CasparCG, the modified audio_mixer.cpp can be found on github as
https://github.com/elanvrt/Server-1/blob/25298a7ea7fe59ae976d5ac953c0cd910cf7b9c6/core/mixer/audio/audio_mixer.cpp

For anyone else, I put a fixed executable on Dropbox:
https://www.dropbox.com/s/qdzujgfr14aikmp/casparcg.exe?dl=0
No, you don't really need to create a dropbox account.

Just replace your existing 2.0.7 casparcg.exe with this one. Keep a backup of the original, just in case.
Chris Van den Bossche
ELAN graphics software developer
VRT television
User avatar
elanvrt
 
Posts: 61
Joined: 22 Apr 2013, 11:50
Location: Brussels, Belgium

Re: Audio overflow fixed in server 2.0.7

Postby Theo » 07 Jun 2016, 14:21

Hi Chris,
is it also possible to put an audiodelay in there, to fix audio offset problems with playback?
Regards,
Theo Kooijmans
UniversalDV
User avatar
Theo
 
Posts: 92
Joined: 03 Jun 2012, 10:44
Location: The Netherlands

Re: Audio overflow fixed in server 2.0.7

Postby elanvrt » 27 Apr 2017, 14:48

Theo wrote:Hi Chris,
is it also possible to put an audiodelay in there, to fix audio offset problems with playback?


Hi Theo,

I'm sure it is possible if you find a programmer able to and willing to code it.
I am definitely not good enough with CCG code to do that. All I did was transfer a fix already done in 2.1.0 to 2.0.7, as 2.1.0 was yet too unreliable for on-air use at that time.
And time-shifting is also a totally different ballgame than simple real-time sample processing.
Chris Van den Bossche
ELAN graphics software developer
VRT television
User avatar
elanvrt
 
Posts: 61
Joined: 22 Apr 2013, 11:50
Location: Brussels, Belgium


Return to Tech and Development

Who is online

Users browsing this forum: No registered users and 7 guests