Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 368 → Rev 374

/programs/develop/sdk/trunk/sound/src/sndsetvol.asm/sndvol.asm
6,13 → 6,8
section '.text' align 16 code readable executable
 
public _SetVolume@12
public _GetVolume@12
 
public _GetMasterVol@4
public _SetMasterVol@4
 
extrn hSound
extrn hrdwSound
 
align 4
proc _SetVolume@12 stdcall, str:dword, lvol:dword,rvol:dword
47,131 → 42,3
ret
endp
 
align 4
proc _GetVolume@12 stdcall, str:dword, pleft:dword,pright:dword
locals
handle dd ?
io_code dd ?
input dd ?
inp_size dd ?
output dd ?
out_size dd ?
endl
push ebx
push ecx
mov eax, [hSound]
lea ebx, [str]
lea ecx, [pleft]
mov [handle], eax
mov [io_code], SND_GETVOLUME
mov [input], ebx
mov [inp_size], 4
mov [output], ecx
mov [out_size], 8
 
mov eax, 68
mov ebx, 17
lea ecx, [handle]
int 0x40
pop ecx
pop ebx
ret
endp
 
align 4
proc _GetMasterVol@4 stdcall, pvol:dword
locals
handle dd ?
io_code dd ?
input dd ?
inp_size dd ?
output dd ?
out_size dd ?
endl
push ebx
push ecx
mov eax, [hrdwSound]
mov ecx, [pvol]
xor ebx, ebx
mov [handle], eax
mov [io_code], DEV_GET_MASTERVOL
mov [input], ebx
mov [inp_size], ebx
mov [output], ecx
mov [out_size], 4
 
mov eax, 68
mov ebx, 17
lea ecx, [handle]
int 0x40
pop ecx
pop ebx
ret
endp
 
align 4
proc _SetMasterVol@4 stdcall,vol:dword
locals
handle dd ?
io_code dd ?
input dd ?
inp_size dd ?
output dd ?
out_size dd ?
endl
push ebx
push ecx
mov eax, [hrdwSound]
lea ebx, [vol]
xor ecx, ecx
 
mov [handle], eax
mov [io_code], DEV_SET_MASTERVOL
mov [input], ebx
mov [inp_size], 4
mov [output], ecx
mov [out_size], ecx
 
mov eax, 68
mov ebx, 17
lea ecx, [handle]
int 0x40
pop ecx
pop ebx
ret
endp
 
if 0
align 4
proc _GetDevInfo@8 stdcall, hSrv:dword, p_info:dword
locals
handle dd ?
io_code dd ?
input dd ?
inp_size dd ?
output dd ?
out_size dd ?
endl
push ebx
mov eax, [hSrv]
xor ebx, ebx
mov ecx, [p_info]
 
mov [handle], eax
mov [io_code], DEV_GET_INFO
mov [input], ebx
mov [inp_size], ebx
mov [output], ecx
mov [out_size], CTRL_INFO_SIZE
 
lea eax, [handle]
stdcall CallServiceEx, eax
pop ebx
ret
endp
 
end if