[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11683] branches/soc-2007-hcube/intern/ tinySND/intern/SND_FXMixer.cpp: Added callback interface.

Csaba Hruska csaba.hruska at gmail.com
Sun Aug 19 12:35:14 CEST 2007


Revision: 11683
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11683
Author:   hcube
Date:     2007-08-19 12:35:14 +0200 (Sun, 19 Aug 2007)

Log Message:
-----------
Added callback interface.

Modified Paths:
--------------
    branches/soc-2007-hcube/intern/tinySND/intern/SND_FXMixer.cpp

Modified: branches/soc-2007-hcube/intern/tinySND/intern/SND_FXMixer.cpp
===================================================================
--- branches/soc-2007-hcube/intern/tinySND/intern/SND_FXMixer.cpp	2007-08-19 10:34:58 UTC (rev 11682)
+++ branches/soc-2007-hcube/intern/tinySND/intern/SND_FXMixer.cpp	2007-08-19 10:35:14 UTC (rev 11683)
@@ -5,6 +5,11 @@
 
 SND_FXMixer::SND_FXMixer(void)
 {
+	// clear callback
+	mCallback = 0;
+	mUserData1 = 0;
+	mUserData2 = 0;
+	
 	mSampleRate = 0.0;
 	mGain = 1.0;
 	mIsMuted = false;
@@ -121,6 +126,12 @@
 
 	// compressor effect is not implemented, maybe in the future
 		
+ 	// call callback
+	if( mCallback != 0 )
+	{
+		(*mCallback)( framesNum, mUserData1, mUserData2 );
+	}
+ 
 	// collect sounds where data is available, count them
 	sndNum = 0;
 	for( i = mSounds.begin() ; i != mSounds.end() ; ++i )





More information about the Bf-blender-cvs mailing list