Playing multiple sounds independent from each other

Martijn Stommels martijn at martijnpc.nl
Sun Jan 6 11:38:58 PST 2013


Hello Gstreamer mailing-list,


I'm trying to build a jingle program (something like Jingle pallet
<http://www.jinglepalette.com/>)  using Gstreamermm and Gtkmm. In the
process of doing this, I ran into some problems. 

Because in this program, sounds need to be played when the user presses
a button. I got that working. The thing is when I try to play multiple
sounds. Here is how I think it should be done (excuse my poor 'image'):

SoundBin1
______________________________________________________________________
fileSrc -- > decoderBin -- > converter -- > resampler -- > capsFilter --
                                                                                                              
|
                                                                                                              
|
SoundBin2  
                                                                                          
|--> liveadder -- > autosink
____________________________________________________________________  |
fileSrc -- > decoderBin -- > converter -- > resampler -- > capsFilter --
                                                                                                              


This of course works fine. But when the pipeline is started both
soundbins start playing. So what I tried doing is the following:

 1. Create all elements en add them to the pipeline.
 2. Link all elements as described above.
 3. Block (using  the src pad of soundbin 1 and 2) with set_blocked(true);.

When a button is pressed, the program will unblock the corresponding
soundbin pad, seek to 0 and start the main pipeline. Now the real
problem: When the second button is clicked, it will start playing at the
time that has already elapsed. So if soundbin 1 has been playing for 5
seconds and soundbin 2 is started, soundbin 2 will begin playing at 5
seconds.


So what I really would like to know is what I am doing wrong, or if it
is even possible to do this with Gstreamer.

I searched around on the internet quite a bit but I couldn't find a
thing on how to do this.


Thanks in advance.

Regards,

Martijn

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130106/5fc75d9b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 553 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130106/5fc75d9b/attachment.pgp>


More information about the gstreamer-devel mailing list