ASX Version4.13.09
Functions

Sample clock control functions

These functions implement sample clock operations that manipulate the adapter's sample clock generation. More...

Functions

ASX32_API ASX_ERROR ASX_SampleClock_EnumerateSampleRate (ASX_HANDLE hSampleClock, const int nIndex, enum asxSAMPLE_RATE *peSampleRate, int *pnCount)
ASX32_API ASX_ERROR ASX_SampleClock_EnumerateLocalRate (ASX_HANDLE hSampleClock, const int nIndex, enum asxSAMPLE_RATE *peSampleRate, int *pnCount)
 Enumerate each sample clock rates for the local sample clock generator.
ASX32_API ASX_ERROR ASX_SampleClock_SetSampleRate (ASX_HANDLE hSampleClock, const int nSampleRate)
ASX32_API ASX_ERROR ASX_SampleClock_SetLocalRate (ASX_HANDLE hSampleClock, const int nSampleRate)
 Set the sample rate for the local sample clock generator.
ASX32_API ASX_ERROR ASX_SampleClock_GetSampleRate (ASX_HANDLE hSampleClock, int *pnSampleRate)
 Get the adapter's sample rate.
ASX32_API ASX_ERROR ASX_SampleClock_GetLocalRate (ASX_HANDLE hSampleClock, int *pnSampleRate)
 Get the sample rate for the local sample clock generator.
ASX32_API ASX_ERROR ASX_SampleClock_EnumerateClockSource (ASX_HANDLE hSampleClock, const int nIndex, enum asxSAMPLE_CLOCK_SOURCE *peClockSource, int *pnCount)
 Enumerate each sample clock source option.
ASX32_API ASX_ERROR ASX_SampleClock_SetClockSource (ASX_HANDLE hSampleClock, const enum asxSAMPLE_CLOCK_SOURCE eClockSource)
 Set the sample clock source.
ASX32_API ASX_ERROR ASX_SampleClock_GetClockSource (ASX_HANDLE hSampleClock, enum asxSAMPLE_CLOCK_SOURCE *peClockSource)
 Get the sample clock source.
ASX32_API ASX_ERROR ASX_SampleClock_SetAutoSource (ASX_HANDLE hSampleClock, const int nEnable)
 Set the sample clock to automatically source its clock from a valid input.
ASX32_API ASX_ERROR ASX_SampleClock_GetAutoSource (ASX_HANDLE hSampleClock, int *pnEnable)
 Get the setting of the auto source property of the sample clock.
ASX32_API ASX_ERROR ASX_SampleClock_SetLocalRateLock (ASX_HANDLE hSampleClock, const int nLock)
 Lock the local sample clock to its current setting.
ASX32_API ASX_ERROR ASX_SampleClock_GetLocalRateLock (ASX_HANDLE hSampleClock, int *pnLock)
 Get the setting of the local sample clock lock.

Detailed Description

These functions implement sample clock operations that manipulate the adapter's sample clock generation.


Function Documentation

ASX32_API ASX_ERROR ASX_SampleClock_EnumerateClockSource ( ASX_HANDLE  hSampleClock,
const int  nIndex,
enum asxSAMPLE_CLOCK_SOURCE peClockSource,
int *  pnCount 
)

Enumerate each sample clock source option.

Parameters:
hSampleClockA handle to an ASX sample clock control.
nIndexThe index of the sample clock source option to fetch.
peClockSourceThe returned sample clock source option.
pnCountThe total number of available sample clock sources.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_SampleClock_EnumerateLocalRate ( ASX_HANDLE  hSampleClock,
const int  nIndex,
enum asxSAMPLE_RATE peSampleRate,
int *  pnCount 
)

Enumerate each sample clock rates for the local sample clock generator.

Parameters:
hSampleClockA handle to an ASX sample clock control.
nIndexThe index of the sample clock rate option to fetch.
peSampleRateThe returned sample rate option.
pnCountThe total number of available sample rates.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_SampleClock_EnumerateSampleRate ( ASX_HANDLE  hSampleClock,
const int  nIndex,
enum asxSAMPLE_RATE peSampleRate,
int *  pnCount 
)
Deprecated:
This function has been superseded by ASX_SampleClock_EnumerateLocalRate()
ASX32_API ASX_ERROR ASX_SampleClock_GetAutoSource ( ASX_HANDLE  hSampleClock,
int *  pnEnable 
)

Get the setting of the auto source property of the sample clock.

Parameters:
hSampleClockA handle to an ASX sample clock control.
*pnEnableReturns 1 if enabled or 0 if not.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_SampleClock_GetClockSource ( ASX_HANDLE  hSampleClock,
enum asxSAMPLE_CLOCK_SOURCE peClockSource 
)

Get the sample clock source.

Parameters:
hSampleClockA handle to an ASX sample clock control.
peClockSourceThe returned sample clock source.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_SampleClock_GetLocalRate ( ASX_HANDLE  hSampleClock,
int *  pnSampleRate 
)

Get the sample rate for the local sample clock generator.

Parameters:
hSampleClockA handle to an ASX sample clock control.
pnSampleRateThe returned sample rate.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_SampleClock_GetLocalRateLock ( ASX_HANDLE  hSampleClock,
int *  pnLock 
)

Get the setting of the local sample clock lock.

Parameters:
hSampleClockA handle to an ASX sample clock control.
*pnLockReturns 1 if enabled or 0 if not.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_SampleClock_GetSampleRate ( ASX_HANDLE  hSampleClock,
int *  pnSampleRate 
)

Get the adapter's sample rate.

Parameters:
hSampleClockA handle to an ASX sample clock control.
pnSampleRateThe returned sample rate.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_SampleClock_SetAutoSource ( ASX_HANDLE  hSampleClock,
const int  nEnable 
)

Set the sample clock to automatically source its clock from a valid input.

Parameters:
hSampleClockA handle to an ASX sample clock control.
nEnableWhen set to 1 the auto source is enabled, when 0 it is disabled.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_SampleClock_SetClockSource ( ASX_HANDLE  hSampleClock,
const enum asxSAMPLE_CLOCK_SOURCE  eClockSource 
)

Set the sample clock source.

Parameters:
hSampleClockA handle to an ASX sample clock control.
eClockSourceThe sample clock source option to set.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_SampleClock_SetLocalRate ( ASX_HANDLE  hSampleClock,
const int  nSampleRate 
)

Set the sample rate for the local sample clock generator.

Parameters:
hSampleClockA handle to an ASX sample clock control.
nSampleRateThe sample rate to set.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_SampleClock_SetLocalRateLock ( ASX_HANDLE  hSampleClock,
const int  nLock 
)

Lock the local sample clock to its current setting.

For CobraNet adapters that run from a network clock, this function will lock the sample rate of the adapter's players and recorders to the network clock. On an ASI6416 this will result 48 kHz being the only sample rate supported.

Parameters:
hSampleClockA handle to an ASX sample clock control.
nLockWhen set to 1 the local rate is locked, when 0 it is unlocked.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_SampleClock_SetSampleRate ( ASX_HANDLE  hSampleClock,
const int  nSampleRate 
)
Deprecated:
This function has been superseded by ASX_SampleClock_SetLocalRate()