Commit Graph

350 Commits

Author SHA1 Message Date
Jörg Müller
91bb8da59f Cleanup: clangg-format for rB157cc54ed521 2019-04-28 11:48:55 +02:00
Jörg Müller
157cc54ed5 Fix T63899: Can't get sound.factory on Windows 2019-04-27 00:13:43 +02:00
Sergey Sharybin
b92d777d16 Fix compilation error when using SDL dynamic loading 2019-04-18 12:10:08 +02:00
Campbell Barton
e12c08e8d1 ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.

For details on usage and instructions for migrating branches
without conflicts, see:

https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-17 06:21:24 +02:00
Campbell Barton
5498e7f193 CMake: add library deps to CMakeLists.txt
Tested to work on Linux and macOS.

This will be enabled once all platforms are verified.

See D4684
2019-04-16 06:20:52 +02:00
Campbell Barton
47adab4f99 CMake: prepare for BLENDER_SORTED_LIBS removal
No functional change, this adds LIB definition and args to cmake files.
Without this it's difficult to migrate away from 'BLENDER_SORTED_LIBS'
since there are many platforms/configurations that could break when
changing linking order.

Manually add and enable WITHOUT_SORTED_LIBS to try building
without sorted libs (currently fails since all variables are empty).
This check will eventually be removed.

See T46725.
2019-04-14 15:37:24 +02:00
Sybren A. Stüvel
3b2ea26554 Fix segfault when audio system cannot be initialised
`PyInit_aud()` can return `NULL` for variour reasons. When that happens,
we shouldn't continue.
2019-04-04 17:59:46 +02:00
Campbell Barton
de13d0a80c doxygen: add newline after \file
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
Campbell Barton
eef4077f18 Cleanup: remove redundant doxygen \file argument
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
Campbell Barton
65ec7ec524 Cleanup: remove redundant, invalid info from headers
BF-admins agree to remove header information that isn't useful,
to reduce noise.

- BEGIN/END license blocks

  Developers should add non license comments as separate comment blocks.
  No need for separator text.

- Contributors

  This is often invalid, outdated or misleading
  especially when splitting files.

  It's more useful to git-blame to find out who has developed the code.

See P901 for script to perform these edits.
2019-02-02 01:36:28 +11:00
Jörg Müller
986267300b Audaspace: Moving audaspace 1.3 into extern.
Deleting the old internal audaspace.

Major changes from there are:
- The whole library was refactored to use C++11.
- Many stability and performance improvements.
- Major Python API refactor:
 - Most requested: Play self generated sounds using numpy arrays.
 - For games: Sound list, random sounds and dynamic music.
 - Writing sounds to files.
 - Sequencing API.
 - Opening sound devices, eg. Jack.
- Ability to choose different OpenAL devices in the user settings.
2017-08-18 08:24:12 +02:00
Sergey Sharybin
2c515df83d Audaspace: Don't use strict flags 2017-05-30 10:58:12 +02:00
Jörg Müller
f75b52eca1 Fix T50843: Pitched Audio renders incorrectly in VSE
There was a bug in the intended code behaviour to always seek with a
pitch of 1.0 regardless of pitch/pitch animation/doppler effects.

Check the bug report for a more detailed explanation of problems
concerning pitch and seeking.
2017-03-05 12:19:32 +01:00
Joerg Mueller
3340acd46b Fix T50065: Audaspace: some values of the lower limit of Factory.limit causes the factory not to play
Backport of upstream audaspace bugfix (ddd9a4d).
2016-11-28 17:23:44 +01:00
Aaron Carlisle
cf9a6b416c API: Fix Links
Self-explanatory. to find broken links run `sphinx-build -b linkcheck sphinx-in sphinx-out`

Reviewers: mont29

Tags: #bf_blender, #python, #infrastructure:_websites

Differential Revision: https://developer.blender.org/D2297
2016-10-25 17:34:01 +02:00
Jörg Müller
132478d4b8 Fix T49657: Audio backend "Jack" should be named "JACK". 2016-10-22 14:20:47 +02:00
Jörg Müller
d5ee031f76 Fix T49764: Audio strips crackle when animating the volume
- Implemented linear interpolation for volume changes in the software
mixer.
- Using this in the software device.
2016-10-22 13:39:55 +02:00
Sergey Sharybin
538b30250d Audapsace: Make it work with Jack and no libjack-dev package installed
@neXyon, mind backporting it to your upstream? :)
2016-08-01 20:39:54 +02:00
Jörg Müller
4cbefde47c Audaspace: fix incorrect parameter check in python API.
Found by PVS-Studio T48917
2016-07-23 13:35:36 +02:00
Sergey Sharybin
d3fa1bd4d5 Fix warnings reported by MSVC
Mainly it's related on a bad practice in SDL to force-define __SSE__
and __SSE2__ flags which generates quite some warnings and causes too
much noise.

There are some other warnings fixed. Should be no functional changes.

NeXyon, please check the changes in audaspace :)
2016-02-23 09:44:54 +01:00
Sergey Sharybin
0b03785eb5 Make Blender compilable with FFmpeg-3.0
While it's not something we'll be using for the official release,
it's nice to support new libraries at least on "it compiles" level,
so it's not that many frustrated developers around.

Nexyon, please have a look into Audaspace changes :)
2016-02-16 12:34:15 +01:00
Sergey Sharybin
5d99cde822 Remove SCons building system
While SCons building system was serving us really good for ages it's no longer
having much attention by the developers and started to become quite a difficult
task to maintain.

What's even worse -- there started to be quite serious divergence between SCons
and CMake which was only accumulating over the releases now. The fact that none
of the active developers are really using SCons and that our main studio is also
using CMake spotting bugs in the SCons builds became quite a difficult task and
we aren't always spotting them in time.

Meanwhile CMake became really mature building system which is available on every
platform we support and arguably it's also easier and more robust to use.

This commit includes:

- Removal of actual SCons building system
- Removal of SCons git submodule
- Removal of documentation which is stored in the sources and covers SCons
- Tweaks to the buildbot master to stop using SCons submodule
  (this change requires deploying to the server)
- Tweaks to the install dependencies script to skip installing or mentioning
  SCons building system
- Tweaks to various helper scripts to avoid mention of SCons folders/files
  as well

Reviewers: mont29, dingto, dfelinto, lukastoenne, lukasstockner97, brecht, Severin, merwin, aligorith, psy-fi, campbellbarton, juicyfruit

Reviewed By: campbellbarton, juicyfruit

Differential Revision: https://developer.blender.org/D1680
2016-01-04 14:20:48 +05:00
Jörg Müller
fcc68a02e9 Fix T47064: Change Audio defaults to 48 kHz
Historically blender had an audio sample rate of 44.1 kHz as default which is mostly popular because it's the sample rate of audio CDs. Audaspace kept using this default from the pre 2.5 era. It was about time to change to 48 kHz, which is a more widespread standard nowadays, especially in video. It is the recommended sampling rate of the Audio Engineering Society.

Further reading: https://en.wikipedia.org/wiki/44,100_Hz#Status
2015-12-27 16:33:54 +01:00
Jörg Müller
3cd36f85b0 Fix T46815: Changing playback setting makes blender crash
Copied the fix from upstream audaspace.
2015-12-02 10:23:07 +01:00
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