Sound: Make sure spin lock is initialized for new sound datablocks

Should have been done as a part of 9f681bea68.
This commit is contained in:
Sergey Sharybin 2019-05-04 20:34:56 +02:00
parent c02534469a
commit c68c81a870
Notes: blender-bot 2023-02-14 10:04:50 +01:00
Referenced by commit 2b9965122e, Sound: Revert all the recent changes to sound
1 changed files with 3 additions and 0 deletions

View File

@ -103,6 +103,9 @@ bSound *BKE_sound_new_file(Main *bmain, const char *filepath)
BLI_strncpy(sound->name, filepath, FILE_MAX);
/* sound->type = SOUND_TYPE_FILE; */ /* XXX unused currently */
sound->spinlock = MEM_mallocN(sizeof(SpinLock), "sound_spinlock");
BLI_spin_init(sound->spinlock);
BKE_sound_reset_runtime(sound);
return sound;