SF_Frame

Sonic Flow libsf Reference Guide

SF_Frame (SF_Frequency sample_rate = SF_DEFAULT_SAMPLE_RATE);

Instantiate a new frame and allocate it to an empty signal.

virtual ~SF_Frame ();

destructor of a frame

inline SF_Sample* get_signal () const;

Fetch a pointer to the actual signal the frame contains. The signal can be modified through this pointer.

inline SF_Length get_num_rows () const;

Get the "length" of the signal in the frame. Note that this length may change between each frame in the future, so you are advised to check the length of the signal in every execute () call. If you are making a block, that is.

void reallocate (SF_Frequency sample_rate);

Allocate memory for the signal to be held in the frame. The size is calculated according to the sample_rate parameter, since the millisecond duration is fixed. The max_num_rows and num_rows variables are initialized accordingly. The freshly created signal store is initialized to all zeros.

void clear ();

Clear the signal contents of the frame.

static SF_Time get_duration ();

Return the duration (in milliseconds) of every frame in the system. Since the frame duration is a class variable of the SF_Frame class, the frame duration is fixed for all networks and between them, i.e. the the duration is the same inter-network as well as intra-network.

static void set_duration (SF_Time dur);

Set the pseudo-global frame duration variable (in milliseconds). This function is only meant for the global initialization of the libsf library and should not be called during the operation on networks and blocks.


Last modified: Thu Dec 10 14:02:34 1998
jarno.seppanen@cs.tut.fi
Audio Research Group