Hi Serge,

Robert is right, SDL only provides a very low-level sound API. If you have 
several sounds, you need to write your own software mixer.

SDL advantage is that it's very easy to use. Because it's so low level, it does 
not have obscure side effects, which is what you want when you develop a movie 
plugin. But I wouldn't recommend to use it with the FFmpeg plugin for more than 
just testing.

Libraries like OpenAL and FMOD are better suited. In fact we are using the 
FFmpeg plugin with FMOD in a commercial product, and playing several movies in 
parallel just fine. If you're interested by the FMOD audio sink, I'm sure I 
could provide you with a part of our implementation.

T

-----Original Message-----
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield
Sent: 13 January 2010 6:38 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] FFmpeg and sound

HI Serge,

I believe the SDL interface only allows for one audio channel so
implementating multiple videos would be problematic, or at least that
was be reading of the API in my brief encounter with trying to get
this working quickly.

OpenAL and other dedicated audio libs would certainly be a better bet
for handling multiple videos.  We just need to code up such a
solution.

Robert.

On Wed, Jan 13, 2010 at 6:25 PM, Serge Lages <serge.la...@gmail.com> wrote:
> Hi all,
>
> I've made some tests with the FFmpeg plugin and sound using the code from
> osgmovie (with the SDLAudioSink), it works but with limitations :
>
> - When there are multiple videos it produces random behaviors, sometimes
> only one sound from one video works, other times no sound is played.
> - When deleting my video objects, I've got a crash, I didn't had time to
> investigate where precisely it comes from yet.
>
> I'm under Windows 7 and VS9 Express, is anyone experiencing this kind of
> problem, or is having success playing multiple videos with sound ?
>
> I would also like to know if anyone knows how to control the sound volume
> with the SDL ? We should also modify the AudioSink class to allow it,
> currently there is a setVolume method on the ImageStream class but not on
> the AudioStream one.
>
> Thanks !
>
> --
> Serge Lages
> http://www.tharsis-software.com
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to