diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-06-04 17:52:48 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-06-05 15:23:54 +0300 |
commit | bbaa1bffe9dbc35d2791b83d0014ccb4ffb6087a (patch) | |
tree | d0ded24e2fb254943831cacca7c28b7752e57eae /source/blender/makesdna | |
parent | 863b7b3668fe67a082439181eaf49c3e94a87536 (diff) |
Sound: Port to a copy-on-write concept
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.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_ID.h | 14 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_sequence_types.h | 3 |
2 files changed, 14 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 5a666653043..139cb298710 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -448,9 +448,7 @@ typedef enum ID_Type { /* No copy-on-write for these types. * Keep in sync with check_datablocks_copy_on_writable and deg_copy_on_write_is_needed */ -/* TODO(sergey): Make Sound copyable. It is here only because the code for dependency graph is - * being work in progress. */ -#define ID_TYPE_IS_COW(_id_type) (!ELEM(_id_type, ID_BR, ID_LS, ID_PAL, ID_IM, ID_SO)) +#define ID_TYPE_IS_COW(_id_type) (!ELEM(_id_type, ID_BR, ID_LS, ID_PAL, ID_IM)) #ifdef GS # undef GS @@ -604,6 +602,16 @@ typedef enum IDRecalcFlag { */ ID_RECALC_COPY_ON_WRITE = (1 << 13), + /* Sequences in the sequencer did change. + * Use this tag with a scene ID which owns the sequences. */ + ID_RECALC_SEQUENCER_STRIPS = (1 << 14), + + ID_RECALC_AUDIO_SEEK = (1 << 15), + ID_RECALC_AUDIO_FPS = (1 << 16), + ID_RECALC_AUDIO_VOLUME = (1 << 17), + ID_RECALC_AUDIO_MUTE = (1 << 18), + ID_RECALC_AUDIO_LISTENER = (1 << 19), + /*************************************************************************** * Pseudonyms, to have more semantic meaning in the actual code without * using too much low-level and implementation specific tags. */ diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index c21fa2ba64e..5240de4aff9 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -232,6 +232,9 @@ typedef struct Sequence { int cache_flag; int _pad2[3]; + + struct Sequence *orig_sequence; + void *_pad3; } Sequence; typedef struct MetaStack { |