[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39443] branches/soc-2011-pepper: 3D Audio GSoC:
Joerg Mueller
nexyon at gmail.com
Tue Aug 16 15:00:55 CEST 2011
Revision: 39443
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39443
Author: nexyon
Date: 2011-08-16 13:00:55 +0000 (Tue, 16 Aug 2011)
Log Message:
-----------
3D Audio GSoC:
Code documentation.
Also:
* Fix: rlint for MSVC.
* Minor other small fixes/changes.
Modified Paths:
--------------
branches/soc-2011-pepper/intern/audaspace/FX/AUD_AccumulatorFactory.h
branches/soc-2011-pepper/intern/audaspace/FX/AUD_BaseIIRFilterReader.h
branches/soc-2011-pepper/intern/audaspace/FX/AUD_ButterworthFactory.h
branches/soc-2011-pepper/intern/audaspace/FX/AUD_DelayReader.h
branches/soc-2011-pepper/intern/audaspace/FX/AUD_DoubleFactory.h
branches/soc-2011-pepper/intern/audaspace/FX/AUD_DoubleReader.h
branches/soc-2011-pepper/intern/audaspace/FX/AUD_DynamicIIRFilterFactory.h
branches/soc-2011-pepper/intern/audaspace/FX/AUD_DynamicIIRFilterReader.h
branches/soc-2011-pepper/intern/audaspace/FX/AUD_HighpassFactory.h
branches/soc-2011-pepper/intern/audaspace/FX/AUD_LimiterReader.h
branches/soc-2011-pepper/intern/audaspace/FX/AUD_LowpassFactory.h
branches/soc-2011-pepper/intern/audaspace/FX/AUD_PingPongFactory.h
branches/soc-2011-pepper/intern/audaspace/FX/AUD_PitchReader.h
branches/soc-2011-pepper/intern/audaspace/FX/AUD_ReverseFactory.h
branches/soc-2011-pepper/intern/audaspace/FX/AUD_ReverseReader.h
branches/soc-2011-pepper/intern/audaspace/FX/AUD_SuperposeFactory.h
branches/soc-2011-pepper/intern/audaspace/FX/AUD_SuperposeReader.h
branches/soc-2011-pepper/intern/audaspace/FX/AUD_VolumeFactory.h
branches/soc-2011-pepper/intern/audaspace/OpenAL/AUD_OpenALDevice.h
branches/soc-2011-pepper/intern/audaspace/SRC/AUD_SRCResampleFactory.h
branches/soc-2011-pepper/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.cpp
branches/soc-2011-pepper/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.h
branches/soc-2011-pepper/intern/audaspace/ffmpeg/AUD_FFMPEGReader.h
branches/soc-2011-pepper/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_3DMath.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_AnimateableProperty.cpp
branches/soc-2011-pepper/intern/audaspace/intern/AUD_AnimateableProperty.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_C-API.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_ChannelMapperFactory.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_ChannelMapperReader.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_ConverterFactory.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_FileWriter.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_I3DHandle.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_IDevice.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_JOSResampleFactory.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_JOSResampleReader.cpp
branches/soc-2011-pepper/intern/audaspace/intern/AUD_JOSResampleReader.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_LinearResampleFactory.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_Mixer.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_ReadDevice.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_Reference.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_ResampleReader.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_SequencerEntry.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_SequencerFactory.cpp
branches/soc-2011-pepper/intern/audaspace/intern/AUD_SequencerFactory.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_SequencerHandle.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_SequencerReader.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_SilenceFactory.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_SilenceReader.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_SinusReader.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_SoftwareDevice.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_Space.h
branches/soc-2011-pepper/intern/audaspace/intern/AUD_StreamBufferFactory.h
branches/soc-2011-pepper/intern/audaspace/jack/AUD_JackDevice.h
branches/soc-2011-pepper/intern/audaspace/sndfile/AUD_SndFileWriter.h
branches/soc-2011-pepper/source/blender/makesrna/intern/rna_scene.c
Modified: branches/soc-2011-pepper/intern/audaspace/FX/AUD_AccumulatorFactory.h
===================================================================
--- branches/soc-2011-pepper/intern/audaspace/FX/AUD_AccumulatorFactory.h 2011-08-16 12:37:23 UTC (rev 39442)
+++ branches/soc-2011-pepper/intern/audaspace/FX/AUD_AccumulatorFactory.h 2011-08-16 13:00:55 UTC (rev 39443)
@@ -37,6 +37,10 @@
/**
* This factory creates an accumulator reader.
+ *
+ * The accumulator adds the difference at the input to the last output in case
+ * it's positive. In additive mode it additionaly adds the difference always.
+ * So in case the difference is positive, it's added twice.
*/
class AUD_AccumulatorFactory : public AUD_EffectFactory
{
Modified: branches/soc-2011-pepper/intern/audaspace/FX/AUD_BaseIIRFilterReader.h
===================================================================
--- branches/soc-2011-pepper/intern/audaspace/FX/AUD_BaseIIRFilterReader.h 2011-08-16 12:37:23 UTC (rev 39442)
+++ branches/soc-2011-pepper/intern/audaspace/FX/AUD_BaseIIRFilterReader.h 2011-08-16 13:00:55 UTC (rev 39443)
@@ -97,11 +97,21 @@
void setLengths(int in, int out);
public:
+ /**
+ * Retrieves the last input samples.
+ * \param pos The position, valid are 0 (current) or negative values.
+ * \return The sample value.
+ */
inline sample_t x(int pos)
{
return m_x[(m_xpos + pos + m_xlen) % m_xlen * m_specs.channels + m_channel];
}
+ /**
+ * Retrieves the last output samples.
+ * \param pos The position, valid are negative values.
+ * \return The sample value.
+ */
inline sample_t y(int pos)
{
return m_y[(m_ypos + pos + m_ylen) % m_ylen * m_specs.channels + m_channel];
@@ -111,7 +121,16 @@
virtual void read(int& length, bool& eos, sample_t* buffer);
+ /**
+ * Runs the filtering function.
+ * \return The current output sample value.
+ */
virtual sample_t filter()=0;
+
+ /**
+ * Notifies the filter about a sample rate change.
+ * \param rate The new sample rate.
+ */
virtual void sampleRateChanged(AUD_SampleRate rate);
};
Modified: branches/soc-2011-pepper/intern/audaspace/FX/AUD_ButterworthFactory.h
===================================================================
--- branches/soc-2011-pepper/intern/audaspace/FX/AUD_ButterworthFactory.h 2011-08-16 12:37:23 UTC (rev 39442)
+++ branches/soc-2011-pepper/intern/audaspace/FX/AUD_ButterworthFactory.h 2011-08-16 13:00:55 UTC (rev 39443)
@@ -35,7 +35,7 @@
#include "AUD_DynamicIIRFilterFactory.h"
/**
- * This factory creates a butterworth filter reader.
+ * This factory creates a butterworth lowpass filter reader.
*/
class AUD_ButterworthFactory : public AUD_DynamicIIRFilterFactory
{
Modified: branches/soc-2011-pepper/intern/audaspace/FX/AUD_DelayReader.h
===================================================================
--- branches/soc-2011-pepper/intern/audaspace/FX/AUD_DelayReader.h 2011-08-16 12:37:23 UTC (rev 39442)
+++ branches/soc-2011-pepper/intern/audaspace/FX/AUD_DelayReader.h 2011-08-16 13:00:55 UTC (rev 39443)
@@ -36,7 +36,7 @@
#include "AUD_Buffer.h"
/**
- * This class reads another reader and changes it's delay.
+ * This class reads another reader and delays it.
*/
class AUD_DelayReader : public AUD_EffectReader
{
Modified: branches/soc-2011-pepper/intern/audaspace/FX/AUD_DoubleFactory.h
===================================================================
--- branches/soc-2011-pepper/intern/audaspace/FX/AUD_DoubleFactory.h 2011-08-16 12:37:23 UTC (rev 39442)
+++ branches/soc-2011-pepper/intern/audaspace/FX/AUD_DoubleFactory.h 2011-08-16 13:00:55 UTC (rev 39443)
@@ -36,7 +36,6 @@
/**
* This factory plays two other factories behind each other.
- * \note Readers from the underlying factories must have the same sample rate and channel count.
*/
class AUD_DoubleFactory : public AUD_IFactory
{
Modified: branches/soc-2011-pepper/intern/audaspace/FX/AUD_DoubleReader.h
===================================================================
--- branches/soc-2011-pepper/intern/audaspace/FX/AUD_DoubleReader.h 2011-08-16 12:37:23 UTC (rev 39442)
+++ branches/soc-2011-pepper/intern/audaspace/FX/AUD_DoubleReader.h 2011-08-16 13:00:55 UTC (rev 39443)
@@ -37,7 +37,7 @@
#include "AUD_Reference.h"
/**
- * This reader plays two readers with the same specs sequently.
+ * This reader plays two readers sequently.
*/
class AUD_DoubleReader : public AUD_IReader
{
@@ -57,21 +57,15 @@
*/
bool m_finished1;
- /**
- * The playback buffer for the intersecting part.
- */
- AUD_Buffer m_buffer;
-
// hide copy constructor and operator=
AUD_DoubleReader(const AUD_DoubleReader&);
AUD_DoubleReader& operator=(const AUD_DoubleReader&);
public:
/**
- * Creates a new ping pong reader.
+ * Creates a new double reader.
* \param reader1 The first reader to read from.
* \param reader2 The second reader to read from.
- * \exception AUD_Exception Thrown if the specs from the readers differ.
*/
AUD_DoubleReader(AUD_Reference<AUD_IReader> reader1, AUD_Reference<AUD_IReader> reader2);
Modified: branches/soc-2011-pepper/intern/audaspace/FX/AUD_DynamicIIRFilterFactory.h
===================================================================
--- branches/soc-2011-pepper/intern/audaspace/FX/AUD_DynamicIIRFilterFactory.h 2011-08-16 12:37:23 UTC (rev 39442)
+++ branches/soc-2011-pepper/intern/audaspace/FX/AUD_DynamicIIRFilterFactory.h 2011-08-16 13:00:55 UTC (rev 39443)
@@ -34,13 +34,29 @@
#include "AUD_EffectFactory.h"
#include <vector>
+/**
+ * This factory creates a IIR filter reader.
+ *
+ * This means that on sample rate change the filter recalculates its
+ * coefficients.
+ */
class AUD_DynamicIIRFilterFactory : public AUD_EffectFactory
{
public:
+ /**
+ * Creates a new Dynmic IIR filter factory.
+ * \param factory The input factory.
+ */
AUD_DynamicIIRFilterFactory(AUD_Reference<AUD_IFactory> factory);
virtual AUD_Reference<AUD_IReader> createReader();
+ /**
+ * Recalculates the filter coefficients.
+ * \param rate The sample rate of the audio data.
+ * \param[out] b The input filter coefficients.
+ * \param[out] a The output filter coefficients.
+ */
virtual void recalculateCoefficients(AUD_SampleRate rate,
std::vector<float>& b,
std::vector<float>& a)=0;
Modified: branches/soc-2011-pepper/intern/audaspace/FX/AUD_DynamicIIRFilterReader.h
===================================================================
--- branches/soc-2011-pepper/intern/audaspace/FX/AUD_DynamicIIRFilterReader.h 2011-08-16 12:37:23 UTC (rev 39442)
+++ branches/soc-2011-pepper/intern/audaspace/FX/AUD_DynamicIIRFilterReader.h 2011-08-16 13:00:55 UTC (rev 39443)
@@ -34,6 +34,10 @@
#include "AUD_IIRFilterReader.h"
#include "AUD_DynamicIIRFilterFactory.h"
+/**
+ * This class is for dynamic infinite impulse response filters with simple
+ * coefficients that change depending on the sample rate.
+ */
class AUD_DynamicIIRFilterReader : public AUD_IIRFilterReader
{
private:
Modified: branches/soc-2011-pepper/intern/audaspace/FX/AUD_HighpassFactory.h
===================================================================
--- branches/soc-2011-pepper/intern/audaspace/FX/AUD_HighpassFactory.h 2011-08-16 12:37:23 UTC (rev 39442)
+++ branches/soc-2011-pepper/intern/audaspace/FX/AUD_HighpassFactory.h 2011-08-16 13:00:55 UTC (rev 39443)
@@ -41,7 +41,7 @@
{
private:
/**
- * The attack value in seconds.
+ * The cutoff frequency.
*/
const float m_frequency;
Modified: branches/soc-2011-pepper/intern/audaspace/FX/AUD_LimiterReader.h
===================================================================
--- branches/soc-2011-pepper/intern/audaspace/FX/AUD_LimiterReader.h 2011-08-16 12:37:23 UTC (rev 39442)
+++ branches/soc-2011-pepper/intern/audaspace/FX/AUD_LimiterReader.h 2011-08-16 13:00:55 UTC (rev 39443)
@@ -35,7 +35,7 @@
#include "AUD_EffectReader.h"
/**
- * This reader limits another reader in start and end sample.
+ * This reader limits another reader in start and end times.
*/
class AUD_LimiterReader : public AUD_EffectReader
{
@@ -58,9 +58,9 @@
/**
* Creates a new limiter reader.
* \param reader The reader to read from.
- * \param start The desired start sample (inclusive).
- * \param end The desired end sample (exklusive), a negative value signals
- * that it should play to the end.
+ * \param start The desired start time (inclusive).
+ * \param end The desired end time (sample exklusive), a negative value
+ * signals that it should play to the end.
*/
AUD_LimiterReader(AUD_Reference<AUD_IReader> reader, float start = 0, float end = -1);
Modified: branches/soc-2011-pepper/intern/audaspace/FX/AUD_LowpassFactory.h
===================================================================
--- branches/soc-2011-pepper/intern/audaspace/FX/AUD_LowpassFactory.h 2011-08-16 12:37:23 UTC (rev 39442)
+++ branches/soc-2011-pepper/intern/audaspace/FX/AUD_LowpassFactory.h 2011-08-16 13:00:55 UTC (rev 39443)
@@ -41,7 +41,7 @@
{
private:
/**
- * The attack value in seconds.
+ * The cutoff frequency.
*/
const float m_frequency;
Modified: branches/soc-2011-pepper/intern/audaspace/FX/AUD_PingPongFactory.h
===================================================================
--- branches/soc-2011-pepper/intern/audaspace/FX/AUD_PingPongFactory.h 2011-08-16 12:37:23 UTC (rev 39442)
+++ branches/soc-2011-pepper/intern/audaspace/FX/AUD_PingPongFactory.h 2011-08-16 13:00:55 UTC (rev 39443)
@@ -36,7 +36,7 @@
/**
* This factory plays another factory first normal, then reversed.
- * \note Readers from the underlying factory must be from the buffer type.
+ * \note Readers from the underlying factory must be reversable with seeking.
*/
class AUD_PingPongFactory : public AUD_EffectFactory
{
Modified: branches/soc-2011-pepper/intern/audaspace/FX/AUD_PitchReader.h
===================================================================
--- branches/soc-2011-pepper/intern/audaspace/FX/AUD_PitchReader.h 2011-08-16 12:37:23 UTC (rev 39442)
+++ branches/soc-2011-pepper/intern/audaspace/FX/AUD_PitchReader.h 2011-08-16 13:00:55 UTC (rev 39443)
@@ -53,13 +53,22 @@
/**
* Creates a new pitch reader.
* \param reader The reader to read from.
- * \param pitch The size of the buffer.
+ * \param pitch The pitch value.
*/
AUD_PitchReader(AUD_Reference<AUD_IReader> reader, float pitch);
virtual AUD_Specs getSpecs() const;
+ /**
+ * Retrieves the pitch.
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list