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:
-rw-r--r--source/blender/blenkernel/intern/sound.c56
-rw-r--r--source/blender/makesdna/DNA_scene_types.h2
2 files changed, 29 insertions, 29 deletions
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index 30c17773f7d..46a50917427 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -139,8 +139,8 @@ static void sound_sync_callback(void *data, int mode, float time)
BKE_sound_play_scene(scene);
else
BKE_sound_stop_scene(scene);
- if (scene->sound_scene_handle)
- AUD_seek(scene->sound_scene_handle, time);
+ if (scene->playback_handle)
+ AUD_seek(scene->playback_handle, time);
}
scene = scene->id.next;
}
@@ -383,15 +383,15 @@ void BKE_sound_create_scene(struct Scene *scene)
scene->sound_scene = AUD_createSequencer(FPS, scene->audio.flag & AUDIO_MUTE);
AUD_updateSequencerData(scene->sound_scene, scene->audio.speed_of_sound,
scene->audio.doppler_factor, scene->audio.distance_model);
- scene->sound_scene_handle = NULL;
+ scene->playback_handle = NULL;
scene->sound_scrub_handle = NULL;
scene->speaker_handles = NULL;
}
void BKE_sound_destroy_scene(struct Scene *scene)
{
- if (scene->sound_scene_handle)
- AUD_stop(scene->sound_scene_handle);
+ if (scene->playback_handle)
+ AUD_stop(scene->playback_handle);
if (scene->sound_scrub_handle)
AUD_stop(scene->sound_scrub_handle);
if (scene->sound_scene)
@@ -524,13 +524,13 @@ void BKE_sound_update_sequencer(struct Main *main, bSound *sound)
static void sound_start_play_scene(struct Scene *scene)
{
- if (scene->sound_scene_handle)
- AUD_stop(scene->sound_scene_handle);
+ if (scene->playback_handle)
+ AUD_stop(scene->playback_handle);
AUD_setSequencerDeviceSpecs(scene->sound_scene);
- if ((scene->sound_scene_handle = AUD_play(scene->sound_scene, 1)))
- AUD_setLoop(scene->sound_scene_handle, -1);
+ if ((scene->playback_handle = AUD_play(scene->sound_scene, 1)))
+ AUD_setLoop(scene->playback_handle, -1);
}
void BKE_sound_play_scene(struct Scene *scene)
@@ -540,20 +540,20 @@ void BKE_sound_play_scene(struct Scene *scene)
AUD_lock();
- status = scene->sound_scene_handle ? AUD_getStatus(scene->sound_scene_handle) : AUD_STATUS_INVALID;
+ status = scene->playback_handle ? AUD_getStatus(scene->playback_handle) : AUD_STATUS_INVALID;
if (status == AUD_STATUS_INVALID) {
sound_start_play_scene(scene);
- if (!scene->sound_scene_handle) {
+ if (!scene->playback_handle) {
AUD_unlock();
return;
}
}
if (status != AUD_STATUS_PLAYING) {
- AUD_seek(scene->sound_scene_handle, cur_time);
- AUD_resume(scene->sound_scene_handle);
+ AUD_seek(scene->playback_handle, cur_time);
+ AUD_resume(scene->playback_handle);
}
if (scene->audio.flag & AUDIO_SYNC)
@@ -564,8 +564,8 @@ void BKE_sound_play_scene(struct Scene *scene)
void BKE_sound_stop_scene(struct Scene *scene)
{
- if (scene->sound_scene_handle) {
- AUD_pause(scene->sound_scene_handle);
+ if (scene->playback_handle) {
+ AUD_pause(scene->playback_handle);
if (scene->audio.flag & AUDIO_SYNC)
AUD_stopPlayback();
@@ -583,17 +583,17 @@ void BKE_sound_seek_scene(struct Main *bmain, struct Scene *scene)
AUD_lock();
- status = scene->sound_scene_handle ? AUD_getStatus(scene->sound_scene_handle) : AUD_STATUS_INVALID;
+ status = scene->playback_handle ? AUD_getStatus(scene->playback_handle) : AUD_STATUS_INVALID;
if (status == AUD_STATUS_INVALID) {
sound_start_play_scene(scene);
- if (!scene->sound_scene_handle) {
+ if (!scene->playback_handle) {
AUD_unlock();
return;
}
- AUD_pause(scene->sound_scene_handle);
+ AUD_pause(scene->playback_handle);
}
animation_playing = 0;
@@ -606,13 +606,13 @@ void BKE_sound_seek_scene(struct Main *bmain, struct Scene *scene)
if (scene->audio.flag & AUDIO_SCRUB && !animation_playing) {
if (scene->audio.flag & AUDIO_SYNC) {
- AUD_seek(scene->sound_scene_handle, cur_time);
- AUD_seekSequencer(scene->sound_scene_handle, cur_time);
+ AUD_seek(scene->playback_handle, cur_time);
+ AUD_seekSequencer(scene->playback_handle, cur_time);
}
else {
- AUD_seek(scene->sound_scene_handle, cur_time);
+ AUD_seek(scene->playback_handle, cur_time);
}
- AUD_resume(scene->sound_scene_handle);
+ AUD_resume(scene->playback_handle);
if (scene->sound_scrub_handle && AUD_getStatus(scene->sound_scrub_handle) != AUD_STATUS_INVALID) {
AUD_seek(scene->sound_scrub_handle, 0);
}
@@ -620,16 +620,16 @@ void BKE_sound_seek_scene(struct Main *bmain, struct Scene *scene)
if (scene->sound_scrub_handle) {
AUD_stop(scene->sound_scrub_handle);
}
- scene->sound_scrub_handle = AUD_pauseAfter(scene->sound_scene_handle, one_frame);
+ scene->sound_scrub_handle = AUD_pauseAfter(scene->playback_handle, one_frame);
}
}
else {
if (scene->audio.flag & AUDIO_SYNC) {
- AUD_seekSequencer(scene->sound_scene_handle, cur_time);
+ AUD_seekSequencer(scene->playback_handle, cur_time);
}
else {
if (status == AUD_STATUS_PLAYING) {
- AUD_seek(scene->sound_scene_handle, cur_time);
+ AUD_seek(scene->playback_handle, cur_time);
}
}
}
@@ -639,11 +639,11 @@ void BKE_sound_seek_scene(struct Main *bmain, struct Scene *scene)
float BKE_sound_sync_scene(struct Scene *scene)
{
- if (scene->sound_scene_handle) {
+ if (scene->playback_handle) {
if (scene->audio.flag & AUDIO_SYNC)
- return AUD_getSequencerPosition(scene->sound_scene_handle);
+ return AUD_getSequencerPosition(scene->playback_handle);
else
- return AUD_getPosition(scene->sound_scene_handle);
+ return AUD_getPosition(scene->playback_handle);
}
return NAN_FLT;
}
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 7ac00e16aff..ef0e98a14c9 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -1394,7 +1394,7 @@ typedef struct Scene {
ListBase transform_spaces;
void *sound_scene;
- void *sound_scene_handle;
+ void *playback_handle;
void *sound_scrub_handle;
void *speaker_handles;