Blender
V5.3
source
blender
depsgraph
intern
eval
deg_eval_runtime_backup_sound.cc
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2019 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9
#include "
intern/eval/deg_eval_runtime_backup_sound.h
"
10
11
#include "
DNA_sound_types.h
"
12
13
namespace
blender::deg
{
14
15
SoundBackup::SoundBackup
(
const
Depsgraph
*
/*depsgraph*/
)
16
{
17
reset
();
18
}
19
20
void
SoundBackup::reset
()
21
{
22
this->
cache
=
nullptr
;
23
this->
waveform
=
nullptr
;
24
this->
playback_handle
=
nullptr
;
25
}
26
27
void
SoundBackup::init_from_sound
(
bSound
*sound)
28
{
29
BKE_sound_runtime_state_get_and_clear
(
30
sound, &this->
cache
, &this->
playback_handle
, &this->
waveform
);
31
}
32
33
void
SoundBackup::restore_to_sound
(
bSound
*sound)
34
{
35
BKE_sound_runtime_state_set
(sound, this->
cache
, this->
playback_handle
, this->
waveform
);
36
reset
();
37
}
38
39
}
// namespace blender::deg
DNA_sound_types.h
blender::deg::SoundBackup::waveform
Vector< float > * waveform
Definition
deg_eval_runtime_backup_sound.h:33
blender::deg::SoundBackup::SoundBackup
SoundBackup(const Depsgraph *depsgraph)
Definition
deg_eval_runtime_backup_sound.cc:15
blender::deg::SoundBackup::init_from_sound
void init_from_sound(bSound *sound)
Definition
deg_eval_runtime_backup_sound.cc:27
blender::deg::SoundBackup::playback_handle
AUD_Sound playback_handle
Definition
deg_eval_runtime_backup_sound.h:32
blender::deg::SoundBackup::cache
AUD_Sound cache
Definition
deg_eval_runtime_backup_sound.h:31
blender::deg::SoundBackup::restore_to_sound
void restore_to_sound(bSound *sound)
Definition
deg_eval_runtime_backup_sound.cc:33
blender::deg::SoundBackup::reset
void reset()
Definition
deg_eval_runtime_backup_sound.cc:20
deg_eval_runtime_backup_sound.h
blender::deg
Definition
DEG_depsgraph_light_linking.hh:15
blender::BKE_sound_runtime_state_set
void BKE_sound_runtime_state_set(const bSound *sound, AUD_Sound cache, AUD_Sound playback_handle, Vector< float > *waveform)
Definition
blenkernel/intern/sound.cc:2139
blender::BKE_sound_runtime_state_get_and_clear
void BKE_sound_runtime_state_get_and_clear(const bSound *sound, AUD_Sound *r_cache, AUD_Sound *r_playback_handle, Vector< float > **r_waveform)
Definition
blenkernel/intern/sound.cc:2125
blender::bSound
Definition
DNA_sound_types.h:33
blender::deg::Depsgraph
Definition
depsgraph.hh:50
Generated on
for Blender by
doxygen
1.18.0