fm.liveswitch.AudioClock Class Reference

A clock used to raise audio data in appropriate intervals. More...

Public Member Functions

 AudioClock (int clockRate, int channelCount, int blockAlign, fm.liveswitch.IAction2< Integer, Integer > raiseCallback)
 Creates a new AudioClock. More...
 
 AudioClock (int clockRate, int channelCount, fm.liveswitch.IAction2< Integer, Integer > raiseCallback)
 Creates a new AudioClock. More...
 
int getBlockAlign ()
 Gets the BlockAlign. More...
 
int getChannelCount ()
 Gets the audio's channel count. More...
 
int getClockRate ()
 Gets the audio's clock rate. More...
 
boolean getRunning ()
 Gets whether the clock is running. More...
 
int getStrictDuration ()
 Gets the strict duration, in milliseconds. More...
 
void setStrictDuration (int value)
 Sets the strict duration, in milliseconds. More...
 
void start ()
 Starts the audio clock. More...
 
void stop ()
 Stops the audio clock. More...
 

Detailed Description

A clock used to raise audio data in appropriate intervals.

Constructor & Destructor Documentation

◆ AudioClock() [1/2]

fm.liveswitch.AudioClock.AudioClock ( int  clockRate,
int  channelCount,
int  blockAlign,
fm.liveswitch.IAction2< Integer, Integer >  raiseCallback 
)

Creates a new AudioClock.

Parameters
clockRateThe clock rate to use.
channelCountHow many channels the audio will have.
blockAlignThe block align of the source data.
raiseCallbackThe callback that will be invoked when data is needed.

◆ AudioClock() [2/2]

fm.liveswitch.AudioClock.AudioClock ( int  clockRate,
int  channelCount,
fm.liveswitch.IAction2< Integer, Integer >  raiseCallback 
)

Creates a new AudioClock.

Parameters
clockRateThe clock rate to use.
channelCountHow many channels the audio will have.
raiseCallbackThe callback that will be invoked when data is needed.

Member Function Documentation

◆ getBlockAlign()

int fm.liveswitch.AudioClock.getBlockAlign ( )

Gets the BlockAlign.

◆ getChannelCount()

int fm.liveswitch.AudioClock.getChannelCount ( )

Gets the audio's channel count.

◆ getClockRate()

int fm.liveswitch.AudioClock.getClockRate ( )

Gets the audio's clock rate.

◆ getRunning()

boolean fm.liveswitch.AudioClock.getRunning ( )

Gets whether the clock is running.

◆ getStrictDuration()

int fm.liveswitch.AudioClock.getStrictDuration ( )

Gets the strict duration, in milliseconds.

If 0, then variable duration is used. If greater than zero, then the clock will only raise frames of that duration.

◆ setStrictDuration()

void fm.liveswitch.AudioClock.setStrictDuration ( int  value)

Sets the strict duration, in milliseconds.

If 0, then variable duration is used. If greater than zero, then the clock will only raise frames of that duration.

◆ start()

void fm.liveswitch.AudioClock.start ( )

Starts the audio clock.

◆ stop()

void fm.liveswitch.AudioClock.stop ( )

Stops the audio clock.