•  Back 
  •  XBIOS Function Reference 
  •  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-FileSetbuffer()
Buffoper()                                                            XBIOS

Syntax

LONG Buffoper( mode )
WORD mode;

Function      Buffoper() sets/reads the state of the hardware sound
              system.

Opcode        136 (0x88)

Availability  Available only when bit #2 of the '_SND' cookie is set.

Parameters    mode is a bit array which may be composed of all or none of
              the following flags indicating the desired sound system
              state as follows:

              Name         Bit Mask                Meaning

              PLAY_ENABLE    0x01   Enable DMA Sound Playback. The sound
                                    must have been previously identified
                                    to the XBIOS with the Buffptr()
                                    function.

              PLAY_REPEAT    0x02   Setting this flag will cause any sound
                                    currently playing or started as
                                    a result of this call to be looped
                                    indefinitely (until Buffoper(0) is
                                    used).

              RECORD_ENABLE  0x04   Enable DMA Sound Recording. The sound
                                    must have been previously identified
                                    to the XBIOS with the Buffptr()
                                    function.

              RECORD_REPEAT  0x08   Setting this flag during a record will
                                    cause the recording to continue
                                    indefinitely within the currently set
                                    recording buffer (as set by Buffptr())

              Alternately, calling this function with a mode parameter of
              SND_INQUIRE (1) will return a bit mask indicating the
              current sound system state as shown above.

Binding       move.w   mode,-(sp)
              move.w   #$88,-(sp)
              trap     #14
              addq.l   #4,sp

Return Value  Buffoper() normally returns 0 for no error or non-zero
              otherwise (except in inquire mode as indicated above.

Comments      The sound system uses a 32 bit FIFO. The FIFO is only
              guaranteed to be clear when the record enable bit is clear.
              When transferring new data to the record buffers, the record
              enable bit should be cleared to flush the FIFO.

See Also      Setbuffer()