[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11609] branches/soc-2007-hcube/source/ blender: Added get/set frame position functions
Csaba Hruska
csaba.hruska at gmail.com
Wed Aug 15 10:26:17 CEST 2007
Revision: 11609
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11609
Author: hcube
Date: 2007-08-15 10:26:16 +0200 (Wed, 15 Aug 2007)
Log Message:
-----------
Added get/set frame position functions
Modified Paths:
--------------
branches/soc-2007-hcube/source/blender/include/BAU_soundsystem.h
branches/soc-2007-hcube/source/blender/include/BSE_seqaudio.h
branches/soc-2007-hcube/source/blender/src/seqaudio.c
branches/soc-2007-hcube/source/blender/src/soundsystem.c
Modified: branches/soc-2007-hcube/source/blender/include/BAU_soundsystem.h
===================================================================
--- branches/soc-2007-hcube/source/blender/include/BAU_soundsystem.h 2007-08-15 04:59:46 UTC (rev 11608)
+++ branches/soc-2007-hcube/source/blender/include/BAU_soundsystem.h 2007-08-15 08:26:16 UTC (rev 11609)
@@ -26,6 +26,9 @@
void audio_sound_play(struct bSound *sound);
void audio_sound_stop(struct bSound *sound);
+int audio_sound_getframeposition(struct bSound *sound);
+void audio_sound_setframeposition(struct bSound *sound, int framePos);
+
void audio_sound_stopall(void);
void audio_sound_loadall(void);
Modified: branches/soc-2007-hcube/source/blender/include/BSE_seqaudio.h
===================================================================
--- branches/soc-2007-hcube/source/blender/include/BSE_seqaudio.h 2007-08-15 04:59:46 UTC (rev 11608)
+++ branches/soc-2007-hcube/source/blender/include/BSE_seqaudio.h 2007-08-15 08:26:16 UTC (rev 11609)
@@ -8,5 +8,8 @@
void seqaudio_stop(void);
void seqaudio_update(void);
+int seqaudio_getframeposition(void);
+void seqaudio_setframeposition(int framePos);
+
// these functions are implemented in seqaudio.c
#endif
Modified: branches/soc-2007-hcube/source/blender/src/seqaudio.c
===================================================================
--- branches/soc-2007-hcube/source/blender/src/seqaudio.c 2007-08-15 04:59:46 UTC (rev 11608)
+++ branches/soc-2007-hcube/source/blender/src/seqaudio.c 2007-08-15 08:26:16 UTC (rev 11609)
@@ -155,6 +155,16 @@
do_seqaudio_update( ed->seqbasep->first );
}
+int seqaudio_getframeposition(void)
+{
+ return CFRA;
+}
+
+void seqaudio_setframeposition(int framePos)
+{
+}
+
+
////////////////////////////////////
// sequencing code OLD
////////////////////////////////////
Modified: branches/soc-2007-hcube/source/blender/src/soundsystem.c
===================================================================
--- branches/soc-2007-hcube/source/blender/src/soundsystem.c 2007-08-15 04:59:46 UTC (rev 11608)
+++ branches/soc-2007-hcube/source/blender/src/soundsystem.c 2007-08-15 08:26:16 UTC (rev 11609)
@@ -471,6 +471,24 @@
SND_StopSound( (SND_SoundIHandle)sound->sample->snd_sample );
}
+int audio_sound_getframeposition(struct bSound *sound)
+{
+ assert( sound != NULL );
+ assert( sound->sample != NULL );
+ assert( sound->sample->snd_sample != NULL );
+
+ return SND_GetSoundFramePos( (SND_SoundIHandle)sound->sample->snd_sample );
+}
+
+void audio_sound_setframeposition(struct bSound *sound, int framePos)
+{
+ assert( sound != NULL );
+ assert( sound->sample != NULL );
+ assert( sound->sample->snd_sample != NULL );
+
+ SND_SeekSound( (SND_SoundIHandle)sound->sample->snd_sample, framePos );
+}
+
void audio_sound_stopall(void)
{
SND_StopAllSounds();
More information about the Bf-blender-cvs
mailing list