EasyManua.ls Logo

Commodore Amiga - Page 153

Commodore Amiga
321 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Limitations
on
Selection
of
Sampling
Period
The
sampling period
is
limited by
the
number
of
DMA cycles allocated
to
an audio chan-
nel. Each audio channel
is
allocated one DMA slot per horizontal scan line
of
the
screen
display. An audio channel can retrieve
two
data
samples
during
each horizontal scan
line.
The
following calculation gives the maximum sampling
rate
in
samples per second.
2 samples/line X 262.5 lines/frame X 59.94 frames/second
= 31,469 samples/second
The
figure of 31,469 is a theoretical maximum. In
order
to
save buffers,
the
hardware
is
designed
to
handle 28,867 samples/second.
The
system timing interval is 279.365
nanoseconds,
or
.279365 microseconds.
The
maximum sampling
rate
of 28,867 samples
per second is 34.642 microseconds per sample (1/28,867
= .000034642).
The
formula for
calculating
the
sam piing period
is
Period value = sample interval/clock interval
Thus,
the
minimum period value is derived by dividing 34.642 microseconds per sample
by
the
number
of microseconds per interval:
34.642 microseconds/sample
Minimum period
0.279365 microseconds/interval
124 timing intervals/sample
Therefore, a value of
at
least 124
must
be written into
the
period register
to
assure
that
the
audio system DMA will be able
to
retrieve the next
data
sample.
If
the
period value
is below 124, by
the
time
the
cycle
count
has reached
0,
the
audio DMA will
not
have
had
enough time
to
retrieve
the
next
data
sample and
the
previous sample will be
reused.
Specifying
the
Period
Value
After
you have selected
the
desired interval between
data
samples, you can calculate
the
value
to
place
in
the
period register by using
the
period formula:
Period value
= desired interval/clock interval
Audio Hardware 141

Table of Contents

Other manuals for Commodore Amiga

Related product manuals