home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 106 / EnigmaAmiga106CD.iso / software / sviluppo / ahisrc / device / mixer.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-08-31  |  3.6 KB  |  132 lines

  1. /* $Id: mixer.h,v 4.12 1999/08/31 21:44:28 lcs Exp $ */
  2.  
  3. /*
  4.      AHI - Hardware independent audio subsystem
  5.      Copyright (C) 1996-1999 Martin Blom <martin@blom.org>
  6.      
  7.      This library is free software; you can redistribute it and/or
  8.      modify it under the terms of the GNU Library General Public
  9.      License as published by the Free Software Foundation; either
  10.      version 2 of the License, or (at your option) any later version.
  11.      
  12.      This library is distributed in the hope that it will be useful,
  13.      but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.      Library General Public License for more details.
  16.      
  17.      You should have received a copy of the GNU Library General Public
  18.      License along with this library; if not, write to the
  19.      Free Software Foundation, Inc., 59 Temple Place - Suite 330, Cambridge,
  20.      MA 02139, USA.
  21. */
  22.  
  23. #ifndef _MIXER_H_
  24. #define _MIXER_H_
  25.  
  26. #include <config.h>
  27. #include <CompilerSpecific.h>
  28. #include "ahi_def.h"
  29.  
  30. #ifndef VERSION68K
  31.  
  32. #include "addroutines.h"
  33.  
  34. BOOL
  35. InitMixroutine ( struct AHIPrivAudioCtrl *audioctrl );
  36.  
  37. void
  38. CleanUpMixroutine ( struct AHIPrivAudioCtrl *audioctrl );
  39.  
  40. void
  41. calcMasterVolumeTable ( struct AHIPrivAudioCtrl *audioctrl );
  42.  
  43. BOOL
  44. initSignedTable ( struct AHIPrivAudioCtrl *audioctrl );
  45.  
  46. void
  47. calcSignedTable ( struct AHIPrivAudioCtrl *audioctrl );
  48.  
  49. BOOL
  50. initUnsignedTable ( struct AHIPrivAudioCtrl *audioctrl );
  51.  
  52. void
  53. calcUnsignedTable ( struct AHIPrivAudioCtrl *audioctrl );
  54.  
  55. void
  56. SelectAddRoutine ( Fixed     VolumeLeft,
  57.                    Fixed     VolumeRight,
  58.                    ULONG     SampleType,
  59.                    struct    AHIPrivAudioCtrl *audioctrl,
  60.                    LONG     *ScaleLeft,
  61.                    LONG     *ScaleRight,
  62.                    ADDFUNC **AddRoutine );
  63.  
  64. #if !defined( VERSIONPPC )
  65. void ASMCALL
  66. MixGeneric ( REG(a0, struct Hook *Hook),
  67.              REG(a1, void *dst),
  68.              REG(a2, struct AHIPrivAudioCtrl *audioctrl) );
  69. #else
  70. void
  71. MixGeneric ( struct Hook *Hook,
  72.              void *dst,
  73.              struct AHIPrivAudioCtrl *audioctrl );
  74. #endif
  75.  
  76. LONG
  77. CalcSamples ( Fixed64 Add,
  78.               ULONG   Type,
  79.               Fixed64 LastOffset,
  80.               Fixed64 Offset );
  81.  
  82. #else /* VERSION68K */
  83.  
  84.  
  85. typedef void (ADDFUNC)(void);
  86.  
  87. BOOL ASMCALL
  88. InitMixroutine ( REG(a2, struct AHIPrivAudioCtrl *audioctrl) );
  89.  
  90. void ASMCALL
  91. calcMasterVolumeTable ( REG(a2, struct AHIPrivAudioCtrl *audioctrl) );
  92.  
  93. BOOL ASMCALL
  94. initSignedTable ( REG(a2, struct AHIPrivAudioCtrl *audioctrl) );
  95.  
  96. void ASMCALL
  97. calcSignedTable ( REG(a2, struct AHIPrivAudioCtrl *audioctrl) );
  98.  
  99. BOOL ASMCALL
  100. initUnsignedTable ( REG(a2, struct AHIPrivAudioCtrl *audioctrl) );
  101.  
  102. void ASMCALL
  103. calcUnsignedTable ( REG(a2, struct AHIPrivAudioCtrl *audioctrl) );
  104.  
  105. void ASMCALL
  106. SelectAddRoutine ( REG(d0, Fixed     VolumeLeft),
  107.                    REG(d1, Fixed     VolumeRight), 
  108.                    REG(d2, ULONG     SampleType), 
  109.                    REG(a2, struct    AHIPrivAudioCtrl *audioctrl), 
  110.                    REG(a0, LONG     *ScaleLeft),
  111.                    REG(a1, LONG     *ScaleRight), 
  112.                    REG(a3, ADDFUNC **AddRoutine) );
  113.  
  114.  
  115. void ASMCALL
  116. Mix( REG(a0, struct Hook *Hook),
  117.      REG(a1, void *dst),
  118.      REG(a2, struct AHIPrivAudioCtrl *audioctrl) );
  119.  
  120. LONG ASMCALL
  121. CalcSamples ( REG(d0, LONG AddI),
  122.               REG(d1, ULONG AddF ),
  123.               REG(d2, ULONG Type),
  124.               REG(d3, LONG LastOffsetI),
  125.               REG(d4, ULONG LastOffsetF),
  126.               REG(d5, LONG OffsetI),
  127.               REG(d6, ULONG OffsetF) );
  128.  
  129. #endif /* VERSION68K */
  130.  
  131. #endif /* _MIXER_H_ */
  132.