diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2022-07-26 00:43:48 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2022-07-26 00:43:48 +0300 |
commit | f081e76037432cb926be45e980eac201d337032c (patch) | |
tree | dd1225521c12ea21c0b0c3d51ec1ae3f8730755f /source/blender/blenkernel/intern/sound.c | |
parent | fa2084ae58a77b1201289b6bedac427f73c762d1 (diff) | |
parent | 462f99bf38648a08226b1fba423315aec2bc577b (diff) |
Merge branch 'master' into geometry-nodes-iterative-cachegeometry-nodes-rigid-body-integration
Diffstat (limited to 'source/blender/blenkernel/intern/sound.c')
-rw-r--r-- | source/blender/blenkernel/intern/sound.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 343a829cf76..f459b5a82ac 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -804,7 +804,7 @@ void BKE_sound_set_scene_volume(Scene *scene, float volume) } AUD_Sequence_setAnimationData(scene->sound_scene, AUD_AP_VOLUME, - CFRA, + scene->r.cfra, &volume, (scene->audio.flag & AUDIO_VOLUME_ANIMATED) != 0); } @@ -855,7 +855,7 @@ static double get_cur_time(Scene *scene) /* We divide by the current framelen to take into account time remapping. * Otherwise we will get the wrong starting time which will break A/V sync. * See T74111 for further details. */ - return FRA2TIME((CFRA + SUBFRA) / (double)scene->r.framelen); + return FRA2TIME((scene->r.cfra + scene->r.subframe) / (double)scene->r.framelen); } void BKE_sound_play_scene(Scene *scene) @@ -911,7 +911,7 @@ void BKE_sound_seek_scene(Main *bmain, Scene *scene) int animation_playing; const double one_frame = 1.0 / FPS; - const double cur_time = FRA2TIME(CFRA); + const double cur_time = FRA2TIME(scene->r.cfra); AUD_Device_lock(sound_device); @@ -1131,13 +1131,13 @@ static void sound_update_base(Scene *scene, Object *object, void *new_set) mat4_to_quat(quat, object->obmat); AUD_SequenceEntry_setAnimationData( - strip->speaker_handle, AUD_AP_LOCATION, CFRA, object->obmat[3], 1); + strip->speaker_handle, AUD_AP_LOCATION, scene->r.cfra, object->obmat[3], 1); AUD_SequenceEntry_setAnimationData( - strip->speaker_handle, AUD_AP_ORIENTATION, CFRA, quat, 1); + strip->speaker_handle, AUD_AP_ORIENTATION, scene->r.cfra, quat, 1); AUD_SequenceEntry_setAnimationData( - strip->speaker_handle, AUD_AP_VOLUME, CFRA, &speaker->volume, 1); + strip->speaker_handle, AUD_AP_VOLUME, scene->r.cfra, &speaker->volume, 1); AUD_SequenceEntry_setAnimationData( - strip->speaker_handle, AUD_AP_PITCH, CFRA, &speaker->pitch, 1); + strip->speaker_handle, AUD_AP_PITCH, scene->r.cfra, &speaker->pitch, 1); AUD_SequenceEntry_setSound(strip->speaker_handle, speaker->sound->playback_handle); AUD_SequenceEntry_setMuted(strip->speaker_handle, mute); } @@ -1172,8 +1172,8 @@ void BKE_sound_update_scene(Depsgraph *depsgraph, Scene *scene) if (scene->camera) { mat4_to_quat(quat, scene->camera->obmat); AUD_Sequence_setAnimationData( - scene->sound_scene, AUD_AP_LOCATION, CFRA, scene->camera->obmat[3], 1); - AUD_Sequence_setAnimationData(scene->sound_scene, AUD_AP_ORIENTATION, CFRA, quat, 1); + scene->sound_scene, AUD_AP_LOCATION, scene->r.cfra, scene->camera->obmat[3], 1); + AUD_Sequence_setAnimationData(scene->sound_scene, AUD_AP_ORIENTATION, scene->r.cfra, quat, 1); } AUD_destroySet(scene->speaker_handles); |