DOOM alpha 4
git-svn-id: svn://kolibrios.org@374 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -16,15 +16,19 @@ SRV_GETVERSION equ 0
|
||||
SND_CREATE_BUFF equ 1
|
||||
SND_DESTROY_BUFF equ 2
|
||||
SND_SETFORMAT equ 3
|
||||
SND_RESET equ 4
|
||||
SND_SETPOS equ 5
|
||||
SND_SETBUFF equ 6
|
||||
SND_SETVOLUME equ 7
|
||||
SND_GETVOLUME equ 8
|
||||
SND_GETFORMAT equ 4
|
||||
SND_RESET equ 5
|
||||
SND_SETPOS equ 6
|
||||
SND_GETPOS equ 7
|
||||
SND_SETBUFF equ 8
|
||||
SND_OUT equ 9
|
||||
SND_PLAY equ 10
|
||||
SND_STOP equ 11
|
||||
SND_SETPAN equ 12
|
||||
SND_SETVOLUME equ 12
|
||||
SND_GETVOLUME equ 13
|
||||
SND_SETPAN equ 14
|
||||
SND_GETPAN equ 15
|
||||
SND_GETBUFFSIZE equ 16
|
||||
|
||||
DEV_SET_BUFF equ 4
|
||||
DEV_NOTIFY equ 5
|
||||
|
@@ -7,12 +7,15 @@ extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#define SOUND_VERSION 5
|
||||
#define SOUND_VERSION 5
|
||||
|
||||
#define PCM_ALL 0
|
||||
#define PCM_STATIC 0x80000000
|
||||
#define PCM_FILTER 0x40000000
|
||||
#define PCM_FLOAT 0x20000000
|
||||
|
||||
#define PCM_OUT 0x08000000
|
||||
#define PCM_RING 0x10000000
|
||||
#define PCM_STATIC 0x20000000
|
||||
#define PCM_FLOAT 0x40000000
|
||||
#define PCM_FILTER 0x80000000
|
||||
|
||||
#define PCM_2_16_48 1
|
||||
#define PCM_1_16_48 2
|
||||
@@ -55,51 +58,50 @@ extern "C"
|
||||
#define SND_CREATE_BUFF 1
|
||||
#define SND_DESTROY_BUFF 2
|
||||
#define SND_SETFORMAT 3
|
||||
#define SND_RESET 4
|
||||
#define SND_SETPOS 5
|
||||
#define SND_SETBUFF 6
|
||||
#define SND_SETVOLUME 7
|
||||
#define SND_GETVOLUME 8
|
||||
#define SND_GETFORMAT 4
|
||||
#define SND_RESET 5
|
||||
#define SND_SETPOS 6
|
||||
#define SND_GETPOS 7
|
||||
#define SND_SETBUFF 8
|
||||
#define SND_OUT 9
|
||||
#define SND_PLAY 10
|
||||
#define SND_STOP 11
|
||||
#define SND_PLAY 10
|
||||
#define SND_STOP 11
|
||||
#define SND_SETVOLUME 12
|
||||
#define SND_GETVOLUME 13
|
||||
#define SND_SETPAN 14
|
||||
#define SND_GETPAN 15
|
||||
#define SND_GETBUFFSIZE 16
|
||||
|
||||
#define PLAY_SYNC 0x80000000
|
||||
|
||||
typedef unsigned int SNDBUF;
|
||||
|
||||
int _stdcall InitSound();
|
||||
|
||||
SNDBUF _stdcall CreateBuffer(unsigned int format,int size);
|
||||
int _stdcall DestroyBuffer(SNDBUF hBuff);
|
||||
int _stdcall SetBuffer(SNDBUF hBuff,void* buff,
|
||||
int offs, int size);
|
||||
|
||||
int _stdcall SetFormat(SNDBUF hBuff, unsigned int format);
|
||||
int _stdcall GetFormat(SNDBUF hBuff);
|
||||
|
||||
int _stdcall ResetBuffer(SNDBUF hBuff, unsigned int flags);
|
||||
int _stdcall SetBufferPos(SNDBUF hBuff, int offset);
|
||||
int _stdcall GetBufferPos(SNDBUF hBuff);
|
||||
int _stdcall GetBufferSize(SNDBUF hBuff);
|
||||
|
||||
int _stdcall SetBuffer(SNDBUF hBuff,void* buff,
|
||||
int offs, int size);
|
||||
int _stdcall WaveOut(SNDBUF hBuff,void *buff, int size);
|
||||
int _stdcall PlayBuffer(SNDBUF hBuff,unsigned int flags);
|
||||
int _stdcall StopBuffer(SNDBUF hBuff);
|
||||
|
||||
int _stdcall SetVolume(SNDBUF hBuff, int left, int right);
|
||||
int _stdcall GetVolume(SNDBUF hBuff, int *left, int *right);
|
||||
int _stdcall SetPan(SNDBUF hBuff, int pan);
|
||||
int _stdcall GetPan(SNDBUF hBuff);
|
||||
|
||||
int _stdcall WaveOut(SNDBUF hBuff,void *buff, int size);
|
||||
|
||||
int _stdcall PlayBuffer(SNDBUF hBuff);
|
||||
int _stdcall StopBuffer(SNDBUF hBuff);
|
||||
|
||||
typedef struct
|
||||
{ unsigned int riff_id;
|
||||
unsigned int riff_size;
|
||||
unsigned int riff_format;
|
||||
|
||||
unsigned int fmt_id;
|
||||
unsigned int fmt_size;
|
||||
|
||||
unsigned short int wFormatTag;
|
||||
unsigned short int nChannels;
|
||||
unsigned int nSamplesPerSec;
|
||||
unsigned int nAvgBytesPerSec;
|
||||
unsigned short int nBlockAlign;
|
||||
unsigned short int wBitsPerSample;
|
||||
unsigned int data_id;
|
||||
unsigned int data_size;
|
||||
} WAVEHEADER;
|
||||
int _stdcall GetMasterVol(int* vol);
|
||||
int _stdcall SetMasterVol(int vol);
|
||||
|
||||
unsigned int _stdcall test_wav(WAVEHEADER *hdr);
|
||||
|
||||
@@ -108,4 +110,4 @@ extern "C"
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif //_SOUND_H_
|
||||
#endif //_SOUND_H_
|
@@ -128,12 +128,13 @@ endp
|
||||
|
||||
section '.data' align 16 data readable writable
|
||||
|
||||
szInfinity db 'INFINITY',0
|
||||
szSound db 'SOUND',0
|
||||
|
||||
public hSound
|
||||
public hrdwSound
|
||||
|
||||
align 4
|
||||
hSound dd ?
|
||||
hrdwSound dd ?
|
||||
hrdwSound dd ?
|
||||
|
||||
szInfinity db 'INFINITY',0
|
||||
szSound db 'SOUND',0
|
||||
|
||||
|
||||
|
@@ -8,7 +8,7 @@ section '.text' align 16 code readable executable
|
||||
extrn hSound
|
||||
|
||||
public _SetBuffer@16
|
||||
public _PlayBuffer@4
|
||||
public _PlayBuffer@8
|
||||
|
||||
align 4
|
||||
proc _SetBuffer@16 stdcall,str:dword, src:dword, offs:dword, size:dword
|
||||
@@ -44,7 +44,7 @@ proc _SetBuffer@16 stdcall,str:dword, src:dword, offs:dword, size:dword
|
||||
endp
|
||||
|
||||
align 4
|
||||
proc _PlayBuffer@4 stdcall, str:dword
|
||||
proc _PlayBuffer@8 stdcall, str:dword,flags:dword
|
||||
locals
|
||||
handle dd ?
|
||||
io_code dd ?
|
||||
|
@@ -16,15 +16,19 @@ SRV_GETVERSION equ 0
|
||||
SND_CREATE_BUFF equ 1
|
||||
SND_DESTROY_BUFF equ 2
|
||||
SND_SETFORMAT equ 3
|
||||
SND_RESET equ 4
|
||||
SND_SETPOS equ 5
|
||||
SND_SETBUFF equ 6
|
||||
SND_SETVOLUME equ 7
|
||||
SND_GETVOLUME equ 8
|
||||
SND_GETFORMAT equ 4
|
||||
SND_RESET equ 5
|
||||
SND_SETPOS equ 6
|
||||
SND_GETPOS equ 7
|
||||
SND_SETBUFF equ 8
|
||||
SND_OUT equ 9
|
||||
SND_PLAY equ 10
|
||||
SND_STOP equ 11
|
||||
SND_SETPAN equ 12
|
||||
SND_SETVOLUME equ 12
|
||||
SND_GETVOLUME equ 13
|
||||
SND_SETPAN equ 14
|
||||
SND_GETPAN equ 15
|
||||
SND_GETBUFFSIZE equ 16
|
||||
|
||||
DEV_SET_BUFF equ 4
|
||||
DEV_NOTIFY equ 5
|
||||
|
43
programs/develop/sdk/trunk/sound/src/sndgetfmt.asm
Normal file
43
programs/develop/sdk/trunk/sound/src/sndgetfmt.asm
Normal file
@@ -0,0 +1,43 @@
|
||||
format MS COFF
|
||||
|
||||
include "snd.inc"
|
||||
include "proc32.inc"
|
||||
|
||||
section '.text' align 16 code readable executable
|
||||
|
||||
extrn hSound
|
||||
|
||||
public _GetFormat@4
|
||||
|
||||
align 4
|
||||
proc _GetFormat@4 stdcall, str: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]
|
||||
xor ecx, ecx
|
||||
|
||||
mov [handle], eax
|
||||
mov [io_code], SND_GETFORMAT
|
||||
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
|
74
programs/develop/sdk/trunk/sound/src/sndgetmvol.asm
Normal file
74
programs/develop/sdk/trunk/sound/src/sndgetmvol.asm
Normal file
@@ -0,0 +1,74 @@
|
||||
format MS COFF
|
||||
|
||||
include "snd.inc"
|
||||
include "proc32.inc"
|
||||
|
||||
section '.text' align 16 code readable executable
|
||||
|
||||
public _GetMasterVol@4
|
||||
|
||||
extrn hrdwSound
|
||||
|
||||
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
|
||||
|
||||
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
|
43
programs/develop/sdk/trunk/sound/src/sndgetpan.asm
Normal file
43
programs/develop/sdk/trunk/sound/src/sndgetpan.asm
Normal file
@@ -0,0 +1,43 @@
|
||||
format MS COFF
|
||||
|
||||
include "snd.inc"
|
||||
include "proc32.inc"
|
||||
|
||||
section '.text' align 16 code readable executable
|
||||
|
||||
public _GetPan@4
|
||||
|
||||
extrn hSound
|
||||
|
||||
align 4
|
||||
proc _GetPan@4 stdcall, str: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]
|
||||
xor ecx, ecx
|
||||
|
||||
mov [handle], eax
|
||||
mov [io_code], SND_GETPAN
|
||||
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
|
43
programs/develop/sdk/trunk/sound/src/sndgetpos.asm
Normal file
43
programs/develop/sdk/trunk/sound/src/sndgetpos.asm
Normal file
@@ -0,0 +1,43 @@
|
||||
format MS COFF
|
||||
|
||||
include "snd.inc"
|
||||
include "proc32.inc"
|
||||
|
||||
section '.text' align 16 code readable executable
|
||||
|
||||
extrn hSound
|
||||
|
||||
public _GetBufferPos@4
|
||||
|
||||
align 4
|
||||
proc _GetBufferPos@4 stdcall, str: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]
|
||||
xor ecx, ecx
|
||||
|
||||
mov [handle], eax
|
||||
mov [io_code], SND_GETPOS
|
||||
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
|
43
programs/develop/sdk/trunk/sound/src/sndgetsize.asm
Normal file
43
programs/develop/sdk/trunk/sound/src/sndgetsize.asm
Normal file
@@ -0,0 +1,43 @@
|
||||
format MS COFF
|
||||
|
||||
include "snd.inc"
|
||||
include "proc32.inc"
|
||||
|
||||
section '.text' align 16 code readable executable
|
||||
|
||||
public _GetBufferSize@4
|
||||
|
||||
extrn hSound
|
||||
|
||||
align 4
|
||||
proc _GetBufferSize@4 stdcall, str: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]
|
||||
xor ecx, ecx
|
||||
|
||||
mov [handle], eax
|
||||
mov [io_code], SND_GETBUFFSIZE
|
||||
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
|
44
programs/develop/sdk/trunk/sound/src/sndgetvol.asm
Normal file
44
programs/develop/sdk/trunk/sound/src/sndgetvol.asm
Normal file
@@ -0,0 +1,44 @@
|
||||
format MS COFF
|
||||
|
||||
include "snd.inc"
|
||||
include "proc32.inc"
|
||||
|
||||
section '.text' align 16 code readable executable
|
||||
|
||||
public _GetVolume@12
|
||||
|
||||
extrn hSound
|
||||
|
||||
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
|
||||
|
||||
|
44
programs/develop/sdk/trunk/sound/src/sndsetmvol.asm
Normal file
44
programs/develop/sdk/trunk/sound/src/sndsetmvol.asm
Normal file
@@ -0,0 +1,44 @@
|
||||
format MS COFF
|
||||
|
||||
include "snd.inc"
|
||||
include "proc32.inc"
|
||||
|
||||
section '.text' align 16 code readable executable
|
||||
|
||||
public _SetMasterVol@4
|
||||
|
||||
extrn hrdwSound
|
||||
|
||||
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
|
||||
|
43
programs/develop/sdk/trunk/sound/src/sndsetpan.asm
Normal file
43
programs/develop/sdk/trunk/sound/src/sndsetpan.asm
Normal file
@@ -0,0 +1,43 @@
|
||||
format MS COFF
|
||||
|
||||
include "snd.inc"
|
||||
include "proc32.inc"
|
||||
|
||||
section '.text' align 16 code readable executable
|
||||
|
||||
public _SetPan@8
|
||||
|
||||
extrn hSound
|
||||
|
||||
align 4
|
||||
proc _SetPan@8 stdcall, str:dword, pan: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]
|
||||
xor ecx, ecx
|
||||
|
||||
mov [handle], eax
|
||||
mov [io_code], SND_SETPAN
|
||||
mov [input], ebx
|
||||
mov [inp_size], 8
|
||||
mov [output], ecx
|
||||
mov [out_size], ecx
|
||||
|
||||
mov eax, 68
|
||||
mov ebx, 17
|
||||
lea ecx, [handle]
|
||||
int 0x40
|
||||
pop ecx
|
||||
pop ebx
|
||||
ret
|
||||
endp
|
44
programs/develop/sdk/trunk/sound/src/sndsetvol.asm
Normal file
44
programs/develop/sdk/trunk/sound/src/sndsetvol.asm
Normal file
@@ -0,0 +1,44 @@
|
||||
format MS COFF
|
||||
|
||||
include "snd.inc"
|
||||
include "proc32.inc"
|
||||
|
||||
section '.text' align 16 code readable executable
|
||||
|
||||
public _SetVolume@12
|
||||
|
||||
extrn hSound
|
||||
|
||||
align 4
|
||||
proc _SetVolume@12 stdcall, str:dword, lvol:dword,rvol: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]
|
||||
xor ecx, ecx
|
||||
|
||||
mov [handle], eax
|
||||
mov [io_code], SND_SETVOLUME
|
||||
mov [input], ebx
|
||||
mov [inp_size], 12
|
||||
mov [output], ecx
|
||||
mov [out_size], ecx
|
||||
|
||||
mov eax, 68
|
||||
mov ebx, 17
|
||||
lea ecx, [handle]
|
||||
int 0x40
|
||||
pop ecx
|
||||
pop ebx
|
||||
ret
|
||||
endp
|
||||
|
@@ -1,177 +0,0 @@
|
||||
format MS COFF
|
||||
|
||||
include "snd.inc"
|
||||
include "proc32.inc"
|
||||
|
||||
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
|
||||
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]
|
||||
xor ecx, ecx
|
||||
|
||||
mov [handle], eax
|
||||
mov [io_code], SND_SETVOLUME
|
||||
mov [input], ebx
|
||||
mov [inp_size], 12
|
||||
mov [output], ecx
|
||||
mov [out_size], ecx
|
||||
|
||||
mov eax, 68
|
||||
mov ebx, 17
|
||||
lea ecx, [handle]
|
||||
int 0x40
|
||||
pop ecx
|
||||
pop ebx
|
||||
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
|
Reference in New Issue
Block a user