[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11086] branches/soc-2007-hcube/intern/ tinySND/blender/SND_C-api.cpp: Added getSoundInfo implementation.

Csaba Hruska csaba.hruska at gmail.com
Wed Jun 27 15:37:25 CEST 2007


Revision: 11086
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11086
Author:   hcube
Date:     2007-06-27 15:37:24 +0200 (Wed, 27 Jun 2007)

Log Message:
-----------
Added getSoundInfo implementation. 

Modified Paths:
--------------
    branches/soc-2007-hcube/intern/tinySND/blender/SND_C-api.cpp

Modified: branches/soc-2007-hcube/intern/tinySND/blender/SND_C-api.cpp
===================================================================
--- branches/soc-2007-hcube/intern/tinySND/blender/SND_C-api.cpp	2007-06-27 13:36:23 UTC (rev 11085)
+++ branches/soc-2007-hcube/intern/tinySND/blender/SND_C-api.cpp	2007-06-27 13:37:24 UTC (rev 11086)
@@ -125,7 +125,7 @@
 	gSamples.push_back( fxsample );
 
 	gFXMixerLeft->addSound( fxsrc );
-	gFXMixerRight->addSound( fxsrc );
+	//gFXMixerRight->addSound( fxsrc );
 	
 	return (SND_SoundIHandle)fxsample;
 }
@@ -184,11 +184,11 @@
 {
 	assert( sound != 0 );
 
-// !!!!!!!!! UNIMPLEMENTED YET !!!!!!!!!!!!!!!!!
-	sndInfo->channelsNum = 2;
-	sndInfo->framesNum = 60;
-	sndInfo->bitRate = 16;
-	sndInfo->frameRate = 44100.0;
+	SND_FXSample *sample = (SND_FXSample*)sound;
+	sndInfo->channelsNum	= 1; // UNIMPLEMENTED YET
+	sndInfo->framesNum		= sample->getNumFrames();
+	sndInfo->bitRate		= sample->getBitRate();
+	sndInfo->frameRate		= sample->getSampleRate();
 }
 
 void SND_StopAllSounds(void)





More information about the Bf-blender-cvs mailing list