Topic : TOS - The Operating System Author : Version : tos.hyp (December 19, 2008) Subject : Programmieren/Atari Nodes : 3010 Index Size : 93790 HCP-Version : 5 Compiled on : Atari @charset : atarist @lang : @default : Title @help : @options : +g -i -s +x +zz -t4 @width : 70 View Ref-File4.17.13 soundcmd TOS Name: »soundcmd« - Set/get the parameters of the A/D and D/A converter Opcode: 130 Syntax: int32_t soundcmd( int16_t mode, int16_t data ); int32_t NSoundcmd( int16_t mode, int16_t data, int32_t data2); Description: The XBIOS routine soundcmd sets or obtains various parameters of the A/D and D/A converter. The parameter mode determines the command and data the setting to be performed. mode Bedeutung 0 Set attenuation of the left output channel in 1.5 dB increments: data = Increments << 4; 1 Set attenuation of the right output channel in 1.5 dB increments: data = Increments << 4; 2 Set gain of the left input channel in 1.5 dB increments: data = Increments << 4; 3 Set gain of the right input channel in 1.5 dB increments: data = Increments << 4; 4 Set the input source for the 16-bit hardware adder. Bit 0 of data represents the A/D converter and bit 1 the multiplexer matrix. Ist Bit 5 im _SND Cookie gesetzt stehen noch weitere (Master) Eingänge zur Verfügung. Die Eingänge werden eingeschaltet sowie das entsprechende Bit auf 1 gesetzt und Bit 14 in data gesetzt ist. Bit 2 of data represents the microphone input Bit 3 of data represents the FM generator (frequency modulator, OPLx/Wavetable) Bit 4 of data represents the Line input Bit 5 of data represents the CD input Bit 6 of data represents the TV input Bit 7 of data represents the Aux1 input 5 Eingabequellen des A/D-Wandlers. Bit 0 steht für den rechten und Bit 1 für den linken Kanal. Ist ein Bit gesetzt, wird werden die Daten dem Soundchip entnommen, sonst dem Mikrophon. Ist Bit 5 im '_SND' Cookie gesetzt stehen evtl. noch weitere (A/D-Wandler) Eingänge zur Verfügung. Die Eingänge werden eingeschaltet sowie das entsprechende Bit auf 0 gesetzt und Bit 14 von data auf 1 gesetzt ist. Bit 2 is the right FM generator Bit 3 is the left FM generator Bit 4 is the right Line input Bit 5 is the left Line input Bit 6 is the right CD input Bit 7 is the left CD input Bit 8 is the right TV input Bit 9 is the left TV input Bit 10 is the right Aux1 input Bit 11 is the left Aux1 input Bit 12 is the right Mixer output Bit 13 is the left Mixer output If bit 14 of data is set to 1, further inputs of the A/D converter are expected in data2. Bit 16 is the right D/A converter output Bit 17 is the left D/A converter output 6 Compatibility to the STE sound system. data is taken as a prescaler if the prescaler set via devconnect has the value zero: 0 Prescaler divides by 1280 (6.25 MHz) 1 Prescaler divides by 640 (12.5 MHz) 2 Prescaler divides by 320 (25 MHz) 3 Prescaler divides by 160 (50 MHz) Additional mode commands when bit 5 in the '_SND' cookie is set: 7 Direct input of the sample frequency. data is interpreted as an unsigned short and can take a value from 0 to 65534 Hz. Is also present if the cookie McSn is set. 8 Setting of the 8-bit sample format 9 Setting of the 16-bit sample format 10 Setting of the 24-bit sample format 11 Setting of the 32-bit sample format The following bits are available at present: Bit 0 = Signed Bit 1 = Unsigned Bit 2 = Motorola big-endian if > 8 bit Bit 3 = Intel little-endian if > 8-bit 12 Gain of the left master output channel. data = 0 - 255; 13 Gain of the right master output channel. data = 0 - 255; 14 Gain of the left Mic input channel. data = 0 - 255; 15 Gain of the right Mic input channel. data = 0 - 255; 16 Gain of the left FM generator input channel. data = 0 - 255; 17 Gain of the right FM generator input channel. data = 0 - 255; 18 Gain of the left Line input channel. data = 0 - 255; 19 Gain of the right Line input channel. data = 0 - 255; 20 Gain of the left CD input channel. data = 0 - 255; 21 Gain of the right CD input channel. data = 0 - 255; 22 Gain of the left TV input channel. data = 0 - 255; 23 Gain of the right TV input channel. data = 0 - 255; 24 Gain of the left Aux1 input channel. data = 0 - 255; 25 Gain of the right Aux1 input channel. data = 0 - 255; If the parameter data is passed the value -1, then the setting remains unchanged. NSoundcmd is an extended version of soundcmd. Return value: The function returns the current setting. Availability: The function is only available on computers of the Falcon series, or with extended XBIOS routines (_SND). Group: Sound routines See also: Binding buffoper buffptr devconnect dsptristate gpio setbuffer setinterrupt setmontracks setmode settracks sndstatus unlocksnd locksnd