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:
authorRichard Antalik <richardantalik@gmail.com>2020-04-06 00:55:51 +0300
committerRichard Antalik <richardantalik@gmail.com>2020-04-06 00:55:51 +0300
commit0d0036cb53f83597aa8a52edd0e19fd915f4ed65 (patch)
treec826a7f824ddd19dd37dd84be47e457ad0bcaced /source/blender/editors/space_sequencer/sequencer_preview.c
parent43cc2f31959277c6c9ecb5b6b6d83c0af6d7923e (diff)
Cleanup: Fix comment style and check if they are valid or make sense.
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_preview.c')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_preview.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_preview.c b/source/blender/editors/space_sequencer/sequencer_preview.c
index d50047c4839..7d416884721 100644
--- a/source/blender/editors/space_sequencer/sequencer_preview.c
+++ b/source/blender/editors/space_sequencer/sequencer_preview.c
@@ -52,9 +52,9 @@ typedef struct PreviewJobAudio {
struct PreviewJobAudio *next, *prev;
struct Main *bmain;
bSound *sound;
- int lr; /* sample left or right */
+ int lr; /* Sample left or right. */
int startframe;
- bool waveform; /* reload sound or waveform */
+ bool waveform; /* Reload sound or waveform. */
} PreviewJobAudio;
static void free_preview_job(void *data)
@@ -66,7 +66,7 @@ static void free_preview_job(void *data)
MEM_freeN(pj);
}
-/* only this runs inside thread */
+/* Only this runs inside thread. */
static void preview_startjob(void *data, short *stop, short *do_update, float *progress)
{
PreviewJob *pj = data;
@@ -89,7 +89,7 @@ static void preview_startjob(void *data, short *stop, short *do_update, float *p
while (previewjb) {
sound = previewjb->sound;
- /* make sure we cleanup the loading flag! */
+ /* Make sure we cleanup the loading flag! */
BLI_spin_lock(sound->spinlock);
sound->tags &= ~SOUND_TAGS_WAVEFORM_LOADING;
BLI_spin_unlock(sound->spinlock);
@@ -127,7 +127,6 @@ static void preview_endjob(void *data)
void sequencer_preview_add_sound(const bContext *C, Sequence *seq)
{
- /* first, get the preview job, if it exists */
wmJob *wm_job;
PreviewJob *pj;
ScrArea *area = CTX_wm_area(C);
@@ -139,6 +138,7 @@ void sequencer_preview_add_sound(const bContext *C, Sequence *seq)
WM_JOB_PROGRESS,
WM_JOB_TYPE_SEQ_BUILD_PREVIEW);
+ /* Get the preview job if it exists. */
pj = WM_jobs_customdata_get(wm_job);
if (!pj) {
@@ -152,8 +152,6 @@ void sequencer_preview_add_sound(const bContext *C, Sequence *seq)
WM_jobs_callbacks(wm_job, preview_startjob, NULL, NULL, preview_endjob);
}
- /* attempt to lock mutex of job here */
-
audiojob->bmain = CTX_data_main(C);
audiojob->sound = seq->sound;