Why is wav file mixed by soundmixer plugin truncated?

toub etienne.laurent at pa.cotte.fr
Mon Dec 4 08:53:45 UTC 2017


I develop in C an application relying on soundmixer plugin. My aim is to
trigger sounds on events. As reactivity is critical, I wish to keep
gstreamer pipeline alive, and dynamically plug new sounds on the audiomixer
element (after applying an offset on the new sink of the mixer).
It works pretty well, except that each time if plug a new sound in, the
first 200msec (more or less) of the sound get truncated.
I've been looking into the code, everything looks fine as far as I can see
(no mistake on sound plugin, neither on running time/offset applied).
So I made a try on a simple pipeline with gst-launch, with an offset applied
on the mixer sink: 

gst-launch-1.0 filesrc location=/etc/pa/doublclick_aigu_grave.wav ! wavparse
! audiomixer sink_0::offset=1000000000 ! alsasink

It turned out that this pipeline truncate the beginning of the sound as
well. When I activated the logs with --gst-debug=alsa:5, I got a bunch of
logs before sound started :

alsa gstalsasink.c:1054:gst_alsasink_write:<alsasink0> written 441 frames
out of 441

What is going on here ? Why is the sound truncated ?




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list