[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11015] branches/soc-2007-hcube/intern/ tinySND/SND_FXMixer.h: Added attributes for implementation.
Csaba Hruska
csaba.hruska at gmail.com
Fri Jun 22 19:02:35 CEST 2007
Revision: 11015
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11015
Author: hcube
Date: 2007-06-22 19:02:34 +0200 (Fri, 22 Jun 2007)
Log Message:
-----------
Added attributes for implementation.
Added Paths:
-----------
branches/soc-2007-hcube/intern/tinySND/SND_FXMixer.h
Added: branches/soc-2007-hcube/intern/tinySND/SND_FXMixer.h
===================================================================
--- branches/soc-2007-hcube/intern/tinySND/SND_FXMixer.h (rev 0)
+++ branches/soc-2007-hcube/intern/tinySND/SND_FXMixer.h 2007-06-22 17:02:34 UTC (rev 11015)
@@ -0,0 +1,42 @@
+#ifndef __SND_FXMIXER_H__
+#define __SND_FXMIXER_H__
+
+#include <vector>
+#include "SND_SoundInterface.h"
+
+class SND_FXMixer: public SND_SoundInterface
+{
+public:
+ SND_FXMixer();
+ ~SND_FXMixer();
+
+ // only same sample rated sounds are acceptable
+ void addSound(SND_SoundInterface* sound);
+ void removeSound(SND_SoundInterface* sound);
+
+ SND_SoundInterface* getSoundByIdx( int idx );
+ int getNumSounds();
+
+ void setGain( float gain );
+ float getGain();
+
+ bool isMuted();
+ void setMute( bool isMuted );
+
+ float getSampleRate();
+ bool isDataAvailable();
+ float* getPCMDataPtr( int framesNum );
+
+private:
+ std::vector<SND_SoundInterface*> mSounds;
+ std::vector<float*> mSoundBuffers;
+
+ float *mBuffer;
+ int mBufferSize;
+ float mSampleRate;
+ bool mIsMuted;
+ float mGain;
+};
+
+#endif //__SND_FXMIXER_H__
+
More information about the Bf-blender-cvs
mailing list