home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 106 / EnigmaAmiga106CD.iso / software / sviluppo / ahisrc / device / ahi_def.i < prev    next >
Encoding:
Text File  |  1999-08-23  |  4.1 KB  |  162 lines

  1. ; $Id: ahi_def.i,v 4.17 1999/08/23 21:34:46 lcs Exp $
  2.  
  3. ;    AHI - Hardware independent audio subsystem
  4. ;    Copyright (C) 1996-1999 Martin Blom <martin@blom.org>
  5. ;     
  6. ;    This library is free software; you can redistribute it and/or
  7. ;    modify it under the terms of the GNU Library General Public
  8. ;    License as published by the Free Software Foundation; either
  9. ;    version 2 of the License, or (at your option) any later version.
  10. ;     
  11. ;    This library is distributed in the hope that it will be useful,
  12. ;    but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14. ;    Library General Public License for more details.
  15. ;     
  16. ;    You should have received a copy of the GNU Library General Public
  17. ;    License along with this library; if not, write to the
  18. ;    Free Software Foundation, Inc., 59 Temple Place - Suite 330, Cambridge,
  19. ;    MA 02139, USA.
  20.  
  21.     IFND    _AHI_DEF_I_
  22. _AHI_DEF_I_    SET    1
  23.  
  24. DEBUG_DETAIL    SET    2
  25.  
  26.     include exec/semaphores.i
  27.     include    exec/devices.i
  28.     include    devices/ahi.i
  29.     include devices/timer.i
  30.     include    libraries/ahi_sub.i
  31.     include    macros.i
  32.  
  33.  
  34. *** Processor identification ****
  35.  
  36.  IFGE    __CPU-68020
  37.  
  38. HAVE_HIFI    EQU    1
  39. HAVE_CLIPPING    EQU    1
  40.  
  41.  ENDC
  42.  
  43.  
  44. *** Definitions ***
  45.  
  46.     STRUCTURE Timer,0
  47.     STRUCT    EntryTime,EV_SIZE
  48.     STRUCT    ExitTime,EV_SIZE
  49.     LABEL    Timer_SIZEOF
  50.  
  51. * Private AudioCtrl structure
  52.     STRUCTURE AHIPrivAudioCtrl,AHIAudioCtrlDrv_SIZEOF
  53.     APTR    ahiac_SubLib
  54.     ULONG    ahiac_SubAllocRC
  55.     APTR    ahiac_ChannelDatas
  56.     APTR    ahiac_SoundDatas
  57.     ULONG    ahiac_BuffSizeNow        * Now many bytes of the buffer are used?
  58.     
  59.     APTR    ahiac_MasterVolumeTable
  60.     APTR    ahiac_MultTableS
  61.     APTR    ahiac_MultTableU
  62.     APTR    ahiac_RecordFunc        * AHIA_RecordFunc
  63.     ULONG    ahiac_AudioID
  64.     Fixed    ahiac_MasterVolume;        * Real
  65.     Fixed    ahiac_SetMasterVolume;        * Set by user
  66.     Fixed    ahiac_EchoMasterVolume;        * Set by dspecho
  67.     APTR    ahiac_EffOutputBufferStruct    * struct AHIEffOutputBuffer *
  68.     APTR    ahiac_EffDSPEchoStruct        * struct Echo *
  69.     APTR    ahiac_EffChannelInfoStruct    * struct AHIChannelInfo *
  70.     APTR    ahiac_WetList
  71.     APTR    ahiac_DryList
  72.     UBYTE    ahiac_WetOrDry
  73.     UBYTE    ahiac_MaxCPU
  74.     UWORD    ahiac_Channels2
  75.     STRUCT    ahiac_Timer,Timer_SIZEOF
  76.     UWORD    ahiac_UsedCPU
  77.     UWORD    ahiac_PPCCommand;
  78.     LONG    ahiac_PPCArgument;
  79.     APTR    ahiac_PPCMixBuffer;
  80.     APTR    ahiac_PPCMixInterrupt;
  81.     APTR    ahiac_M68KPort;
  82.     APTR    ahiac_PPCStartupMsg;
  83.     APTR    ahiac_PPCTask;
  84.     STRUCT    ahiac_DriverName,256
  85.     LABEL    AHIPrivAudioCtrl_SIZEOF
  86.  
  87.  IFD    VERSION68K
  88.  
  89.     STRUCTURE Fixed64_STRUCT,0
  90.     LONG    F64_I
  91.     ULONG    F64_F
  92.     LABEL    F64_SIZEOF
  93.  
  94. Fixed64     MACRO
  95. \1          EQU     SOFFSET
  96. SOFFSET     SET     SOFFSET+F64_SIZEOF
  97.             ENDM
  98.  
  99.     STRUCTURE AHISoundData,0
  100.     ULONG    sd_Type
  101.     APTR    sd_Addr
  102.     ULONG    sd_Length
  103.     APTR    sd_InputBuffer0
  104.     APTR    sd_InputBuffer1
  105.     APTR    sd_InputBuffer2
  106.     LABEL    AHISoundData_SIZEOF
  107.  
  108.  
  109.     BITDEF    AHIAC,NOMIXING,31        ;private ahiac_Flags flag
  110.     BITDEF    AHIAC,NOTIMING,30        ;private ahiac_Flags flag
  111.     BITDEF    AHIAC,POSTPROC,29        ;private ahiac_Flags flag
  112.     BITDEF    AHIAC,CLIPPING,28        ;private ahiac_Flags flag
  113.  
  114. * AHIChannelData (private)
  115.     STRUCTURE AHIChannelData,0
  116.     LABEL    cd_Flags
  117.     UWORD    cd_EOS            ;TRUE: Sample has reached end
  118.     UBYTE    cd_FreqOK        ;FALSE: Freq=0       ; TRUE: Freq<>0
  119.     UBYTE    cd_SoundOK        ;FALSE: No sound set ; TRUE: S. OK.
  120.     Fixed64    cd_Offset
  121.     Fixed64    cd_Add
  122.     APTR    cd_DataStart
  123.     Fixed64    cd_LastOffset
  124.     LONG    cd_ScaleLeft
  125.     LONG    cd_ScaleRight
  126.     FPTR    cd_AddRoutine
  127.     Fixed    cd_VolumeLeft
  128.     Fixed    cd_VolumeRight
  129.     ULONG    cd_Type
  130.  
  131.     LABEL    cd_NextFlags
  132.     UWORD    cd_NextEOS        ;Not in use
  133.     UBYTE    cd_NextFreqOK
  134.     UBYTE    cd_NextSoundOK
  135.     Fixed64    cd_NextOffset
  136.     Fixed64    cd_NextAdd
  137.     APTR    cd_NextDataStart
  138.     Fixed64    cd_NextLastOffset
  139.     LONG    cd_NextScaleLeft
  140.     LONG    cd_NextScaleRight
  141.     FPTR    cd_NextAddRoutine
  142.     Fixed    cd_NextVolumeLeft
  143.     Fixed    cd_NextVolumeRight
  144.     ULONG    cd_NextType
  145.  
  146.     LONG    cd_Samples        ;Samples left to store (down-counter)
  147.     LONG    cd_FirstOffsetI        ;for linear interpolation routines
  148.     LONG    cd_LastSampleL        ;for linear interpolation routines
  149.     LONG    cd_TempLastSampleL    ;for linear interpolation routines
  150.     LONG    cd_LastSampleR        ;for linear interpolation routines
  151.     LONG    cd_TempLastSampleR    ;for linear interpolation routines
  152.  
  153.     APTR    cd_Succ            ;For the wet and dry lists
  154.     UWORD    cd_ChannelNo
  155.     UWORD    cd_Pad
  156.  
  157.     LABEL    AHIChannelData_SIZEOF
  158.  
  159.  ENDC
  160.  
  161.     ENDC
  162.