Commit Graph

274 Commits

Author SHA1 Message Date
Joerg Mueller
3a51a446c1 Fix for 7.1 audio export being misscalculated... 2011-10-20 07:03:08 +00:00
Joerg Mueller
9f6d67484c Fix for [#28916] 2.6 RC2 - Bake Sound to FCurve Crash 2011-10-14 16:58:21 +00:00
Joerg Mueller
9e17ecf010 Fixing [#28907] Frozen playback.
Also fixing two more crashes when audio files don't exist/cannot be read and apply a changed file path of a sound, reported by Jens Verwiebe in IRC.
2011-10-13 22:19:29 +00:00
Joerg Mueller
9cabc57a62 Sequencer audio waveform drawing fix, now assured to be within the strip bounds. 2011-10-10 14:59:13 +00:00
Joerg Mueller
4bafd13eaf Missed some stoff when removing libsamplerate. 2011-10-02 18:08:16 +00:00
Nathan Letwory
1714d1cfe2 Typo fix. nexYon commit caused bit-loss in the word incs. 2011-10-02 17:58:21 +00:00
Joerg Mueller
07ad83a439 * Removing libsamplerate from build systems
* Enabling OpenAL for scons win64-vc in default config; Nathan or Sergey: please update the build bot to build with OpenAL!
2011-10-02 17:09:39 +00:00
Joerg Mueller
c2323749ff Bugfix for wrong playback reported by Sergey Sharybin in IRC. 2011-09-28 09:37:50 +00:00
Campbell Barton
928e2784c6 py api
- use Py_ssize_t when dealing with python sequence sizes
- dont call PySequence_Size(py_b) in a loop (its slow).
- use faster sequence/float parsing in aud.Factory.filter
2011-09-27 05:28:06 +00:00
Campbell Barton
8f5112f191 pep8 update & some minor cmake edits. 2011-09-20 18:29:19 +00:00
Campbell Barton
83a2f02a78 cleanup endian handling
- define __BIG_ENDIAN__ or __LITTLE_ENDIAN__ with cmake & scons.
- ENDIAN_ORDER is now a define rather than a global short.
- replace checks like this with single ifdef: #if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__hppa__) || defined (__BIG_ENDIAN__)
- remove BKE_endian.h which isn't used
2011-09-19 08:02:17 +00:00
Joerg Mueller
ab2fc6f106 Audio:
* Fix for high quality upsampling which was wrong.
* Fix for doppler effects which were calculated wrong for scenes.
* Improved animation evaluation at the beginning and end of a scene.
2011-09-11 12:24:11 +00:00
Campbell Barton
471c005137 typo fix: end of lines ;; --> ; 2011-08-31 01:07:55 +00:00
Guillermo S. Romero
5ac81bfe9c SVN maintenance. 2011-08-30 19:38:32 +00:00
Joerg Mueller
947d4a654b Fix for [#25062] Sound Actuator - Positional Audio.
Now all sounds that are not mono but have 3D checked automatically get reduced to mono during BGE conversion time.
Also removed the now unneeded function sound_get_channels and added a missing header file to audaspace's CMakeLists.txt.
2011-08-30 10:09:10 +00:00
Joerg Mueller
c7dcbdb830 Removing outdated files. 2011-08-30 09:26:59 +00:00
Joerg Mueller
9424b1ceff Merging pepper to trunk at revision 39791.
Important note: I used rsync to do the local merge, as "svn merge --reintegrate ^/branches/soc-2011-pepper" doesn't work with our svn server right now!
2011-08-30 09:15:55 +00:00
Joerg Mueller
5b5e600db6 Last bunch of minor fixes before merge.
* Use NULL in AUD_Reference.h
* Use SETLOOPER in sound.c
* Move flags to the end of Speaker struct.
2011-08-30 07:57:55 +00:00
Joerg Mueller
5bac37f6d4 * Reverting Titlecard commit r37537
* Reverting update recent files commit r37155
* Turning reference counts into unsigned ints
* Minor things
2011-08-29 15:01:55 +00:00
Joerg Mueller
1d529d83a0 Missed a file in last commit. 2011-08-22 19:58:34 +00:00
Joerg Mueller
a71c215f22 3D Audio GSoC:
Final GSoC commit.

* Bugfix: Negative frames crashed
* Bugfix: JOS sample buffer size prediction error (wasted memory)
* Optimisation: for JOS upsampling (around 12 % difference measured here)
* Optimisation: Better filter for JOS resampling
* Bugfix: Error in relative 3D audio code.
* Removed Attenuation
* Bugfix: Multiple scenes in BGE lead to errors, BGE audio now all relative, to support multiple scenes.
2011-08-22 18:59:56 +00:00
Joerg Mueller
02d2472baa 3D Audio GSoC:
Code documentation.

Also:
* Fix: rlint for MSVC.
* Minor other small fixes/changes.
2011-08-16 13:00:55 +00:00
Joerg Mueller
a458de88b6 3D Audio GSoC:
High quality resampling on mixdown, linear for playback.

* Lots of improvements and fixes for the JOS resampler, now it works fine!
* High quality filter coefficients for the JOS resampler (sorry for the 5 MB source file).
* Fix for GE orientation bug. Note: moto uses x,y,z,w quaternion storage, while rest of blender uses w,x,y,z.
* Minor changes/fixes.
2011-08-15 21:50:09 +00:00
Joerg Mueller
fee7337249 3D Audio GSoC:
Adding a mono flag to mixdown non-mono sounds for 3D audio.

* Added mono sound loading.
* Bugfix: AUD_COMPARE_SPECS usage was wrong.
* Bugfix: JOS resampler = instead of ==.
* Bugfix: Change of a sound should apply settings in AUD_SequencerHandle.
* Bugfix: Memory leak when canceling open sound operator.
2011-08-11 11:41:24 +00:00
Joerg Mueller
a672ab5e73 3D Audio GSoC:
Improved waveform drawing in the sequencer.

* Drawing the waveform of a sequencer strip is now independent from whether the sound is cached or not.
* Improved drawing of the waveform in the sequencer (especially speed!).
* Making it possible to vertically zoom more in the sequencer to better see the waveform for lipsync.
* Fixed a bug which crashed blender on loading a sound file via ffmpeg.
2011-08-09 14:10:32 +00:00
Joerg Mueller
13249b925e 3D Audio GSoC:
Speaker objects fully functional!

Minor changes:
* Fixed three memory bugs found via valgrind.
* Fixed bug with jack transport crashing after file loading.
* Sound NLA Strips now start at CFRA instead of 0.
2011-08-09 08:38:14 +00:00
Joerg Mueller
2d884fc035 3D Audio GSoC:
* Pepper depends on ffmpeg 0.7.1 or higher now, windows and mac build systems set to ffmpeg-0.8
* Fixed orientation retrieval in OpenAL device code.
* Added stopAll() method to AUD_IDevice (also for Python) and call it on BGE exit
* Changed BGE to use audaspace via native C++ instead over the C API.
* Made AUD_SequencerFactory and AUD_SequencerEntry thread safe.
* Changed sound caching into a flag which fixes problems on file loading, especially with undo.
* Removed unused parameter from sound_mute_scene_sound
* Fixed bug: changing FPS didn't update the sequencer sound positions.
* Fixed bug: Properties of sequencer strips weren't set correctly.
* Minor warning fixes.
2011-08-07 11:54:58 +00:00
Joerg Mueller
4370099fb0 3D Audio GSoC:
Added a NULLHandle to prevent a crash in Python API when the device is the NULLDevice.
2011-08-07 06:22:50 +00:00
Joerg Mueller
c334bf69a7 3D Audio GSoC:
Mixdown functionality.

* Mixdown possible via libsndfile and ffmpeg!
* Fixed some ffmpeg deprecation warnings
* Mixdown UI only shows working Container, Codec and Format combinations!
* Minor bugs and warnings fixed
2011-08-06 17:57:20 +00:00
Joerg Mueller
507dbeab45 3D Audio GSoC:
JOS Resampler: Fix for windows...
2011-08-05 07:01:54 +00:00
Joerg Mueller
bc1650a226 3D Audio GSoC:
Implementation of Julius O. Smith's resampling algorithm for high quality audio resampling.

The filter currently is a sinc filter with a 0.9 cutt-off and windowed by a kaiser window (beta = 10).
Also includes minor changes in the linear resampler.
2011-08-04 13:47:15 +00:00
Joerg Mueller
6d7490632f 3D Audio GSoC:
* Minor audaspace library improvements.
* Considering location, velocity and orientation in AUD_SequencerReader and AUD_SequencerHandle.
* Bugfix: Maximum and Minimum volume weren't used before in the software device.
* Bugfix: Adding speaker objects via info space crashed.
* Listener settings now get updated in the audio system.
2011-08-03 09:25:40 +00:00
Joerg Mueller
4b5a371b65 3D Audio GSoC:
* Fix for sequencer strip IDs, only one strip played.
* Fix for PyAPI sample rate.
* Enhanced Double Reader to return more data if possible.
2011-07-30 16:24:11 +00:00
Joerg Mueller
bd6ca0570e 3D Audio GSoC:
Implemented basic audio animation.

* AnimatableProperty: Propper cache writing and spline interpolation for reading (the solution for stair steps in audio animation)
* Animatable properties so far are: volume, pitch, panning
* Users note: Changing the pitch of a sound results in wrong seeking, due to the resulting playback length difference.
* Users note: Panning only works for mono sources, values are in the range [-2..2], this basically controls the angle of the sound, 0 is front, -1 left, 1 right and 2 and -2 are back. Typical stereo panning only supports [-1..1].
* Disabled animation of audio related ffmpeg output parameters.
* Scene Audio Panel: 3D Listener settings also for Renderer, new Volume property (animatable!), Update/Bake buttons for animation problems, moved sampling rate and channel count here
2011-07-28 13:58:59 +00:00
Joerg Mueller
9077b8bffc 3D Audio GSoC:
Main: Complete rewrite of the sequencer related audio code to support 3D Audio objects later and especially adressing the animation system problems (see mailing list if interested).
Note: Animation is not working yet, so with this commit volume animation doesn't work anymore, that's the next step.

Minor things:
* Changed AUD_Reference behaviour a little to be more usage safe.
* Fixed bug in AUD_I3DHandle: Missing virtual destructor
* Fixed enmus in AUD_Space.h
* Fixed a warning in rna_scene.c
* Removed an unneeded call in rna_sound.c
2011-07-26 13:56:31 +00:00
Joerg Mueller
f4a30e473b Cherry pick merge: /branches/soc-2011-pepper/intern/audaspace/OpenAL:r38630
Original log: Corrected the OpenAL device's threading code. This is a bugfix for #27913, thanks to Juha Mäki-Kanto for helping to resolve this.
2011-07-23 16:08:37 +00:00
Joerg Mueller
1193be6eaa 3D Audio GSoC:
* Reviewed and improved the linear resampler. Now it should work pretty good also for special cases that caused errors previously.
* Fixed a crash in the GE when a sound actuator doesn't have a sound assigned.
* Corrected the OpenAL device's threading code. This is a bugfix for #27913, thanks to Juha Mäki-Kanto for helping to resolve this.
2011-07-23 15:59:10 +00:00
Joerg Mueller
4532bd731d Merge with trunk up to r38584. 2011-07-21 21:11:58 +00:00
Campbell Barton
5792bd7cc7 cmake: cleanup include paths, some duplicates and going up some unneeded dirs. 2011-07-17 09:11:13 +00:00
Campbell Barton
410c5e3cd2 cmake source definitions:
remove missing includes and use more strict formatting.
2011-07-16 23:01:14 +00:00
Joerg Mueller
d838d82151 3D Audio GSoC:
MSVC compile fixes.
2011-07-14 05:56:47 +00:00
Joerg Mueller
f12614234a 3D Audio GSoC:
* Fixed a warning in AUD_DoubleReader.cpp
* Removed some unneeded includes
* Fixed a bug resulting in a crash when stopping a sound
* Fixed a bug where a NaN resulted in a horrible memory error
* Fixed a typo bug which caused crackling in audio playback and export
* Added memory debugging code (ifdefed)
2011-07-13 12:16:45 +00:00
Joerg Mueller
208b69e3a7 3D Audio GSoC:
Software 3D Audio implementation.
2011-07-12 13:11:00 +00:00
Joerg Mueller
fdb932370b 3D Audio GSoC:
Fixes for crashes reported by Moguri.
2011-06-24 06:39:03 +00:00
Joerg Mueller
cc246eaca7 3D Audio GSoC:
- Fixes for MSVC compiling.
- Fix for ffmpeg audio export with timebase, which fixes vorbis encoding (the only codec using this).
2011-06-23 07:16:06 +00:00
Joerg Mueller
2d3d025e8c 3D Audio GSoC:
- Sequencer dynamics: Now it's possible to change the output channels and the resampling quality also increased (previously maximum quality was 44,1 kHz)
- Changed two buffers to use ffmpeg allocation, not sure if that helps somehow.
2011-06-21 20:39:41 +00:00
Joerg Mueller
8e6b5598e0 3D Audio GSoC:
Adapting all readers to maximally support dynamic resampling/rechanneling, introducing a DynamicIIRFilter for example.
2011-06-21 20:35:09 +00:00
Joerg Mueller
6d5b224184 3D Audio GSoC:
Removing unneeded AUD_ResampleFactory.
2011-06-21 20:32:25 +00:00
Joerg Mueller
fba07308bf 3D Audio GSoC:
- Converting AUD_SampleRate to a double
- Removing AUD_DefaultMixer
- Introducing AUD_ResampleReader as base class for all resampling readers.
2011-06-21 20:29:02 +00:00
Joerg Mueller
d5eaffda23 3D Audio GSoC:
Dynamic resampling for libsamplerate and linear resampling.
2011-06-21 20:25:48 +00:00
Joerg Mueller
c89b4e4b66 3D Audio GSoC:
- Implemented a nice rechanneling solution with unofficial speaker arrangement standards similar to what OpenAL soft has
- Renamend AUD_Channel in the C API to AUD_Handle
- Removed the unlogical 7.2 speaker configuration, that's a hardware only config
2011-06-21 20:24:40 +00:00
Joerg Mueller
044887b5a4 3D Audio GSoC:
- Created Handle classes
- Changed Reference counting completely
- Fixing some streaming bugs
- Completely disabled OpenAL Buffered Factories (they were unused anyway)
2011-06-21 20:21:43 +00:00
Joerg Mueller
cc71dcc218 3D Audio GSoC:
Streaming improved.
2011-06-21 20:14:53 +00:00
Joerg Mueller
3d932ba496 3D Audio GSoC:
Buffer.assureSize - a function that should long have been there.
2011-06-21 20:13:27 +00:00
Joerg Mueller
f2ceca4eb0 3D Audio GSoC:
Code cleanup: rewriting some functions to static methods.
2011-06-21 20:12:39 +00:00
Joerg Mueller
207911bdb3 Merge with trunk r37677 2011-06-20 22:55:18 +00:00
Campbell Barton
968b2a8afb rename cmake include/libraries to conform with suggested cmake names 2011-06-18 14:12:54 +00:00
Campbell Barton
549c2c58a1 added FindSndFile cmake module to replace inline checks. 2011-06-18 12:12:19 +00:00
Joerg Mueller
a90d30c863 3D Audio GSoC:
GameEngine Python access sound actuator's sound (with setting! :-D).
2011-06-16 09:13:29 +00:00
Joerg Mueller
49f7a4d8f8 3D Audio GSoC:
Temporary fix for MSVC.
2011-06-15 18:52:52 +00:00
Joerg Mueller
f8212f4e03 3D Audio GSoC:
Removing unneeded const from Factory::createReader.
2011-06-14 21:22:22 +00:00
Joerg Mueller
d8974a60f6 3D Audio GSoC:
Changed Readers to top-down architecture instead of bottom-up.
2011-06-14 12:13:19 +00:00
Joerg Mueller
ef5f78ecc7 3D Audio GSoC:
Making it possible to access blenders internal sounds via Python.
2011-06-05 22:06:29 +00:00
Joerg Mueller
d1c542ce05 3D Audio GSoC:
Memory management improvements.
2011-06-03 23:28:57 +00:00
Joerg Mueller
cd04cff180 Merge with trunk revision 37149. 2011-06-03 23:24:01 +00:00
Campbell Barton
b434550edc fix for recent cmake changes 2011-05-31 09:27:33 +00:00
Campbell Barton
09da9d4393 cmake maintenance
blender_add_lib now takes a separate include argument to suppress warnings in system includes (mostly ffmpeg & python).
also only build wm_apple.c on apple+carbon configuration.
2011-05-31 01:15:44 +00:00
Joerg Mueller
57d190ee10 3D Audio GSoC:
Changing converter functions to work when input and output buffer are the same.
2011-05-29 11:25:05 +00:00
Peter Schlaile
42121590f4 == FFMPEG ==
Added central compatibility header file, which enables blender to compile
against very old ffmpeg versions as well as very new versions using the
*NEW* API. (Old API functions are simulated using macros and inline functions)

Added a whole lot of additional checks, tested against 6 different versions
down the timeline, hopefully, now finally all is well.
2011-05-27 23:33:40 +00:00
Peter Schlaile
4b9a63c6d3 == FFMPEG ==
* removed a lot of old cruft code for ancient ffmpeg versions
* made it compile again against latest ffmpeg / libav GIT
  (also shouldn't break distro ffmpegs, since those API changes
  have been introduced over a year ago. If it nevertheless breaks,
  please send me an email)
2011-05-26 21:57:02 +00:00
Joerg Mueller
5f08bfd46c Fix for [#26990] Loading file w packed audio crashes
FFMPEG was reallocating buffers it didn't own and wasn't allowed to. This workaround should work now flawlessly.

Also fixing a bug regarding unpacking sounds, the UI stated unpacking to //audio/filename while it was unpacking to //sounds/filename
2011-04-18 14:24:36 +00:00
Campbell Barton
a41c0c324a fix [#26937] Radio button text truncation should start at beginning of string
ensure start of text is always visible.

- also left in test for fix [#26933] which left it broken.
- quiet warning in AUD Py API.
2011-04-15 01:32:37 +00:00
Joerg Mueller
e37dc17991 Fix for [#26652] "Audio Muted" in Time Line Editor is not working
-> The feature was completely missing o_O
Also fixed an ffmpeg seeking bug.
2011-04-10 22:40:37 +00:00
Nathan Letwory
45ed5f53f6 doxgyen: audaspace tagged. 2011-02-25 10:21:56 +00:00
Nathan Letwory
33ceadb2a6 "I must be an idiot" 2011-02-22 23:14:27 +00:00
Nathan Letwory
ce717ff355 doxygen fix, otherwise file doesn't show up in module section. 2011-02-22 23:10:51 +00:00
Nathan Letwory
8e3fcf007a doxygen: add Audaspace C API entry 2011-02-22 21:58:43 +00:00
Joerg Mueller
d36a89c8f4 Audaspace:
* Adding play method to the device classes to play back a reader (not used yet, preparation for a later feature).
* Using a linear resampler in case SRC is disabled.
2011-02-18 23:50:27 +00:00
Joerg Mueller
020c03bc05 Relicensing audaspace under GPL 2 or later. 2011-02-18 23:47:37 +00:00
Joerg Mueller
376e0ae2a3 Audio Bugfixes:
* [#25638] 'Insufficient thread locking' for sounds
  - Actually a workaround for an msvc bug, msvc STL containers are buggy
* [#25922] Sound does not play in BlenderPlayer(r34579)
  - Windows OpenAL doesn't seem to have clear context error state on initialising
2011-02-03 13:25:05 +00:00
Campbell Barton
89c617a116 remove nan-makefiles 2011-01-30 15:29:22 +00:00
Campbell Barton
1bd0db59f4 use cmake defined names for jpeg, png, zlib and python libs, building on *nix with non-standard libjpeg/png/zlib locations was broken.
in the case of python this makes it easier to move to find_package(PythonLibs) when 3.x is supported.
2011-01-25 14:43:13 +00:00
Campbell Barton
c9f353956c use PySequence_Size() rather then PySequence_Length(), this is only kept in python for backwards compatibility. 2011-01-09 14:53:18 +00:00
Joerg Mueller
9118614d8e Fix for blender crashing when starting playback with audio without being able to open the audio file. 2010-12-27 11:32:43 +00:00
Campbell Barton
5e382eb8e5 rename blenderlib to blender_add_lib 2010-12-22 23:09:30 +00:00
Joerg Mueller
f08fb046ce Audio:
* Improve Jack Transport responsiveness.
* Added minor error checking to OpenAL.
2010-12-22 10:51:34 +00:00
Campbell Barton
afacd18498 use lowercase for cmake builtin names and macros, remove contents in else() and endif() which is no longer needed. 2010-12-08 08:43:06 +00:00
Campbell Barton
cd97253502 - added GCC warning -Wstrict-prototypes
- fixed bug in paste material, exposed by stricter warnings.
- removed/renamed various shadowed vars.
- removed BGE lamp.colour, only allow lamp.color attribute.
2010-12-03 12:30:59 +00:00
Campbell Barton
42d6603cae Add option for CMake to build libredcode, also use CODEC prefix for ffmpeg, quicktime & sndfile options. 2010-11-30 18:52:39 +00:00
Campbell Barton
e8397e6193 include headers in cmake source, added a script to check for consistency, reporting missing headers & C files.
this is important so IDE's using CMake integration always get blender headers. - QtCreator & MSVC for eg, probably others too.
2010-11-29 04:35:56 +00:00
Campbell Barton
c85c2746df WITH_SAMPLERATE option for cmake, without this playback wont behave right so this is mainly intended for developers who build without audio enabled. 2010-11-21 14:32:55 +00:00
Campbell Barton
46f90690e0 patch [#24576] aud.Handle.status return bool
from Dan Eicher (dna), no functional changes, just return bool rather then int types.
2010-11-07 04:34:27 +00:00
Peter Schlaile
1b18ea5823 == FFMPEG ==
This fixes a rather subtle seeking issue with ffmpeg and Sony 
XDCAM-footage.

Problem is: MPEG2 streams within an MP4 container can contain a start 
time - at several places. There is a starttime within the video 
and audio streams and one within the container.

FFMpeg commandline tool only uses the container starttime and we used 
the stream starttime. 

The world would be a better place, if those two timestamps always match 
up, since in XDCAM-footage those two starttimes differ in 4 
frames - and the container has the right one.

We now always use the container start time as ffmpeg commandline tool 
does (in the hope, that there is a good explaination for this and this 
is the right thing(tm) to do).

I tested this also with HDV footage, which seems to work with the new 
code, too.

Additional fix: disabled seek_by_bytes again, since it will only work 
correctly, if ffmpeg guessed the HDV bitrate right (which it doesn't). 
If you have seeking issues with HDV and have an older version of ffmpeg 
installed, please upgrade, newer versions have some fixes in them.
2010-11-01 18:13:10 +00:00
Joerg Mueller
4c80d13e54 Audaspace: Disabling High- and Lowpass for Bake Sound to F-Curve Operator in case they're unused. 2010-10-31 14:44:45 +00:00
Joerg Mueller
391c547208 Fix for #24453: Missing delete statement. 2010-10-31 14:21:06 +00:00
Campbell Barton
0876fce009 rename and negate DISABLE_PYTHON --> WITH_PYTHON 2010-10-31 04:11:39 +00:00
Campbell Barton
ced06081b8 use PyImport_ExtendInittab for py module initialization rather then adding to sys.modules directly, no functional change. 2010-10-29 22:59:39 +00:00
Guillermo S. Romero
1de1d6537e Fully disable AUD's FFTW3 usage. 2010-10-24 00:09:23 +00:00
Campbell Barton
f383e2e0e6 Remove msvc build files which are not needed anymore. 2010-10-23 15:14:54 +00:00
Campbell Barton
c6976e7351 use explicit file paths for CMake rather then globing, This is recommended by cmake devs.
globbing vs explicit is discussed here.
http://www.cmake.org/pipermail/cmake/2008-December/025694.html

Practical implications are:
- developers need to keep CMakeLists.txt files up to date.
- Users wont get strange linking errors if they build after a file is added, since CMake detects CMakeLists.txt is modified and automatically reconfigure.
2010-10-23 04:05:55 +00:00