[Bf-committers] Audio stuff!

neXyon nexyon at gmail.com
Mon Feb 8 01:10:11 CET 2010


Hi there!

The next bigger audio commit has been done, where I've worked on quite a 
lot of things again and now I have some things to discuss.

a) New Sequencer Audio.

The biggest part of it is the rewrite of the sequencer audio code. Audio 
is now not updated on every frame change, but every time the frame 
jumps, so if playing back with to low framerate, audio will not stutter 
as before, but just continue playing with the result that it's not in 
sync anymore.
To keep audio up to date there are 3 functions to be called: 
sound_stop_scene, sound_play_scene and sound_seek_scene.
The later does the scrubbing too (play sound on frame change when not 
currently playing back). It does the scrubbing when there is currently 
no playback and scrubbing is enabled. I currently ask if there is 
playback via if(CTX_wm_screen(C)->animtimer); I wonder if there is a 
better way to do this?

b) FFMPEG

I've enabled ogg, theora and vorbis now to check if there are bugs 
reported about that not working, because it was disabled in code with a 
simple note that it is not working... I've got it working here now after 
wasting a lot of time with ffmpeg.

I've also added wav, matroska and mp3 as new formats and flac as new 
codec. Flac is NOT working for me and I have no idea why, already asked 
in #ffmpeg in irc, but nobody has been able to help me yet. The problem 
is that avcodec_encode_audio returns 0. Is anyone able to tell me what's 
wrong or to fix it?

Moreover you can now choose mp3 and wav formats for encoding audio only, 
as well as None as video codec (which results in only audio being 
encoded as well), but there's a problem when hitting the animation 
button: blender is still rendering the images = wasting a hell lot of 
time, because they are not used. Brecht told me where the rendering can 
be disabled, but I don't want to touch that code. Someone more 
experienced with that part of blender might be as kind as to disable the 
rendering when it's not needed!

While meeting we also discussed that ffmpeg in extern can now be 
removed. If someone is willing to do that and update the scons 
configuration, feel free to do so! If you are doing so, please remove 
WITH_BF_OGG as well, as it only en-/disables the ogg support of ffmpeg 
in extern...

c) Sound Wave Drawing

Yeah, the wave drawing in the sequencer is back for cached sounds (which 
is the same as RAM sounds in 2.4x). Two points here: Number on is: There 
might be another colour used. And number two: For long strips the 
drawing is pretty slow, so one might add a user setting to en-/disable 
the drawing of the sound wave. Both tasks sound like perfect tasks for 
new blender developers. :-)

That's it for now, let the discussion begin.

Regards!


More information about the Bf-committers mailing list