home *** CD-ROM | disk | FTP | other *** search
/ Audio 4.94 - Over 11,000 Files / audio-11000.iso / msdos / sndbords / proaudio / pcmtlsrc / pcmtlsrc.arj / PCM.ARJ / _I94F84.INC < prev    next >
Text File  |  1992-08-31  |  2KB  |  110 lines

  1. ;$Author:   BCRANE  $
  2. ;$Date:   31 Aug 1992 09:35:20  $
  3. ;$Header:   X:/sccs/sdkapp/_i94f84.inv   1.1   31 Aug 1992 09:35:20   BCRANE  $
  4. ;$Log:   X:/sccs/sdkapp/_i94f84.inv  $
  5. ;
  6. ;   Rev 1.1   31 Aug 1992 09:35:20   BCRANE
  7. ;added support for 16-bit 
  8. ;
  9. ;   Rev 1.0   29 Jul 1992 16:57:22   BCRANE
  10. ;Initial revision.
  11. ;$Logfile:   X:/sccs/sdkapp/_i94f84.inv  $
  12. ;$Modtimes$
  13. ;$Revision:   1.1  $
  14. ;$Workfile:   _i94f84.inc  $ 
  15.  
  16. ;; shark functions
  17. ;; dx:ax can be used to return values
  18. ;; si can be trashed
  19. ;; no other precautions taken
  20.  
  21.     if VERBOSE
  22.     align 256
  23.     db '_i94f82.inc: copyright Media Vision, Inc., 1992', 00h
  24.     endif
  25.  
  26. ;; i94f84() - get internal note buffer
  27. ;; need to call i94f80 first to get segment of note buffer
  28. ;; returns ax offset to note buffer
  29. ;; returns dx size of buffer in note structures
  30.  
  31. ;; new! initializes ! using es:[bx] pointing to:
  32. ;; char far *dmabuf, int size, int divs, and void far *userfunc
  33.  
  34. _i94f84 proc
  35.  
  36.     mov si, 0    ; call InitMVSound
  37.     int 94h
  38.  
  39.     mov si, 1    ; call InitPCM
  40.     int 94h
  41.  
  42.     mov ax, 8    ; dsize
  43.     push ax
  44.     mov ax, 0    ; comp
  45.     push ax
  46.     mov ax, 0    
  47.     push ax        ; mono
  48.     push ax        ; hi word of rate 
  49.     mov ax, 11025    ; lo word of rate
  50.     push ax
  51.  
  52.     mov bx, ss    ; set up es:bx
  53.     mov es, bx
  54.     mov bx, sp
  55.     mov si, 2    ; call PCMInfo
  56.     int 94h
  57.     add sp, 10
  58.  
  59.     mov ax, 2    ; divs
  60.     push ax
  61.     mov ax, 32    ; kays
  62.     push ax
  63.     mov ax, 0B000h    ; segment
  64.     push ax
  65.     mov ax, 0    ; offset
  66.     push ax
  67.  
  68.     mov bx, ss    ; set up es:bx
  69.     mov es, bx
  70.     mov bx, sp
  71.     mov si, 3    ; call DMABuffer
  72.     int 94h
  73.     add sp, 8
  74.  
  75.     mov ax, offset setdmaflag
  76.     push cs        ; segment
  77.     push ax        ; offset
  78.  
  79.     mov bx, ss    ; set up es:bx
  80.     mov es, bx
  81.     mov bx, sp
  82.     mov si, 4    ; call UserFunc
  83.     int 94h
  84.     add sp, 4    
  85.  
  86.     ret
  87. _i94f84 endp 
  88.  
  89.  
  90. setdmaflag proc
  91.  
  92.     push bx
  93.     push es
  94.  
  95.     mov bx, cs
  96.     mov es, bx
  97.     mov bx, offset DMADONEFLAG
  98.     dec word ptr es:[bx]
  99.     jns @F
  100.  
  101.     mov word ptr es:[bx], 0
  102.  
  103. @@:    pop es
  104.     pop bx
  105.     retf
  106.  
  107. setdmaflag endp
  108.  
  109.  
  110.