SoundFrame.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002  * SoundFrame.h (JackFX) 
00003  ******************************************************************************/
00004 
00005 #ifndef _SOUND_FRAME_H_
00006 #define _SOUND_FRAME_H_
00007 
00008 #include "common.h"
00009 class JackClient;
00010 
00014 class SoundFrame 
00015 {
00016     public:
00019         SoundFrame();
00020         SoundFrame(jack_nframes_t count);
00021         SoundFrame(jack_default_audio_sample_t* data, jack_nframes_t count);
00022 
00023         void Set();
00024         void Set(const SoundFrame& f);
00025         void Set(jack_nframes_t count);
00026         void Set(jack_default_audio_sample_t* data, jack_nframes_t count);
00027 
00028         void Zero();
00029 
00032         ~SoundFrame();
00033 
00034         jack_time_t FrameTime();
00035         jack_time_t SampleTime(jack_nframes_t offset);
00036 
00037         jack_nframes_t SampleCount() const { return m_samplecount; }
00038         jack_default_audio_sample_t* GetSamples() const { return m_samples; }
00039 
00040         SoundFrame& operator+=(const SoundFrame& f);
00041         SoundFrame& operator*=(const SoundFrame& f);
00042         SoundFrame& operator*=(float scalar);
00043 
00044         SoundFrame& operator=(const SoundFrame& f);
00045 
00046     protected:
00047     private:
00048         jack_default_audio_sample_t* m_samples;
00049         jack_nframes_t m_samplecount;
00050 
00051         bool m_mallocd;
00052 };
00053 
00054 
00055 SoundFrame operator+(const SoundFrame& f1, const SoundFrame& f2);
00056 SoundFrame operator*(const SoundFrame& f1, const SoundFrame& f2);
00057 SoundFrame operator*(const SoundFrame& f1, float scalar);
00058 
00059 ostream& operator<<(ostream& o, const SoundFrame& sf);
00060 
00061 #endif

Get JackFX at SourceForge.net. Fast, secure and Free Open Source software downloads
Generated for JackFX by  doxygen