
USB Audio Design Guide 28/61
case FRAME_X :
// Store left
break ;
case FRAME_Z :
// Store right
break ;
}
}
3.12 ADAT Receive
The ADAT component receives up to eight channels of audio at a sample rate of
44.1kHz or 48kHz. The API for calling the receiver functions is described in §5.3.
The component outputs 32 bits words split into nine word frames. The frames are
laid out in the following manner:
· control byte
· channel 0 sample
· channel 1 sample
· channel 2 sample
· channel 3 sample
· channel 4 sample
· channel 5 sample
· channel 6 sample
· channel 7 sample
The following code is an example of code that could read the output of the ADAT
component:
control = i n uint ( oChan );
for ( int i = 0; i < 8; i ++) {
sample [i ] = inuint ( oChan );
}
The samples are 24-bit values contained in the lower 24 bits of the word. The
control word comprises four control bits in bits [11..8] and the value 0b00000001
in bits [7..0]. This enables synchronization at a higher level, in that on the channel
a single odd word is always read followed by eight words of data.
REV 6.1
Comentarios a estos manuales