home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 26 / amigaformatcd26.iso / +system+ / tools / sound / eagleplayer2.00 / developer / examples / samplesavers / raw.s
Text File  |  1998-02-26  |  3KB  |  107 lines

  1. *-----------------------------------------------------------------------------*
  2. *            Samplesaver for RAW-Sounds                  *
  3. *-----------------------------------------------------------------------------*
  4.             incdir    include:
  5.             include    misc/eagleplayersamplesaver.i
  6.             include    exec/exec_lib.i
  7.             
  8.     SAMPLESAVERHEADER    TAGS8
  9.  
  10.     dc.b    "RAW 8Bit-Mono Samplesaver V1.0",10
  11.     dc.b    "done by Eagleeye/DFT 28.02.97",0
  12.     even
  13.  
  14. AllMore:    dc.l    SS_Version,1<<16!0
  15.         dc.l    SS_Creator,Creator
  16.         dc.l    SS_SaveSample,SaveSample
  17.         dc.l    SS_Flags,SSF_FrequencyVariable
  18.         dc.l    0
  19.  
  20. Tags8:        dc.l    Tag_More,AllMore
  21.         dc.l    SS_Formatname,Formatname8
  22.         dc.l    SS_RAWFlags,USIB_8Bit
  23.         dc.l    SS_DefFreqPtr,FreqPtr8
  24.         dc.l    SS_NextSampleSaver,Tags8U
  25.         dc.l    SS_DescriptionLNr,43
  26.         dc.l    0
  27.  
  28. Tags8U:        dc.l    Tag_More,AllMore
  29.         dc.l    SS_Formatname,Formatname8U
  30.         dc.l    SS_RAWFlags,USIB_8Bit!USIB_Unsigned
  31.         dc.l    SS_DefFreqPtr,FreqPtr8U
  32.         dc.l    SS_NextSampleSaver,Tags16
  33.         dc.l    0
  34.  
  35. Tags16:        dc.l    Tag_More,AllMore
  36.         dc.l    SS_Formatname,Formatname16
  37.         dc.l    SS_RAWFlags,USIB_16Bit
  38.         dc.l    SS_DefFreqPtr,FreqPtr16
  39.         dc.l    SS_NextSampleSaver,Tags16I
  40.         dc.l    0
  41.  
  42. Tags16I:    dc.l    Tag_More,AllMore
  43.         dc.l    SS_Formatname,Formatname16I
  44.         dc.l    SS_RAWFlags,USIB_16Bit!USIB_Intel
  45.         dc.l    SS_DefFreqPtr,FreqPtr16I
  46.         dc.l    SS_NextSampleSaver,Tags16U
  47.         dc.l    0
  48.  
  49. Tags16U:    dc.l    Tag_More,AllMore
  50.         dc.l    SS_Formatname,Formatname16U
  51.         dc.l    SS_RAWFlags,USIB_16Bit!USIB_Unsigned
  52.         dc.l    SS_DefFreqPtr,FreqPtr16U
  53.         dc.l    SS_NextSampleSaver,Tags16UI
  54.         dc.l    0
  55.  
  56. Tags16UI:    dc.l    Tag_More,AllMore
  57.         dc.l    SS_Formatname,Formatname16UI
  58.         dc.l    SS_RAWFlags,USIB_16Bit!USIB_Unsigned!USIB_Intel
  59.         dc.l    SS_DefFreqPtr,FreqPtr16UI
  60.         dc.l    SS_DescriptionLNr,44
  61.         dc.l    0
  62.  
  63.  
  64. FreqPtr8:    dc.l    22000
  65. FreqPtr8U:    dc.l    22000
  66. FreqPtr16:    dc.l    22000
  67. FreqPtr16I:    dc.l    22000
  68. FreqPtr16U:    dc.l    22000
  69. FreqPtr16UI:    dc.l    22000
  70.  
  71. Creator:    dc.b    "Pure sampled data, adapted by DEFECT",0
  72. Formatname8:    dc.b    "RAW 8Bit-Mono",0
  73. Formatname8U:    dc.b    "RAW 8Bit-Mono Unsigned",0
  74. Formatname16:    dc.b    "RAW 16Bit-Mono ",0
  75. Formatname16I:    dc.b    "RAW 16Bit-Mono Intel",0
  76. Formatname16U:    dc.b    "RAW 16Bit-Mono Unsigned",0
  77. Formatname16UI:    dc.b    "RAW 16Bit-Mono Unsigned Intel",0
  78.         even
  79.  
  80. *-----------------------------------------------------------------------------*
  81. * Input: a0=Adr der EP_SampleTabelle
  82. *     a1=Pfad
  83. *     a2=Jump to Saveroutine
  84. * Output:d0=Error oder NULL
  85. *-----------------------------------------------------------------------------*
  86. SaveSample:    moveq    #EPR_ErrorInArguments,d7
  87.         move.l    a0,a4
  88.         moveq    #0,d6
  89.         move.l    EPS_Adr(a4),d0
  90.         beq.s    .Return
  91.         move.l    d0,a0
  92.         move.w    EPS_Type(a4),d0
  93.         bne.s    .Return
  94.         move.l    EPS_Length(a4),d0
  95.         beq.s    .Return
  96.  
  97.         *-- Input: a0=Start of Memdata
  98.         *--       d0=Size of Mem
  99.         *--       a1=Pfad des Files
  100.         *-- Output:d0=Error oder NULL
  101.         jsr    (a2)
  102.         move.l    d0,d7
  103. .Return:    move.l    d7,d0
  104.         tst.l    d0
  105.         rts
  106.  
  107.