Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2015-01-28 21:45:16 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-01-28 21:45:29 +0300
commit773d85ab320b0a115ef23321435649e1a8a1ef63 (patch)
tree265efab63d8f46ce971262229ff53c5e4992dd83 /source/blender/blenloader
parent424100cecbb202004e1687d5066b2c88e7a58f58 (diff)
Based on Sergey's suggestion, use spinlocks for threaded loading of
waveforms.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 34ad6d3ea61..9daa6931282 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6872,9 +6872,10 @@ static void direct_link_sound(FileData *fd, bSound *sound)
sound->waveform = NULL;
}
- if (sound->mutex)
- sound->mutex = BLI_mutex_alloc();
-
+ if (sound->spinlock) {
+ sound->spinlock = MEM_mallocN(sizeof(SpinLock), "sound_spinlock");
+ BLI_spin_init(sound->spinlock);
+ }
/* clear waveform loading flag */
sound->flags &= ~SOUND_FLAGS_WAVEFORM_LOADING;