•  Back 
  •  XBIOS 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-File
                         The Falcon030 Sound System


XBIOS sound system calls are only present as of the Falcon030 computer
(though their presence should always be verified by the '_SND' cookie).
If you want to program digitized audio that plays on an STe, TT, and
Falcon030, see Chapter 5: Hardware.

The Falcon030 sound system consists of four stereo 16-bit DMA playback
and record channelsOnly one output track may be monitored
at a time, though the DSP may be programmed
as a mixer to combine more tracks while
sound is being output.
, an onboard ADC (microphone jack), DAC (speaker and
headphone jack), connection matrix, and digital signal processor.

When your application uses the sound system you should first lock it with
Locksnd(). This ensures that other system processes don't try to access
the sound system simultaneously. Unlocksnd() should be used as soon as the
sound system is free.

Each of four possible source devices can be connected to any or all of the
four possible destination devices using the connection matrix as follows:

index=990
The external input and output are accessible with a specially designed hardware device connected to the DSP connector. The Connection Matrix The sound system call Devconnect() connects sound system components together. You must specify the source device, destination device(s), source clock, prescaler setting, and handshaking protocol. The source clock can be set to either of two internal clocks (25.175 MHz and 32 MHz) or an external clock. The internal DMA sound routines are only compatible with the 25.175 MHz clock. Other clock sources are used in conjunction with external hardware devices. The prescaler sets the actual sample playback and recording rate. A value of 0 will cause the sound system to use a STe/ TT030 compatible prescaler for outputting sound recorded at STe/TT030 frequencies. One STe/TT030 frequency, 6.258 kHz, is not supported on the Falcon030. You can set the STe/TT030 prescaler with the Soundcmd() call. Using values other than 0 will set the Falcon030 prescaler as documented under the Devconnect() call. The last parameter you must pass to Devconnect() specifies whether to enable or disable hardware handshaking. Enabling handshaking will produce data that is 100% error free but will result in a variable transfer rate which may egatively affect digital sound. Handshaking is generally only enabled when the data being transferred must be transferred without errors (usually compressed audio or video data). Recording/Playing Digital Audio To record or playback an audio sample, use Setbuffer() to identify the location and length of your playback/recording buffer. Also, any Devconnect(), Setmode(), and Soundcmd() calls should be made prior to starting your playback/recording to set the sound hardware to the proper frequency and mode. The Falcon030 only supports the recording of 16-bit stereo audio. To generate 8-bit samples you must scale the values in the buffer from WORDs to BYTEs after recording. When processing either recording or playback through the DSP, the command Dsptristate() must be used to connect the DSP to the matrix. You may use the function Setinterrupt(), as desired, to cause a MFP or Timer A interrupt at the end of every frame. This is most useful when you are playing or recording in repeat mode and you wish to use multiple buffers. Buffptr() may be used to determine the current playback or record buffer pointer as sounds are being played/recorded. Setmontracks() is used to define which track which will be output over the computer speaker/headphones. Settracks() controls which tracks will be used to record/playback data. Configuring Levels The function Soundcmd() has four modes which allow the setting and interrogation of the current levels of attenuation and gain. Gain affects input levels. The higher the value for gain, the louder the microphone input will be. Attenuation affects output levels. The higher the attenuation setting, the softer sounds will be output from the computer speaker/headphone jack. Other Calls Sndstatus() can be used to tell if a source clock rate was correctly set or if hardware clipping has occurred on either channel. Gpio() is used to communicate data over the three general purpose pins of the DSP connector.