Gamma  0.9.5
Generic Synthesis Library
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Synced Class Reference

Unit synchronization observer. More...

#include <Sync.h>

Inheritance diagram for Synced:
Node2< Synced > DFTBase< float > DFTBase< T > Player< T, Si, St > Quantizer< T > DFT SDFT< T > STFT

List of all members.

Public Member Functions

 Synced (const Synced &rhs)
 Copy constructor.
double scaleSPU () const
 Returns ratio of my SPU to my Sync's SPU.
double spu () const
 Returns local samples/unit.
double ups () const
 Returns local units/sample.
const Syncsync () const
 Returns reference to my Sync.
virtual void onResync (double ratioSPU)
 Called by my Sync reference after it changes its value.
void scaleSPU (double v)
 Scales samples/unit by factor.
void scaleUPS (double v)
 Scales units/sample by factor.
void spu (double v)
 Set local samples/unit.
void sync (Sync &src)
 Set absolute Sync source.
void ups (double v)
 Set local units/sample.
void nodeInsertL (Synced &node)
 Insert myself to left of node.
void nodeInsertR (Synced &node)
 Insert myself to right of node.
void nodeRemove ()
 Remove myself from linked list.

Public Attributes

SyncednodeL
 Pointer to left node.
SyncednodeR
 Pointer to right node.

Protected Member Functions

void initSynced ()
 To be called from the constructor(s) of derived classes.

Detailed Description

Unit synchronization observer.

A Synced will attempt to copy its local variables from the master Sync upon construction. If the master Sync has not been constructed, it will use its default values of 1. This class has a reference to a Sync and its own local scaling factors. By default, the reference Sync is Sync::master.


Constructor & Destructor Documentation

Synced ( const Synced rhs)

Copy constructor.

If the argument has a subject, then attach this as an observer to the same subject. Otherwise, attach as observer of Sync::master().


Member Function Documentation

virtual void onResync ( double  ratioSPU) [virtual]

Called by my Sync reference after it changes its value.

Any instance state that depends on the sampling length should be updated here.

Reimplemented in Quantizer< T >, DFT, Player< T, Si, St >, DFTBase< T >, and DFTBase< float >.


The documentation for this class was generated from the following files: