[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11743] branches/soc-2007-hcube/source/ blender/src/seqaudio.c: Removed unnecessary seqaudio_update() calls.
Csaba Hruska
csaba.hruska at gmail.com
Mon Aug 20 14:58:34 CEST 2007
Revision: 11743
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11743
Author: hcube
Date: 2007-08-20 14:58:34 +0200 (Mon, 20 Aug 2007)
Log Message:
-----------
Removed unnecessary seqaudio_update() calls.
Modified Paths:
--------------
branches/soc-2007-hcube/source/blender/src/seqaudio.c
Modified: branches/soc-2007-hcube/source/blender/src/seqaudio.c
===================================================================
--- branches/soc-2007-hcube/source/blender/src/seqaudio.c 2007-08-20 12:24:53 UTC (rev 11742)
+++ branches/soc-2007-hcube/source/blender/src/seqaudio.c 2007-08-20 12:58:34 UTC (rev 11743)
@@ -125,21 +125,10 @@
}
}
-static void seqaudio_update(void)
-{
- Editing *ed;
-
- ed = G.scene->ed;
- if( ed != NULL )
- {
- do_seqaudio_update( ed->seqbasep->first );
- }
-}
-
// this will be called before mixing has been done by tinySND
static void do_seqaudio_update_cb( int framesNum, void *userData1, void *userData2 )
{
- seqaudio_update();
+ Editing *ed;
// do scrubbing
--gScrubCounter;
@@ -152,8 +141,19 @@
seqaudio_stop();
}
}
+
+ ed = G.scene->ed;
+ if( ed != NULL )
+ {
+ do_seqaudio_update( ed->seqbasep->first );
+ }
gAudioFrameCounter += framesNum;
+
+ if( gSeqAudioState == SEQAUDIO_STOP )
+ {
+ audio_setcallback( 0, 0, 0 );
+ }
}
void seqaudio_initialize(void)
@@ -183,8 +183,6 @@
gSeqAudioState = SEQAUDIO_PLAY;
audio_setcallback( do_seqaudio_update_cb, 0, 0 );
-
- seqaudio_update();
}
void seqaudio_stop(void)
@@ -197,10 +195,6 @@
}
gSeqAudioState = SEQAUDIO_STOP;
-
- audio_setcallback( 0, 0, 0 );
-
- seqaudio_update();
}
int seqaudio_getframeposition(void)
@@ -230,7 +224,7 @@
// calculate how many seconds should be played
// !!!! NOT IMPLEMENTED YET !!!!
- gScrubCounter = 2;
+ gScrubCounter = 4;
if( gSeqAudioState == SEQAUDIO_STOP )
{
@@ -241,8 +235,6 @@
gSequenceStartFrame = CFRA;
audio_setcallback( do_seqaudio_update_cb, 0, 0 );
-
- seqaudio_update();
}
int seqaudio_mixdown(char *fileName, int sampleRate)
More information about the Bf-blender-cvs
mailing list