Commit Graph

326 Commits

Author SHA1 Message Date
Jörg Müller
8c25c1c484 Fix T46683: High pitch sound artifact on import of 48k audio
The bug header is wrong, the file contains the high pitched sound, but the bug that existed was that animation rendering did not use the high quality resampler, while audio mixdown does.
Blender uses the low quality resampler to be as little CPU consuming as possible.
2015-11-03 19:34:33 +01:00
Campbell Barton
d04ad07f98 Quiet audaspace unused macro warnings 2015-10-23 18:40:42 +11:00
Jörg Müller
6a80c2c48b Audaspace: fix for building with scons.
Removed duplicated code.
CMake so far built only the now removed version and scons tried to build both.
2015-08-29 22:42:20 +02:00
Jörg Müller
4cf92c4831 Aduaspace: fixing playback in the game engine. 2015-08-02 11:27:02 +02:00
Thomas Dinges
d49703b298 Fix SCons path issue on Windows. 2015-07-29 21:48:24 +02:00
Jörg Müller
a0cbebf404 Audaspace: fixing problems for the merge to master suggested by Campbell and Sergey.
- rename WITH_EXTERNAL_AUDASPACE to WITH_SYSTEM_AUDASPACE.
- rename C/PYAUDASPACE to AUDASPACE_C/PY
- simplifying cmake defines and includes.
- fixing include paths and enabling WITH_SYSTEM_AUDASPACE for windows.
- fixing scons building.
- other minor build system fixes.
2015-07-28 14:01:53 +02:00
Jörg Müller
f700c1f3a8 Audaspace: name fixes and external library update. 2015-07-28 14:01:52 +02:00
Jörg Müller
009bb9e5c9 Audaspace: adapt internal C-API naming to external audaspace library. 2015-07-28 14:01:52 +02:00
Jörg Müller
8528d76dad Audaspace: external audaspace library update. 2015-07-28 14:01:52 +02:00
Jörg Müller
733073550f Audaspace: use standalone library.
- Added the cmake configuration option WITH_EXTERNAL_AUDASPACE.
- Fixes to build without standalone library as well.
2015-07-28 14:01:52 +02:00
Jörg Müller
96dd213e7e Audaspace: preparing to use standalone library.
- Renamed some functions.
- Using C API instead of C++ in the game engine, as the standalone is C++11.
2015-07-28 14:01:52 +02:00
Campbell Barton
74b32a23f7 Cleanup: checks for unsupported MSVC versions 2015-06-20 15:17:32 +10:00
Sergey Sharybin
6cd82dbf57 CMake: Enable strict flags for C++ 2015-03-27 18:23:31 +05:00
Antony Riakiotakis
828c85a1bf sound module: Append functions with BKE (makes it easier to make them
out from local functions)
2015-03-26 11:35:41 +01:00
Jörg Müller
770b109deb Fix: AUD_OpenALDevice::getPosition returns negative values
Reported by Antony Riakiotakis. The problem was the seeking code.
2015-03-26 14:45:21 +13:00
Jörg Müller
2fa593a6f7 Fix T43853: Audio animation bug (fcurves)
For a detailed bug explanation see the comments in the report.
2015-03-16 23:02:04 +13:00
Jörg Müller
d434815ff7 Audaspace: Fix typo in speed of sound initialization value by lordloki (Jorge Bernal) 2015-01-29 12:20:41 +13:00
Jörg Müller
21eb3ce44a Fix: Audaspace threw an exception for files it could not open. 2015-01-22 19:06:23 +13:00
Jörg Müller
d7a32383c0 Audaspace: File handle management for audio sequencing
Fixes the problem that for big sequences too many file handles were open at the same time.

Changes the playback handles that the audio sequencing code manages to be closed and reopened when needed. The metric used is the current playback position in relation to the strip. If the strip is more than 10 seconds (configurable) away from the playback cursor, the handle is released and reopened when needed.

See D915.
2014-11-25 10:48:23 +13:00
Antony Riakiotakis
649a2bcc3d Politically correct terrible consequencer changes
This patch includes the work done in the terrible consequencer branch
that hasn't been merged to master minus a few controversial and WIP
stuff, like strip parenting, new sequence data structs and cuddly
widgets.

What is included:

* Strip extensions only when slipping. It can very easily be made an
option but with a few strips with overlapping durations it makes view
too crowded and difficult to make out.
* Threaded waveform loading + code that restores waveforms on undo (not
used though, since sound_load recreates everything. There's a patch for
review D876)
* Toggle to enable backdrop in the strip sequence editor
* Toggle to easily turn on/off waveform display
* Snapping during transform on sequence boundaries. Snapping to start or
end of selection depends on position of mouse when invoking the operator
* Snapping of timeline indicator in sequencer to strip boundaries. To
use just press and hold ctrl while dragging.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D904
2014-11-24 18:23:44 +01:00
Sergey Sharybin
80d1d624d3 Support dynamic loading of SDL libraries
This is mainly to address old issue when one need to have SDL library installed
in order to use our official builds. Some hip distros already installs SDL,
but it's not quite the same across all the variety of the distros.

We also now switching to SDL-2.0, most of the distros have it in repositories
already, so it shouldn't be huge deal to install it if needed.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D878
2014-11-17 17:43:18 +05:00
Campbell Barton
eaaeae4699 Cleanup: spelling 2014-10-23 10:38:38 +02:00
Jörg Müller
31e1a31fee Bugfix T41133: Audio: Speakers with animated pitch cause clicks in rendered animations, crashes or huge filesizes in rendered audio
Crash happened when the pitch value got <= 0, preventing this now.
2014-07-21 14:25:10 +02:00
Jörg Müller
38fcc3e14b Fix T40280: sequencer sound strips with an end at a negative time kept playing
The bug was caused by using negative numbers as the end for playing forever (or until the end of the sound is reached) in the library. This was used with speaker objects which have an end of FLT_MAX now instead and the negative number interpretation was removed. I hope this doesn't break anything else.
2014-05-20 23:01:56 +02:00
Jörg Müller
9351e872f5 Fix T39607: Audio not in synch when the blend file loads.
The problem here was that animation buffers got initialized with zeros in the beginning for unknown parts. Now it gets initialized with the first known value.
The bug's result was that the animation of the pitch started with 0 on first playback and thus any seeking while the pitch is zero resulted in seeking to the beginning.
2014-04-15 19:19:56 +02:00
Jörg Müller
b977cfd28b Fix T37293: trying to fix scrubbing not stopping playback 2014-03-10 12:34:08 +01:00
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