Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/sound.c
| Show First 20 Lines • Show All 149 Lines • ▼ Show 20 Lines | |||||
| #endif /* WITH_AUDASPACE */ | #endif /* WITH_AUDASPACE */ | ||||
| if (sound->spinlock) { | if (sound->spinlock) { | ||||
| BLI_spin_end(sound->spinlock); | BLI_spin_end(sound->spinlock); | ||||
| MEM_freeN(sound->spinlock); | MEM_freeN(sound->spinlock); | ||||
| sound->spinlock = NULL; | sound->spinlock = NULL; | ||||
| } | } | ||||
| } | } | ||||
| /** | |||||
| * Only copy internal data of Sound ID from source to already allocated/initialized destination. | |||||
| * You probably nerver want to use that directly, use id_copy or BKE_id_copy_ex for typical needs. | |||||
| * | |||||
| * WARNING! This function will not handle ID user count! | |||||
| * | |||||
| * \param flag Copying options (see BKE_library.h's LIB_ID_COPY_... flags for more). | |||||
| */ | |||||
| void BKE_sound_copy_data(Main *bmain, bSound *sound_dst, const bSound *UNUSED(sound_src), const int UNUSED(flag)) | |||||
| { | |||||
| sound_dst->handle = NULL; | |||||
| sound_dst->cache = NULL; | |||||
| sound_dst->waveform = NULL; | |||||
| sound_dst->playback_handle = NULL; | |||||
| sound_dst->spinlock = NULL; /* Think this is OK? Otherwise, easy to create new spinlock here... */ | |||||
| /* Just to be sure, should not have any value actually after reading time. */ | |||||
| sound_dst->ipo = NULL; | |||||
| sound_dst->newpackedfile = NULL; | |||||
| if (sound_dst->packedfile) { | |||||
| sound_dst->packedfile = dupPackedFile(sound_dst->packedfile); | |||||
| } | |||||
| /* Initialize whole runtime (audaspace) stuff. */ | |||||
| BKE_sound_load(bmain, sound_dst); | |||||
| } | |||||
| void BKE_sound_make_local(Main *bmain, bSound *sound, const bool lib_local) | void BKE_sound_make_local(Main *bmain, bSound *sound, const bool lib_local) | ||||
| { | { | ||||
| BKE_id_make_local_generic(bmain, &sound->id, true, lib_local); | BKE_id_make_local_generic(bmain, &sound->id, true, lib_local); | ||||
| } | } | ||||
| #ifdef WITH_AUDASPACE | #ifdef WITH_AUDASPACE | ||||
| static const char *force_device = NULL; | static const char *force_device = NULL; | ||||
| ▲ Show 20 Lines • Show All 786 Lines • Show Last 20 Lines | |||||