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-FileDevconnect()Soundcmd() XBIOSSyntaxLONG Soundcmd( mode, data )
WORD mode, data;
Function Soundcmd() sets various configuration parameters in the
sound system.
Opcode 130 (0x82)
Availability Available only when bit #2 of the '_SND' cookie is set.
Parameters mode specifies how data is interpreted as follows:
Name mode Meaning
LTATTEN 0 Set the left attenuation (increasing
attentuation is the same as decreasing
volume). data is a bit mask as follows:
XXXX XXXX LLLL XXXX
'L' specifies a valid value between 0 and
15 used to set the attenuation of the left
channel in -1.5db increments. The bits
represented by 'X' are reserved and
should be 0.
RATTEN 1 Set the right attentuation. data is a bit
mask as follows:
XXXX XXXX RRRR XXXX
'R' specifies a valid value between 0 and
15 used to set the attenuation of the right
channel in -1.5db increments. The bits
represented by 'X' are reserved and should
be 0.
LTGAIN 2 Set the left channel gain (boost the input
to the ADC). data is a bit mask as follows:
XXXX XXXX LLLL XXXX
'L' specifies a valid value between 0 and
15 used to set the gain of the left channel
in 1.5db increments. The bits represented
by 'X' are reserved and should be 0.
RTGAIN 3 Set the right channel gain (boost the input
to the ADC). data is a bit mask as follows:
XXXX XXXX RRRR XXXX
'R' specifies a valid value between 0 and
15 used to set the gain of the right
channel in 1.5db increments. The bits
represented by 'X' are reserved and should
be 0.
ADDERIN 4 Set the 16 bit ADDER to receive its input
from the source(s) specified in data. data
is a bit mask where each bit indicates
a possible souce. Bit 0 represents the ADC (ADDR_ADC). Bit 1 represents the connection
matrix (ADDR_MATRIX). Setting either or
both of these bits determines the source of
the ADDER.
ADCINPUT 5 Set the inputs of the left and right
channels of the ADC. data is a bit mask:
bit 0 being the right channel:
LEFT_MIC (0x00) or LEFT_PSG (0x02)
bit 1 being the left channel:
RIGHT_MIC (0x00) or RIGHT_PSG (0x01).
Setting a bit causes that channel to
receive its input from the Yamaha PSG.
Clearing a bit causes that channel to
receive its input from the microphone.
SETPRESCALE 6 This mode is only valid when Devconnect() is used to set the prescaler to TT030 compatibility mode. In that case, data
represents the TT030 compatible prescale
value as follows:
Name Value Meaning
CCLK_6K 0 Divide by 1280 (6.25 KHz)
CCLK_12K 1 Divide by 640 (12.5 Khz)
CCLK_25K 2 Divide by 320 (25 KHz)
CCLK_50K 3 Divide by 160 (50 KHz)
Setting data to SND_INQUIRE (-1) with any command will cause
that command's current value to be returned and the
parameter unchanged.
Binding move.w data,-(sp)
move.w mode,-(sp)
move.w #$82,-(sp)
trap #14
addq.l #6,sp
Return Value Soundcmd() returns the prior value of the specified command
if data is SND_INQUIRE (-1). Using the SETPRESCALE mode to
set a frequency of 6.25 MHz (CCLK_6K) will cause the sound
system to mute on a Falcon030 as it does not support this
sample rate.
Caveats On current systems, a bug exists that causes a mode value of
LTGAIN to set the gain for both channels.
See Also Devconnect()