AudioScience HPI  Version_4.33.01
Audio Delay

The Audio Delay block control supports fine-grained adjustment of a digital audio delay. More...

The Audio Delay block control supports fine-grained adjustment of a digital audio delay.

Multiple independent Audio Delay blocks support independent settings across device outputs.

The Audio Delay is a block control which is in turn an implementation of a universal control (see Universal Control).

Data types

The list of supported datatypes is as follows:

entity_type_int

A 32 bit integer.

entity_type_sequence

Sequence of potentially heterogeneous entities. Conceptually similar to C struct.

Audio Delay

Audio Delay
    The audio delay block
Delay
    The delay setting in microseconds
Maximum Delay
    The maximum delay (in microseconds) supported

Parameter list

NameAudio Delay
DescriptionThe audio delay block.
OptionalNo
Typesequence / entity_type_sequence / a sequence of parameters follow
Count2
Attributesread
Added in version4.08.00
Example
static void print_block_control(
hpi_hsubsys_t *hSubSys,
hpi_handle_t hMixer,
hpi_handle_t hControl
)
{
enum e_entity_role r;
hpi_err_t err;
char name[256];
size_t size, items;
int count;
err = HPI_Object_GetRole(hControl, &r);
if (err)
HandleError(err);
// name
size = sizeof(name);
err = HPI_Object_GetInfo( hControl,
name, &size, &items);
if (err)
HandleError(err);
printf(" %s", name);
// count
size = sizeof(count);
err = HPI_Object_GetInfo( hControl,
&count, &size, &items);
if (err)
HandleError(err);
printf(", count %d", count);
// fetch parameter handles
if ( r == entity_role_block ) {
hpi_handle_t params[16]; /* should really use count */
int i;
size_t number;
printf(" [");
number = sizeof(params)/sizeof(hpi_handle_t);
hMixer,
hControl,
params,
&number);
if (err)
HandleError(err);
for ( i=0 ; i<number ; i++ ) {
if (i > 0)
printf(", ");
printf("%d",params[i]);
}
printf("]");
}
}


NameDelay
DescriptionThe delay setting in microseconds. Steps are in 125 microseconds. Maximum is the smaller of 10 seconds and the Maximum Delay parameter.
OptionalNo
Typeinteger / entity_type_int / C99 type int32_t
Count1
Attributesread/write with volatile info (e.g. limits may change)
Default0
Added in version4.08.00
Example
struct hpi_control_t asihpi_control;
size_t value_size;
size_t value_items;
int Delay;
/* set source and destination node */
asihpi_control.wSrcNodeType = x;
asihpi_control.wSrcNodeIndex = j;
asihpi_control.wDstNodeType = y;
asihpi_control.wDstNodeIndex = j;
asihpi_control.wSrcNodeType, asihpi_control.wSrcNodeIndex,
asihpi_control.wDstNodeType, asihpi_control.wDstNodeIndex,
"Audio Delay",
&block );
err = HPI_Object_ParameterHandle( hMixer, block, "Delay", &param);
if (!err)
{
err = HPI_Object_GetInfo( param,
NULL, &value_size, &value_items);
}
&Delay, sizeof(Delay) );
Delay = 1;
&Delay, sizeof(Delay));
Unitsmicroseconds


NameMaximum Delay
DescriptionThe maximum delay (in microseconds) supported. Adjusting the maximum delay will cause the limits of the Delay parameter to be changed. Additionally, as more memory is allocated to delay storage, the limit for the maximum setting of this parameter is adjusted. As a side-effect, as global memory is allocated, the limits for this parameter in other Audio Delay blocks are also updated.
OptionalNo
Typeinteger / entity_type_int / C99 type int32_t
Count1
Attributesread/write with volatile info (e.g. limits may change)
Default50000 (50 milliseconds)
Added in version4.08.00
Example
struct hpi_control_t asihpi_control;
size_t value_size;
size_t value_items;
int Maximum_Delay;
/* set source and destination node */
asihpi_control.wSrcNodeType = x;
asihpi_control.wSrcNodeIndex = j;
asihpi_control.wDstNodeType = y;
asihpi_control.wDstNodeIndex = j;
asihpi_control.wSrcNodeType, asihpi_control.wSrcNodeIndex,
asihpi_control.wDstNodeType, asihpi_control.wDstNodeIndex,
"Audio Delay",
&block );
err = HPI_Object_ParameterHandle( hMixer, block, "Maximum Delay", &param);
if (!err)
{
err = HPI_Object_GetInfo( param,
NULL, &value_size, &value_items);
}
&Maximum_Delay, sizeof(Maximum_Delay) );
Maximum_Delay = 1;
&Maximum_Delay, sizeof(Maximum_Delay));
Unitsmicroseconds