Age | Commit message (Collapse) | Author |
|
|
|
Using 'name' for the full path of a file reads badly,
especially when id.name is used in related code.
|
|
|
|
- Changing API for time values from float to double for better precision.
- Fixing minor mistakes in the documentation.
- Fixing minor unnecessary large memory allocation.
|
|
It would cause the playhead to be remapped to an other frame than the
one you clicked on.
|
|
When setting the current playback time in BKE_sound_play_scene we didn't
account for the frame length. So the current frame/time would be wrong
when we asked the audio playback what time it was.
This would lead to playback being offset when using time remapping and
AV sync.
Reviewed By: Richard Antalik and Sybren A. Stüvel
Differential Revision: http://developer.blender.org/D7248
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Instead of using anonymous booleans flags, also allows to keep the same
behavior in all cases, without needing special handling from calling
code for our beloved oddballs object proxies...
|
|
This info is now stored in ID tags themselves, so no need to pass an
extra anonymous boolean parameter around, yay!
|
|
Also removed some only used locally from the header, `BKE_lib_id.h`
is already way too big, no need to overload it with unused things.
|
|
Note that `BKE_library.h`/`library.c` were renamed to
`BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here.
Part of T72604.
|
|
Waveform is freed in `sound_load_audio()` when sound length is `queried by BKE_sound_info_get()`.
Add argument free_waveform, so `BKE_sound_info_get()` can skip waveform freeing, as it is not expected to alter sound.
Reviewed By: sybren
Differential Revision: http://developer.blender.org/D6053
|
|
Crash on assert in `sound_verify_evaluated_id()`
Reviewed By: sergey
Maniphest Tasks: T70845
Differential Revision: https://developer.blender.org/D6104
|
|
T68035 by @luzpaz
|
|
Moved the caching code from direct calls in DNA to dependency graph.
In fact, not much was needed to be done apart form removing the direct
cache updates. The rest seemed to work fine.
Possible to avoid full sound file re-load, but doesn't seem this is
causing any issues.
|
|
Avoid ambiguity with terms check & compare.
|
|
|
|
|
|
|
|
|
|
A lot of areas were querying sound information directly using audio handle
which does not exist on an original sound IDs.
This change basically makes it so it's possible to query information about
given sound ID, without worrying about whether it's loaded or not: if it is
needed to load it first it happens automatically (no automatically-opened
handles are left behind though).
While this seems a bit extreme to open files on such queries it is still
better than the old situation when all sound handles were opened on file
load, no matter if it's needed or not. Besides, none of the changed code
paths are performance critical, just handful of tools.
Fixes T65696: Sequencer fails to create a new sound sequence strip via Python
Fixes T65656: Audio strip - SHIFT K crashes Blender
Reviewers: brecht
Reviewed By: brecht
Subscribers: ISS
Maniphest Tasks: T65696, T65656
Differential Revision: https://developer.blender.org/D5061
|
|
|
|
Need to pull in speakers from scene strips and make sure they
are properly updated.
|
|
|
|
Allows to move scene sound update to dependency graph evaluation.
|
|
This change makes it so sound handles are created for evaluated scene,
sequencer and speakers. This allows to have properly evaluated animation
on them.
For the viewport playback sound uses regular dependency graph.
For the final render sound uses dependency graph created for render pipeline,
which now also contains sequencer and sound datablocks.
All the direct sound update calls are replaced with corresponding dependency
graph recalc tag.
|
|
Automated using clang-tidy.
|
|
|
|
This happened to be a bigger rabbit hole to hell than it originally seemed,
and there are higher priority design tasks to be handled (at this point high
priority design task is more important than high priority bug fix).
After talking to Brecht the decision was made to revert to the known isolated
issue, which will allow everyone in the studio work same as prior to last
Friday.
The remaining bits will be worked on after all the design tasks are out of
the way.
This commit reverts:
4cdb4b9532c Fix T64161: Crashing using undo and multiple windows
064273a4ae7 Sound: Port more cases to be a part of dependency graph
2e582f8ab53 Sound: Fix access wrong dependency graph
5fc49d9c915 Sound: add stubs to build without audaspace
c68c81a870b Sound: Make sure spin lock is initialized for new sound datablocks
c02534469ac Sound: Delay creating sound scene handle for until is needed
9f681bea68f Fix T64144: Crash when displaying audio waveforms in VSE
2f79286453e Cleanup: unused vars
bed8ad6f95a Fix crash in background rendering after recent sound changes
773691310f9 Fix T64143: Crash when scrubbing in the graph editor
888852055c1 Sound: Fix for being unable to jump to a frame during playback with A/V sync
6ab7b384645 Sound: More fixes for access of original scene
35db1195455 Sound: Fix access original scene during playback
211c4fd2e9a Depsgraph: Make comment about evaluation more obvious
c5fe16e121e Sound: Make sound handles only be in evaluated datablocks
b4e1e0946bf Depsgraph: Preserve sound and audio pointers through copy-on-write
4eedf784b04 Depsgraph: Store original sequencer strip pointer
6990ef151c1 Sound: Move evaluation to dependency graph
d02da8de23b Sound: Delay opening handlers for until really needed
3369b828916 Depsgraph: Add scene audio component
e8f10d64757 Depsgraph: Tag sequencer for update on changes
6e4b7a6e4d9 Depsgraph: Initial work to cover sequencer
17447ac5a6b Depsgraph: Make sound ID part of the graph
|
|
Mainly covers RNA callbacks which were still doing direct scene update,
which was causing crashes. Now corresponding ID_RECALC flags are used,
so all scenes can update accordingly.
Also tested animated volume/pitch on strips, which now works as well.
Fixes T64133: Assert after changing FPS
Fixes T64154: Immediate crash when changing the current frame on the timeline
Fixes T64185: Client Crashes when the frame position value is changed
Fixes T64190: Blender Crash using Timeline Editor
Fixes T64128: Click to close bug type on timeline
Fixes T64147: Crash when setting current frame from Python
Fixes T64152: Blender Auto-Close on timeline change
|
|
|
|
Should have been done as a part of 9f681bea68f.
|
|
|
|
|
|
|
|
|
|
Quite straightforward change, which makes it so audio handles are
only created inside of evaluated datablocks.
Exception is adding sound strip to the sequencer, which needs an
audio handle to query length and number of channels. This is done
by temporarily loading sound file into an original datablock, and
then tossing it away.
There is an assert in sound.c which verifies that audio system is
used from an evaluated domain, which should help porting all the
cases which are likely missed by this commit.
Some annoying parts:
- `BKE_sound_update_scene()` is iterating over all bases, and does
special ID tags to see whether sound has been handled or not
already. This can not be done the old fashion now.
Ideally, this will be done as a speaker datablock evaluation,
but seems that would require a lock since audio API is not safe
for threading. So this is not a desired way i'd say.
Possible solution here would be to iterate over ID datablocks
using dependency graph query API.
- Frame jump needs to call `BKE_sound_seek_scene()` directly
because there might be some flags assigned to the scene which
could be clear after operator execution is over.
Need to verify if that's the case though. This is a bit hairy
code, so sticking to a safest and known to work approach for
now.
- Removed check for format when opening new sound file.
Maybe we can have some utility function which queries channel
and duration information, leaving the caller's code clean and
tidy.
Tested following cases:
- Adding/removing/moving sequencer's sound strips.
- Adding/moving speakers in viewport.
- Rendering audio.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4779
|
|
The sound handles are still in the original datablocks, so it's easier
to test since there should be no functional changes.
|
|
Needs to be done in order to localize sound handlers to the evaluated
IDs only. This commit might not be fully optimal, since it does more
things on every scene update request, but that will be solved by the
upcoming change which will put those updates to a dependency graph.
|
|
|
|
|
|
|
|
|
|
Previous cleanups didn't account for space after '#'.
|