Audio mixing with ADDER results in broken sound

George Kiagiadakis kiagiadakis.george at gmail.com
Fri Nov 25 01:00:09 PST 2011


On Wed, Nov 23, 2011 at 2:59 PM, Karl Phillip <maxphil at gmail.com> wrote:
> Hi all,
>
> I'm using QtGStreamer-0.10 to play a mp3 file and I'm having difficulties
> finding out why the resulting sound is so horrible. I wrote the smallest
> application possible to reproduce the problem I'm facing.
>
> I'm working on a "audio mixer" component that allows you to have multiple
> audio players instantiated and running. It's job is to mix all audio
> received by the players and chose to do this task myself because the
> soundcard I have is terrible and can't deal with 8, 9 audio players
> simultaneously. So I'm hoping to make it's job easier by sending it only one
> audio stream.
>
> Let's jump into the code! The application below sets up 2 pipelines: the
> first named "_ms_pipeline" (as in master pipeline), and its responsible for
> mixing the audio using only 2 elements: an ADDER linked to AUTOAUDIOSINK.
>
> The second pipeline, named only "pipeline", loads the file from the disk
> through FILESRC, decodes it, does some stuff using the following elements:
> APPSRC > VOLUME > AUDIOCONVERT > AUDIORESAMPLE > CAPSFILTER.
>
> At the end I connect the src pad of CAPSFILTER to a sink pad of the ADDER,
> then set the state of the pipelines to QGst::StatePlaying to start playing
> the audio.
>

Why are you doing this with two pipelines instead of one? The problem
is likely a synchronization problem between the two pipelines. Try
linking directly the pads in the first pipeline without using
appsink/appsrc.


More information about the gstreamer-devel mailing list