mirror of
https://github.com/thestk/stk
synced 2026-01-17 22:51:53 +00:00
Version 4.2.0
This commit is contained in:
committed by
Stephen Sinclair
parent
cf06b7598b
commit
a6381b9d38
@@ -14,21 +14,20 @@
|
||||
For single-channel data, these methods return
|
||||
equivalent values.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2002.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2004.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
#if !defined(__WAVELOOP_H)
|
||||
#define __WAVELOOP_H
|
||||
#ifndef STK_WAVELOOP_H
|
||||
#define STK_WAVELOOP_H
|
||||
|
||||
#include "WvIn.h"
|
||||
#include <stdio.h>
|
||||
|
||||
class WaveLoop : public WvIn
|
||||
{
|
||||
public:
|
||||
//! Class constructor.
|
||||
WaveLoop( const char *fileName, bool raw = FALSE );
|
||||
WaveLoop( std::string fileName, bool raw = false );
|
||||
|
||||
//! Class destructor.
|
||||
virtual ~WaveLoop();
|
||||
@@ -40,10 +39,10 @@ public:
|
||||
corresponds to file cycles per second. The frequency can be
|
||||
negative, in which case the loop is read in reverse order.
|
||||
*/
|
||||
void setFrequency(MY_FLOAT aFrequency);
|
||||
void setFrequency(StkFloat frequency);
|
||||
|
||||
//! Increment the read pointer by \e aTime samples, modulo file size.
|
||||
void addTime(MY_FLOAT aTime);
|
||||
void addTime(StkFloat time);
|
||||
|
||||
//! Increment current read pointer by \e anAngle, relative to a looping frequency.
|
||||
/*!
|
||||
@@ -51,7 +50,7 @@ public:
|
||||
size and the current Stk::sampleRate. The \e anAngle value
|
||||
is a multiple of file size.
|
||||
*/
|
||||
void addPhase(MY_FLOAT anAngle);
|
||||
void addPhase(StkFloat angle);
|
||||
|
||||
//! Add a phase offset to the current read pointer.
|
||||
/*!
|
||||
@@ -59,18 +58,33 @@ public:
|
||||
size and the current Stk::sampleRate. The \e anAngle value
|
||||
is a multiple of file size.
|
||||
*/
|
||||
void addPhaseOffset(MY_FLOAT anAngle);
|
||||
void addPhaseOffset(StkFloat angle);
|
||||
|
||||
//! Return a pointer to the next sample frame of data.
|
||||
const MY_FLOAT *tickFrame(void);
|
||||
const StkFloat *tickFrame(void);
|
||||
|
||||
//! Read out sample \e frames of data to \e frameVector.
|
||||
/*!
|
||||
An StkError will be thrown if a file is read incrementally and a read error occurs.
|
||||
*/
|
||||
StkFloat *tickFrame(StkFloat *frameVector, unsigned int frames);
|
||||
|
||||
//! Fill the StkFrames object with sample frames of data and return the same reference.
|
||||
/*!
|
||||
An StkError will be thrown if a file is read incrementally and
|
||||
a read error occurs or there is an incompatability between the
|
||||
number of channels in the RtWvIn object and that in the StkFrames
|
||||
object.
|
||||
*/
|
||||
StkFrames& tickFrame( StkFrames& frames );
|
||||
|
||||
protected:
|
||||
|
||||
// Read file data.
|
||||
void readData(unsigned long index);
|
||||
|
||||
MY_FLOAT phaseOffset;
|
||||
StkFloat phaseOffset_;
|
||||
|
||||
};
|
||||
|
||||
#endif // defined(__WAVELOOP_H)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user