Unexpected audio fade-in with some USB audio cards when using SDL audio driver pulse/automatic
Now this is a really strange behavior I'm experiencing with melt (and Kdenlive) with one of my USB audio interfaces, but not with another one. When playing a video clip with audio in melt using the SDL audio driver pulse, there's an annoying slow audio fade-in from silence (to -10dB) taking around ~2secs. This slow audio fade-in isn't in the clip. For comparison, other applications, such as VLC, aren't affected by this unwanted fade-in at all. When I stop and resume playing in melt, there's no more unwanted fading-in, but audio is immediately playing back at the correct levels. So it looks to me as if it is caused by opening the connection to an audio backend/driver.
The fade-in manifests itself when either running melt clip.mp4 or SDL_AUDIODRIVER=pulse melt clip.mp4. The fade-in disappears when running SDL_AUDIODRIVER=alsa melt clip.mp4. You can take any audio/video clip you want, it's always the same with some USB audio interfaces when using PulseAudio -- which seems to be the preference by SDL and/or MLT(?).
The effect is much worse when using Kdenlive, while using PulseAudio, editing audio and voice overs becomes basically impossible.
What really looks strange to me: when I have an open Kdenlive instance running with its audio backend set to "SDL" and the audio driver set to "ALSA", the fade-in disappears from melt playback, even if melt is using PulseAudio then.
I'm not sure if this is a bug in MLT, or rather MLT gets affected depending on the API calls it makes. But in the hope that MLT might become even greater (not that it would really need to), I'm filing this issue.
For reference, the Steinberg UR22mkII is affected by the PulseAudio/melt fade-in, while the Behringer QX1202USB isn't affected at all. Both audio interfaces are driven by the stock Linux USB audio kernel module(s).