Hello again, I know that is has been long time since the last message about this topic, but I am still facing the same issue. The audio is still delayed in the videos. But now I have found that if I change
ulBufferSize = (ulFrequency * bytesPerSample) >> 2; by this ulBufferSize = (ulFrequency * bytesPerSample) >> 4; in the AudioSink.h file, the delay disappears in some videos. I don't understand quite well why it disappears and why it is only in some videos. The thing is that in one mpg video, the delay has completely disappeared, while with one flv video the delay has not disappeared, but has been reduced. If I convert that flv video to mpg, the delay remain the same, so I actually don't know if the problem is with the video format, the AduioSink buffer, or if it is about the libraries (osgAudio, openAL, ffmpeg...). I have tested with openAL soft and with openAL and I am getting the same behaviour with both. Anybody has any idea about this problem? Maybe the buffer change can give the clue to solve it. Thank you in advance. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Héctor Martínez Sent: viernes, 27 de enero de 2012 12:31 To: 'OpenSceneGraph Users' Subject: Re: [osg-users] Play audio files Thank you Chris for your reply. I am still trying to solve the problems. One thing that have helped me is changing this line: AudioSink(osg::AudioStream* audioStream): _started(false), _paused(false), _audioStream(audioStream) {play();} for this line: AudioSink(osg::AudioStream* audioStream): _started(false), _paused(false), _audioStream(audioStream) {} I don't know if there is a logical reason for that, but when deleting the play(), the cutting in the audio seems to disappear. OK, it still makes some cuts, but they are very small and it is possible to hear the audio without problems (with the previous cuts it was impossible to hear the audio). But I am still facing the problem of the delay. The audio starts delayed for some reason that I can't still figure out. Could it be because I am using openAL soft instead of openAL? Maybe that's not the problem, because it is working fine with audio files, but who knows... Best regards -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Chris 'Xenon' Hanson Sent: jueves, 26 de enero de 2012 18:04 To: OpenSceneGraph Users Subject: Re: [osg-users] Play audio files On 1/26/2012 2:45 AM, Héctor Martínez wrote: > Hi Laurens, > If anyone can give an idea about the problem, you are welcome. I'd love to help you, but I only wrote the FMOD side of osgAudio -- the openAL/openalpp side was part of osgAL, and I never really worked with it because I couldn't get openAL to work on my Vista box at the time. -- Chris 'Xenon' Hanson, omo sanza lettere. [email protected] http://www.alphapixel.com/ Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting. "There is no Truth. There is only Perception. To Perceive is to Exist." - Xen _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

