Hardware description
Parameters:
Mute
: Data value of type
unsigned 1
.
LeftVol
: Data value of type
unsigned 4
.
RightVol
: Data value of type
unsigned 4
.
Timing:
1 or more clock cycles.
Description:
LeftVol
and
RightVol
set the gain level (amount of increase) of the ADC input
amplifiers, from 0dB to +22.5dB in 1.5dB steps. Mute is a Boolean where "1" =
muted.
5.13.5 Setting the input sample rate
extern macro proc RC200AudioInSetSampleRate (
SampleRateCode
);
Parameters:
SampleRateCode
: A code selecting the sampling rate. Possible values:
Sample rate code
Sample rate (Hz)
RC200AudioSampleRate8000
8000
RC200AudioSampleRate11025
11025
RC200AudioSampleRate16000
16000
RC200AudioSampleRate22050
22050
RC200AudioSampleRate32000
32000
RC200AudioSampleRate44100
44100
RC200AudioSampleRate48000
48000 (default)
Timing:
1 clock cycle.
Description:
Changes the sample rate of the audio input.
5.13.6 Reading from the audio interface
extern macro proc RC200AudioInRead (
LeftPtr
,
RightPtr
);
Parameters:
LeftPtr
: Pointer to an
lvalue
of type
signed 18
.
RightPtr
: Pointer to an
lvalue
of type
signed 18
.
Timing:
1 or more clock cycles (blocks until data is ready).
Description:
Reads a single stereo sample from the audio interface and stores it in the
lvalue
pointed at by
DataPtr
. The macro blocks until a new sample can be read.
5.13.7 Setting the output volume
extern macro proc RC200AudioOutSetVolume (
Mute
,
LeftVol
,
RightVol
);
www.celoxica.com
Page 55