HH
VS1005 VSOS A
UDIO
S
UBSYSTEM
VS1005g
11.5
Miscellaneous Controls
11.5.1
IOCTL_AUDIO_GET_SAMPLE_COUNTER
Get sample counter. This value may be used to synchronize input and output (e.g. by
the driver AUXSYNCS, Chapter 7.7.1).
Example:
s_int32 sampleCounter;
if (ioctl(fp, IOCTL_AUDIO_GET_SAMPLE_COUNTER, (char *)(&sampleCounter))) {
printf("Couldn't get sample counter\n");
}
11.5.2
IOCTL_AUDIO_GET_OVERFLOWS
Get overflow sample counter for the input buffer.
If this number changes while an audio input program is running, this is an indication of
a program performance or input/output buffer size issue.
If nobody cosumes samples from the input audio driver, this value increases at the rate of
the sample counter that can be read with IOCTL_AUDIO_GET_SAMPLE_COUNTER.
•
Only for drivers with input
Example:
s_int32 overFlow;
if (ioctl(fp, IOCTL_AUDIO_GET_OVERFLOWS, (char *)(&overFlow))) {
printf("Couldn't get overflow counter\n");
}
11.5.3
IOCTL_AUDIO_GET_UNDERFLOWS
Get underflow sample counter for the output buffer.
If this number changes while an audio output program is running, this is an indication of
a program performance or input/output buffer size issue.
If nobody produces samples for the output audio driver, this value increases at the rate of
the sample counter that can be read with IOCTL_AUDIO_GET_SAMPLE_COUNTER.
•
Only for drivers with output
Example:
s_int32 underFlow;
if (ioctl(fp, IOCTL_AUDIO_GET_UNDERFLOWS, (char *)(&underFlow))) {
printf("Couldn't get underflow counter\n");
}
Rev. 3.57
2019-04-10
Page