Commit: 710a05954990c347932b9f540a1b220ea2c5c0da
Author: Bastien Montagne
Date:   Fri Jul 20 12:11:34 2018 +0200
Branches: master
https://developer.blender.org/rB710a05954990c347932b9f540a1b220ea2c5c0da

Cleanup: Move 'WAVEFORM_LOADING' of sounds from flags to tags.

This is purely runtime data, so move it to new tags. ;)

===================================================================

M       source/blender/blenkernel/intern/sound.c
M       source/blender/blenloader/intern/readfile.c
M       source/blender/editors/space_sequencer/sequencer_draw.c
M       source/blender/editors/space_sequencer/sequencer_preview.c
M       source/blender/makesdna/DNA_sound_types.h

===================================================================

diff --git a/source/blender/blenkernel/intern/sound.c 
b/source/blender/blenkernel/intern/sound.c
index 709a0022767..d21055ada6a 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -798,7 +798,7 @@ void BKE_sound_read_waveform(bSound *sound, short *stop)
                }
                MEM_freeN(waveform);
                BLI_spin_lock(sound->spinlock);
-               sound->flags &= ~SOUND_FLAGS_WAVEFORM_LOADING;
+               sound->tags &= ~SOUND_TAGS_WAVEFORM_LOADING;
                BLI_spin_unlock(sound->spinlock);
                return;
        }
@@ -807,7 +807,7 @@ void BKE_sound_read_waveform(bSound *sound, short *stop)
 
        BLI_spin_lock(sound->spinlock);
        sound->waveform = waveform;
-       sound->flags &= ~SOUND_FLAGS_WAVEFORM_LOADING;
+       sound->tags &= ~SOUND_TAGS_WAVEFORM_LOADING;
        BLI_spin_unlock(sound->spinlock);
 }
 
diff --git a/source/blender/blenloader/intern/readfile.c 
b/source/blender/blenloader/intern/readfile.c
index 1d772a15efd..bdfae79a1d0 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -7565,7 +7565,7 @@ static void direct_link_sound(FileData *fd, bSound *sound)
                BLI_spin_init(sound->spinlock);
        }
        /* clear waveform loading flag */
-       sound->flags &= ~SOUND_FLAGS_WAVEFORM_LOADING;
+       sound->tags &= ~SOUND_TAGS_WAVEFORM_LOADING;
 
        sound->packedfile = direct_link_packedfile(fd, sound->packedfile);
        sound->newpackedfile = direct_link_packedfile(fd, sound->newpackedfile);
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c 
b/source/blender/editors/space_sequencer/sequencer_draw.c
index 97c42cc11e0..915e2466d54 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -220,9 +220,9 @@ static void drawseqwave(const bContext *C, SpaceSeq *sseq, 
Scene *scene, Sequenc
 
                BLI_spin_lock(sound->spinlock);
                if (!sound->waveform) {
-                       if (!(sound->flags & SOUND_FLAGS_WAVEFORM_LOADING)) {
+                       if (!(sound->tags & SOUND_TAGS_WAVEFORM_LOADING)) {
                                /* prevent sounds from reloading */
-                               sound->flags |= SOUND_FLAGS_WAVEFORM_LOADING;
+                               sound->tags |= SOUND_TAGS_WAVEFORM_LOADING;
                                BLI_spin_unlock(sound->spinlock);
                                sequencer_preview_add_sound(C, seq);
                        }
diff --git a/source/blender/editors/space_sequencer/sequencer_preview.c 
b/source/blender/editors/space_sequencer/sequencer_preview.c
index c58c05b67c0..ae011e48538 100644
--- a/source/blender/editors/space_sequencer/sequencer_preview.c
+++ b/source/blender/editors/space_sequencer/sequencer_preview.c
@@ -96,7 +96,7 @@ static void preview_startjob(void *data, short *stop, short 
*do_update, float *p
 
                                /* make sure we cleanup the loading flag! */
                                BLI_spin_lock(sound->spinlock);
-                               sound->flags &= ~SOUND_FLAGS_WAVEFORM_LOADING;
+                               sound->tags &= ~SOUND_TAGS_WAVEFORM_LOADING;
                                BLI_spin_unlock(sound->spinlock);
 
                                BLI_mutex_lock(pj->mutex);
diff --git a/source/blender/makesdna/DNA_sound_types.h 
b/source/blender/makesdna/DNA_sound_types.h
index 7778582b82d..02d3aa928c7 100644
--- a/source/blender/makesdna/DNA_sound_types.h
+++ b/source/blender/makesdna/DNA_sound_types.h
@@ -125,12 +125,12 @@ enum {
 #endif
        SOUND_FLAGS_CACHING              = (1 << 4),
        SOUND_FLAGS_MONO                 = (1 << 5),
-       SOUND_FLAGS_WAVEFORM_LOADING     = (1 << 6),
 };
 
 /* bSound->tags */
 enum {
        SOUND_TAGS_WAVEFORM_NO_RELOAD    = 1 << 0,  /* Do not free/reset 
waveform on sound load, only used by undo code. */
+       SOUND_TAGS_WAVEFORM_LOADING     = (1 << 6),
 };
 
 /* to DNA_sound_types.h*/

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to