Commit Graph

350 Commits

Author SHA1 Message Date
Daniel Genrich
40d4fb9fce Fix compile error using MSVC2008 + cmake 2014-03-09 09:55:49 +01:00
Juergen Herrmann
5559302369 Cleanup some useless/unneeded #ifdefs for MSVC2013. 2014-03-09 00:25:08 +01:00
Sergey Sharybin
5ac1b38b4b Support planar sample formats in audio mixdown
Now libav-10 should work for output of ac3 container.
2014-02-28 15:16:30 +06:00
Sergey Sharybin
e82b5f61fe Attempt to fix mixdown when building without sndfile
This case was handled specially in writeffmpeg.c and seems it makes
audio export happy in all cases now.

TODO: libav-10 doesn't work with AC3 codec yet because this bloody
library ONLY supports FLTP format and FFmpeg ONLY supports FLT.

This is not fun guy, it really isn't! Where's your conscience??

CC: nexyon
2014-02-28 14:51:03 +06:00
Sergey Sharybin
32d5cc247f Fix T38768: New "audio" button in 2.70 release does not 'mixdown' audio
Issue was caused by the way how audio output works from audaspace.
Now made it much closer to what's happening in ffmpeg.c and writeffmpeg.c.

Also fixed issues with incompatible combinations of codecs and formats
in mixdown settings.
2014-02-28 12:26:16 +06:00
Anton Khirnov
2b858b45c2 audaspace: use new libavcodec audio encoding API where available 2014-01-28 14:25:40 +06:00
Anton Khirnov
8c3b27ce27 Change libavcodec CODEC_ID_* to AV_CODEC_ID_*
CODEC_ID_* have been replaced with AV_CODEC_ID_* in new libavcodec
versions.

Update the code to use those new identifiers.

Added a compatibility code to ffmpeg_compat.h
2014-01-28 14:00:31 +06:00
Campbell Barton
19103b4437 Code Cleanup: quiet unused define warning 2013-12-30 12:19:27 +11:00
Alexandr Kuznetsov
e2429d6492 Woo Hoo. First git commit.
Changes for VC2013

Now, I can build Blender with VC2013 with Cycles, Collada, OpenExr,OpenImageIO disabled. Also, you need VC2008 sp1 installed to make old libs compatible.
2013-11-29 15:13:12 -05:00
Jörg Müller
447d277498 Fix IRC reported by elubie: windows crash with audio animation
There was a bug in how the iterators of STL list was used when erasing during iteration of a list, which was triggered by the STL implementation of MSVC, but hid well with gcc.
2013-11-20 00:26:15 +01:00
Joerg Mueller
c53f80aeed Fix for [#37362] Audio strips sometimes are evaluated incorrectly.
For details see bug comments. The problem was that blender's animation system didn't update the audio animation system anymore due to an optimization. Fixed this in a complex but proper way in the audio animation system, so that it can handle gaps of missing values.
2013-11-12 18:29:08 +00:00
Joerg Mueller
1457924a21 Fix for [#37293] Audio does not Scrub, plays fully instead 2013-11-07 23:40:06 +00:00
Joerg Mueller
c8f75fb5b1 Adding a new state for sound handles in audaspace: stopped.
Now sounds that stopped playing but are still kept in the device can be differentiated from paused sounds with this state.
This should also fix the performance issues mentioned in [#36466] End of SequencerEntrys not set correctly.
Please test if sound pausing, resuming and stopping works fine in the BGE and sequencer, my tests all worked fine, but there might be a use case that needs some fixing.
2013-08-14 21:21:00 +00:00
Campbell Barton
a2a99bbc17 edit to r58425, BLI_math is available here, better not copy,paste from linearrgb_to_srgb.
also remove redundant check in AUD_FFMPEGReader::seek.
2013-07-20 00:35:41 +00:00
Campbell Barton
905cb1639a update doxygen congfig and tweaks to warnings when running doxygen. 2013-07-03 04:47:50 +00:00
Joerg Mueller
e5944d23ed Fix for [#35230] CPU freeze at playback after cutting/deleting/duplicating audio strip 2013-06-20 07:46:40 +00:00
Sergey Sharybin
a4cf8b3779 Supress error message if dlopen for jack.so failed
This is mainly happening when there's no jack installed
in the system and no reason to cause general panic
messages in the terminal about this.
2013-05-07 15:49:23 +00:00
Sergey Sharybin
349b71fd02 Bring back support of FFmpeg >= 0.7
After planar codecs support minimal FFmpeg was
bumped to 0.10 which was not so much nice because
it was only released only later last year.

Didn't find a way to make compatibility code local
in ffmpeg_compat, so there're some ifdefs in
audaspace and writeffmpeg.

Not entirely happy, but having a bit of ifdefs in
code better than lots of real PITA for platform
maintainers.
2013-04-19 17:23:08 +00:00
Campbell Barton
8c1cb10cfd code cleanup: unused vars, make other vars static. 2013-04-10 22:49:50 +00:00
Joerg Mueller
97ce56dc76 Bugfix for [#34845] FFmpeg: .wav file playback crashes Blender since r55693 2013-04-02 15:48:09 +00:00
Joerg Mueller
271a7a5554 Audaspace: adding support for ffmpeg planar formats, breaks support for older ffmpeg versions. 2013-04-01 09:46:35 +00:00
Sergey Sharybin
31eee77a45 Fix #33518: Jack sync doesn't work in 2.64, 2.64 or 2.65 stable versions
Added new build option WITH_JACK_DYNLOAD for CMake and
WITH_BF_JACK_DYNLOAD for SCons, which means there'll be
no build-time linking against libjack and getting symbols
from libjack will happen runtime using dlopen and dlsym
tricks.

Alternative would be to use weak linking, but it'll require
having wrapper for preloading libjack.

This new options are disabled by default and they only
intended to be used on linux. Other platforms shall not
be using this and there shall be no functional changes
on non-linux platforms at all.
2013-03-27 07:19:54 +00:00
Campbell Barton
9379dcb507 code cleanup: unused defines, shadowing and unintended enum-as-variable. 2013-03-22 14:31:03 +00:00
Campbell Barton
6fd187e4df code cleanup: 0 --> NULL 2013-03-08 06:32:00 +00:00
Sergey Sharybin
d7e427beff Fix/workaround for newer FFmpeg 1.1.3 and MP3 decoder
FFmpeg is now using S16P sampler for MP3 which is not actually
supported by audaspace, so request for S16 sampler instead.
2013-02-28 18:28:08 +00:00
Brecht Van Lommel
4f3ca854e1 Fix various warnings with clang build, and adjust cmake clang warnings flags
to include a few more that gcc is using too.
2013-02-26 21:58:06 +00:00
Sergey Sharybin
aab01c86cf Patch #33837: ffmpeg1.1 and libav9.1 compatibility update
Patch makes it possible to compile blender with recent ffmpeg
and libav libraries, mainly by getting rid of deprecated API.

Original patch by Campbell Barton with own modifications to
support compilation with older ffmpeg versions.

This patch could break compatibility of FFV1 videos playing
back in older players, mainly because of alpha support changes.
Preserving compatibility with such players became a headache
and think it's high time to get rid of workarounds here.
2013-01-12 12:51:10 +00:00
Bastien Montagne
ab2c273b12 Added GPL header to sconscripts!
Also changed shebang to '#!/usr/bin/env python', this is more portable across unixes...
2012-12-17 08:01:43 +00:00
Campbell Barton
08f39daf4e cmake wouldn't build since it was missing files added in r52858. 2012-12-11 05:57:42 +00:00
Joerg Mueller
245345fba5 Audaspace:
Implemented forgotten Calculator classes from boost migration.
2012-12-10 16:58:47 +00:00
Bastien Montagne
818a345be3 Silent a bunch of gcc warnings (usually dummy, but noisy!). 2012-12-02 16:01:06 +00:00
Campbell Barton
cf6994b910 code cleanup: spelling,
also initialize bmesh-bevel settings struct to zero to avoid possible uninitialized memory later.
2012-11-12 07:33:01 +00:00
Sergey Sharybin
a1b954d608 Update CMake rules for audaspace 2012-11-05 14:47:28 +00:00
Joerg Mueller
5a8d5f77af Audaspace:
Replacing AUD_Reference with boost::shared_ptr.
2012-11-05 14:24:35 +00:00
Campbell Barton
7579a9ec37 code cleanup: double promotions 2012-11-04 10:20:16 +00:00
Joerg Mueller
b59290a835 Preparation to use boost::shared_ptr. 2012-11-03 09:49:49 +00:00
Joerg Mueller
73f5944ebc Audaspace:
OpenAL multichannel playback support fixed. This should fix bug [#31561] Audio only coming from Front Left in layout and bge.
2012-10-25 10:42:09 +00:00
Joerg Mueller
ad2dffe7c6 Audaspace:
Fix for channel mapping bug. Now 7.1 channels should get mapped correctly.
2012-10-25 10:25:30 +00:00
Joerg Mueller
e66ee1ca9f Audaspace:
RAII locking implementation. This should fix bug [#32096] Background music stops when playing 3D sounds.
2012-10-24 21:33:44 +00:00
Campbell Barton
589ada7f0c code cleanup: correct spelling 2012-09-28 06:45:20 +00:00
Campbell Barton
fbe13ab84a style cleanup 2012-09-20 12:29:28 +00:00
Campbell Barton
25c96bc9f3 code cleanup: remove unused macros, commet some which may be useful later - or good to keep for completeness. quieted some warnings and add flags -Wmissing-include-dirs and -Wno-div-by-zero to cmake/gcc 2012-09-20 01:02:39 +00:00
Campbell Barton
2fb8292005 style cleanup 2012-09-16 04:58:18 +00:00
Campbell Barton
d724d0adfe code cleanup: quiet warnings for gcc's -Wundef, -Wmissing-declarations 2012-09-16 00:26:36 +00:00
Campbell Barton
a425790065 style cleanup 2012-09-14 23:11:47 +00:00
Campbell Barton
47ec91e8d3 code clenup: comments and some style edits on ghost/osx (odd indentation) 2012-09-06 02:10:09 +00:00
Campbell Barton
a199ae5368 style cleanup: whitespace, also add '?' to save over popup since it wasnt totally clear it was a question (user pointed this out, they thought it was just notification and lost their work). 2012-07-31 23:06:12 +00:00
Campbell Barton
21bf13989f code cleanup: remove Python.h include from blenkernel. 2012-07-04 20:13:39 +00:00
Sergey Sharybin
0d64e050ea Reduce amount of deprecated symbols used from FFmpeg
This switches some areas of Blender which are related on FFmpeg stuff
from deprecated symbols to currently supported one.

Pretty straightforward changes based on documentation of FFmpeg's
API which symbols should be now used.

This should make Blender compatible with recent FFmpeg 0.11.

Should be no functional changes.
2012-06-18 10:29:11 +00:00
Campbell Barton
b5b8306685 code cleanup: includes, also correct some py example typos 2012-06-16 20:20:07 +00:00
Sergey Sharybin
a7a79322bf Make blender compilable by gcc-4.7 and strict compilation flags:
- Remove strict flags from files, which are using FFmpeg stuff
  We're still using some symbols which are marked as deprecated.
  Ideally, we shall switch to new API, but it's a bit larger challenge
  because we don't want to break compatibility withotu actual need.
- Replace MAKE_ID with BT_MAKE_ID in bullet library.
  This is needed to prevent re-definition of MAKE_ID in bullet library.
  Seems it's only used to read blender files, so should be quite safe
  change.
2012-05-14 13:31:38 +00:00
Joerg Mueller
9466af0eab Patch [#31240] Fix audaspace deadlock
fix for [#31097] glibc error when playing sound using BGE
by Wander Lairson Costa

Note: This deadlock fix makes the code non-threadsafe again, a proper solution has to be found still.
2012-05-04 23:36:10 +00:00
Joerg Mueller
0f5e1f2ff0 Fixes for
* [#31285] VSE: audio pitch change delays audio
* [#31260] VSE Trimmed audio plays when overlaped
2012-05-04 23:28:27 +00:00
Joerg Mueller
6e40b8b3cf Hopefully a fix for [#31097] glibc error when playing sound using BGE 2012-04-28 13:37:44 +00:00
Joerg Mueller
ef3acaedc1 Audio:
* Fix for [#31099] Audio in Meta-Strips Plays Beyond Strip Cut
* Adding a split files option to the mixdown operator which then renders each channel into a separate file
2012-04-28 13:16:29 +00:00
Antony Riakiotakis
4e6590067d revert 45924, not a very clean solution, especially for external libraries and looks like -fpermissive is used in linux too 2012-04-24 16:14:23 +00:00
Antony Riakiotakis
0db3c5f743 Remove mingw-w64 errors from loss of precision by converting 64bit pointers to ints. All cases found were harmless and the error behaviour could be turned off by the -fpermissive flag but I'd rather keep that off to detect any real problems should they arise. 2012-04-24 14:33:44 +00:00
Antony Riakiotakis
4782522379 Add libMV and Scons support for MinGW-w64, patches by Caleb Joseph with slight modifications.
Thanks!
2012-04-24 12:57:58 +00:00
Joerg Mueller
112ef14422 Fix for [#30499] video sequencer crashes when moving around within a sequence. 2012-03-21 09:04:34 +00:00
Campbell Barton
61596d5bb3 patch [#30227] Various MSVC (32-bit) Warning and Typo Fixes
made some small edits
- removed changes to AVI reading since the data types are apart of the format spec.
- absf -> abs for a double value in render code.
2012-02-17 19:21:47 +00:00
Campbell Barton
2b7ca2304a unify include guard defines, __$FILENAME__
without the underscores these clogged up the namespace for autocompleation which was annoying.
2012-02-17 18:59:41 +00:00
Joerg Mueller
c0c1a9700e Fix for [#30171] "Audio Muted" Does Not Mute Audio 2012-02-13 21:27:11 +00:00
Campbell Barton
51016c4dea split >120 length lines (mostly if statements) 2011-12-22 00:03:20 +00:00
Joerg Mueller
b9614b0e52 Fix for Jens commit, otherwise OSX will crash without Jack as soon as audio access is tried. 2011-12-14 08:38:21 +00:00
Jens Verwiebe
6b652928a7 Cleanup for 42622 using struct stat instead boost 2011-12-14 08:01:24 +00:00
Jens Verwiebe
7d9a8c2308 OSX: Add a framework-check for Jack to avoid crashes 2011-12-14 06:15:52 +00:00
Jens Verwiebe
94bc2b0cff OSX: proper scons config and linking weak for jackOSX and errorhandling 2011-12-12 22:17:02 +00:00
Sergey Sharybin
ff82aa8677 Fix for uninitialized usage of spos in AUD_LinearResampleReader::read
Patch is verified by neXyon
2011-11-14 19:44:49 +00:00
Campbell Barton
e84c0980a3 correct indentation and some whitespace edits (no functional changes) 2011-11-11 13:09:14 +00:00
Nathan Letwory
7d7079a58a Remove redundant .remove() 2011-11-08 19:04:19 +00:00
Jens Verwiebe
51ead63ae6 Fix compile after audaspace file source.remove.. 2011-11-08 16:53:59 +00:00
Sergey Sharybin
f26d7010ef Don't compile AUD_JOSResampleReaderCoeff.cpp twice (it's included in AUD_JOSResampleReader.cpp)
Patch from nico_ga, thanks!
2011-11-08 16:24:31 +00:00
Campbell Barton
057bf2a02b misc doc edits
- remove recently added sphinx reference workaround.
- tested doxygen, correct some warnings, set tab width and added pymathutils group.
- added convenience target 'make doc_doxy'
2011-11-05 01:48:10 +00:00
Campbell Barton
d210703bca use Py_TYPE macro (no functional changes) 2011-11-03 13:10:37 +00:00
Campbell Barton
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
Joerg Mueller
726fa61817 Fix for an unhandled exception. Campbell: please include in 2.60a. 2011-10-22 18:08:26 +00:00
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