Subversion Repositories Kolibri OS

Rev

Rev 374 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. format MS COFF
  2.  
  3. include "snd.inc"
  4. include "proc32.inc"
  5.  
  6. section '.text' align 16 code readable executable
  7.  
  8. extrn hSound      
  9.  
  10. public _SetBuffer@16
  11. public _PlayBuffer@8
  12.  
  13. align 4
  14. _SetBuffer@16:   ;str:dword, src:dword, offs:dword, size:dword
  15.  
  16.            push ebx
  17.            push ecx
  18.            
  19.            xor eax, eax
  20.            lea ebx, [esp+12]   ;[stream]
  21.  
  22.            push eax            ;.out_size
  23.            push eax            ;.output
  24.            push 16             ;.inp_size
  25.            push ebx            ;.input
  26.            push SND_SETBUFF    ;.code
  27.            push dword [hSound] ;.handle
  28.  
  29.            mov eax, 68
  30.            mov ebx, 17
  31.            mov ecx, esp
  32.            int 0x40
  33.            add esp, 24
  34.            pop ecx
  35.            pop ebx
  36.            ret 16
  37.            
  38. align 4
  39. _PlayBuffer@8:          ;str:dword,flags:dword
  40.  
  41.            push ebx
  42.            push ecx
  43.  
  44.            xor eax, eax
  45.            lea ebx, [esp+12]   ;[stream]
  46.  
  47.            push eax            ;.out_size
  48.            push eax            ;.output
  49.            push 8              ;.inp_size
  50.            push ebx            ;.input
  51.            push SND_PLAY       ;.code
  52.            push dword [hSound] ;.handle
  53.  
  54.            mov eax, 68
  55.            mov ebx, 17
  56.            mov ecx, esp
  57.            int 0x40
  58.            add esp, 24
  59.            pop ecx
  60.            pop ebx
  61.            ret 8
  62.  
  63.