Fungus Posted June 7, 2008 Posted June 7, 2008 I am patching an old game, I have reversed the winmm.dll calls for playing audio from the cd, and I know how to get out the track number and convert it to a filename.I want to replace the playing routines with bass.dll so I can play the .wav rips instead.I need to be able to play, stop and loop (and checking the position of the current play to loop it).anyone can help with this? I tried the examples that come with bass , but they .wav player doesn't seem to work on my system (no sound).I plan to write a nocd tut for this game when I am done patching and testing, so all help much appreciated. =)Cheers
Ufo-Pu55y Posted June 7, 2008 Posted June 7, 2008 play: PlaySound("C:\\SOUNDS\\BELLS.WAV", NULL, SND_ASYNC);stop: PlaySound(NULL, NULL, 0);loop: PlaySound("C:\\SOUNDS\\BELLS.WAV", NULL, SND_LOOP | SND_ASYNC);Doesn't work :? :">
Fungus Posted June 8, 2008 Author Posted June 8, 2008 play: PlaySound("C:\\SOUNDS\\BELLS.WAV", NULL, SND_ASYNC);stop: PlaySound(NULL, NULL, 0);loop: PlaySound("C:\\SOUNDS\\BELLS.WAV", NULL, SND_LOOP | SND_ASYNC);Doesn't work :? :">This is the code I need to patch =].text:00457BE0 sub_457BE0 proc near ; CODE XREF: sub_4509F0+17p.text:00457BE0.text:00457BE0 var_20 = byte ptr -20h.text:00457BE0 var_1C = dword ptr -1Ch.text:00457BE0 dwParam2 = dword ptr -14h.text:00457BE0 mciId = dword ptr -10h.text:00457BE0 var_C = dword ptr -0Ch.text:00457BE0.text:00457BE0 sub esp, 20h.text:00457BE3 push esi.text:00457BE4 mov eax, 1.text:00457BE9 test eax, eax.text:00457BEB jnz short loc_457C11.text:00457BED.text:00457BED loc_457BED: ; CODE XREF: sub_457BE0+2Fj.text:00457BED mov eax, hWnd.text:00457BF2 push eax ; hWndParent.text:00457BF3 push 0A5h ; lpTemplateName.text:00457BF8 call sub_459680.text:00457BFD add esp, 8.text:00457C00 test al, al.text:00457C02 jz loc_457C89.text:00457C08 mov eax, 1.text:00457C0D test eax, eax.text:00457C0F jz short loc_457BED.text:00457C11.text:00457C11 loc_457C11: ; CODE XREF: sub_457BE0+Bj.text:00457C11 mov esi, ds:mciSendCommandA.text:00457C17 lea ecx, [esp+24h+dwParam2].text:00457C1B push ecx ; dwParam2.text:00457C1C push 2000h ; dwParam1.text:00457C21 push MCI_OPEN ; uMsg.text:00457C26 push 0 ; mciId.text:00457C28 mov [esp+34h+var_C], offset aCdaudio; "cdaudio".text:00457C30 call esi; mciSendCommandA.text:00457C32 test eax, eax.text:00457C34 jnz short loc_457C73.text:00457C36 mov eax, [esp+24h+mciId].text:00457C3A lea edx, [esp+24h+var_20].text:00457C3E push edx ; dwParam2.text:00457C3F push 400h ; dwParam1.text:00457C44 push MCI_SET ; uMsg.text:00457C49 push eax ; mciId.text:00457C4A mov mciId, eax.text:00457C4F mov [esp+34h+var_1C], 0Ah.text:00457C57 call esi; mciSendCommandA.text:00457C59 test eax, eax.text:00457C5B jz short loc_457C82.text:00457C5D push offset aCanTSetTmsfFor; "Can't set TMSF format".text:00457C62 push 7 ; Format.text:00457C64 call sub_447B20.text:00457C69 add esp, 8.text:00457C6C mov al, 1.text:00457C6E pop esi.text:00457C6F add esp, 20h.text:00457C72 retn.text:00457C73; ---------------------------------------------------------------------------.text:00457C73.text:00457C73 loc_457C73: ; CODE XREF: sub_457BE0+54j.text:00457C73 push offset aS_cdopenFailed; "S_CDOpen failed".text:00457C78 push 7 ; Format.text:00457C7A call sub_447B20.text:00457C7F add esp, 8.text:00457C82.text:00457C82 loc_457C82: ; CODE XREF: sub_457BE0+7Bj.text:00457C82 mov al, 1.text:00457C84 pop esi.text:00457C85 add esp, 20h.text:00457C88 retn.text:00457C89; ---------------------------------------------------------------------------.text:00457C89.text:00457C89 loc_457C89: ; CODE XREF: sub_457BE0+22j.text:00457C89 xor al, al.text:00457C8B pop esi.text:00457C8C add esp, 20h.text:00457C8F retn.text:00457C8F sub_457BE0 endp.text:00457C8F.text:00457C90; ---------------------------------------------------------------------------.text:00457C90; START OF FUNCTION CHUNK FOR sub_450A80.text:00457C90.text:00457C90 loc_457C90: ; CODE XREF: sub_450A80+2Dj.text:00457C90 push ecx.text:00457C91 mov ecx, mciId.text:00457C97 lea eax, [esp+4+dwParam2].text:00457C9B push esi ; char.text:00457C9C mov esi, ds:mciSendCommandA.text:00457CA2 push eax ; dwParam2.text:00457CA3 push 0 ; dwParam1.text:00457CA5 push MCI_STOP ; uMsg.text:00457CAA push ecx ; mciId.text:00457CAB call esi; mciSendCommandA.text:00457CAD test eax, eax.text:00457CAF jz short loc_457CC0.text:00457CB1 push offset aCanTStopTrack; "Can't stop track".text:00457CB6 push 7 ; Format.text:00457CB8 call sub_447B20.text:00457CBD add esp, 8.text:00457CC0.text:00457CC0 loc_457CC0: ; CODE XREF: sub_450A80+722Fj.text:00457CC0 mov edx, mciId.text:00457CC6 push 0 ; dwParam2.text:00457CC8 push 0 ; dwParam1.text:00457CCA push MCI_CLOSE ; uMsg.text:00457CCF push edx ; mciId.text:00457CD0 call esi; mciSendCommandA.text:00457CD2 pop esi.text:00457CD3 pop ecx.text:00457CD4 retn.text:00457CD4; END OF FUNCTION CHUNK FOR sub_450A80.text:00457CD4; ---------------------------------------------------------------------------.text:00457CD5 align 10h.text:00457CE0.text:00457CE0; =============== S U B R O U T I N E =======================================.text:00457CE0.text:00457CE0.text:00457CE0 sub_457CE0 proc near ; CODE XREF: sub_414390+3Bp.text:00457CE0 ; sub_4220A0+15Ep.text:00457CE0.text:00457CE0 var_1C = byte ptr -1Ch.text:00457CE0 var_18 = dword ptr -18h.text:00457CE0 var_14 = dword ptr -14h.text:00457CE0 dwParam2 = dword ptr -10h.text:00457CE0 var_C = dword ptr -0Ch.text:00457CE0 var_8 = dword ptr -8.text:00457CE0.text:00457CE0 mov eax, dword_524740.text:00457CE5 sub esp, 1Ch.text:00457CE8 test eax, eax.text:00457CEA push esi.text:00457CEB jz loc_457DB8.text:00457CF1 mov eax, dword_524744.text:00457CF6 inc eax.text:00457CF7 cmp eax, 96h.text:00457CFC mov dword_524744, eax.text:00457D01 jl loc_457DB8.text:00457D07 mov ecx, mciId.text:00457D0D mov esi, ds:mciSendCommandA.text:00457D13 lea eax, [esp+20h+dwParam2].text:00457D17 mov dword_524744, 0.text:00457D21 push eax ; dwParam2.text:00457D22 push 100h ; dwParam1.text:00457D27 push MCI_STATUS ; uMsg.text:00457D2C push ecx ; mciId.text:00457D2D mov [esp+30h+var_8], 4.text:00457D35 call esi; mciSendCommandA.text:00457D37 test eax, eax.text:00457D39 jnz short loc_457DA9.text:00457D3B cmp [esp+20h+var_C], 20Dh.text:00457D43 jnz short loc_457D95.text:00457D45 mov eax, dword_524740.text:00457D4A mov ecx, mciId.text:00457D50 mov edx, eax.text:00457D52 and edx, 0FFh.text:00457D58 inc al.text:00457D5A and eax, 0FFh.text:00457D5F mov [esp+20h+var_18], edx.text:00457D63 mov [esp+20h+var_14], eax.text:00457D67 lea eax, [esp+20h+var_1C].text:00457D6B push eax ; dwParam2.text:00457D6C push 0Ch ; dwParam1.text:00457D6E push MCI_PLAY ; uMsg.text:00457D73 push ecx ; mciId.text:00457D74 call esi; mciSendCommandA.text:00457D76 test eax, eax.text:00457D78 jz short loc_457DB8.text:00457D7A mov edx, dword_524740.text:00457D80 push edx ; char.text:00457D81 push offset aCanTRestartLoo; "Can't restart looping track %d".text:00457D86 push 7 ; Format.text:00457D88 call sub_447B20.text:00457D8D add esp, 0Ch.text:00457D90 pop esi.text:00457D91 add esp, 1Ch.text:00457D94 retn.text:00457D95; ---------------------------------------------------------------------------.text:00457D95.text:00457D95 loc_457D95: ; CODE XREF: sub_457CE0+63j.text:00457D95 push offset aTrackNotStoppe; "Track not stopped".text:00457D9A push 7 ; Format.text:00457D9C call sub_447B20.text:00457DA1 add esp, 8.text:00457DA4 pop esi.text:00457DA5 add esp, 1Ch.text:00457DA8 retn.text:00457DA9; ---------------------------------------------------------------------------.text:00457DA9.text:00457DA9 loc_457DA9: ; CODE XREF: sub_457CE0+59j.text:00457DA9 push offset aCanTGetTrackSt; "Can't get track status".text:00457DAE push 7 ; Format.text:00457DB0 call sub_447B20.text:00457DB5 add esp, 8.text:00457DB8.text:00457DB8 loc_457DB8: ; CODE XREF: sub_457CE0+Bj.text:00457DB8 ; sub_457CE0+21j ....text:00457DB8 pop esi.text:00457DB9 add esp, 1Ch.text:00457DBC retn.text:00457DBC sub_457CE0 endp.text:00457DBC.text:00457DBC; ---------------------------------------------------------------------------.text:00457DBD align 10h.text:00457DC0.text:00457DC0; =============== S U B R O U T I N E =======================================.text:00457DC0.text:00457DC0.text:00457DC0 sub_457DC0 proc near ; CODE XREF: sub_416820+8Bp.text:00457DC0 ; sub_416820+B9p ....text:00457DC0.text:00457DC0 dwParam2 = dword ptr -0Ch.text:00457DC0 var_8 = dword ptr -8.text:00457DC0 var_4 = dword ptr -4.text:00457DC0 arg_0 = dword ptr 4.text:00457DC0 arg_4 = dword ptr 8.text:00457DC0.text:00457DC0 sub esp, 0Ch.text:00457DC3 push ebx.text:00457DC4 push ebp.text:00457DC5 mov ebp, [esp+14h+arg_4].text:00457DC9 push esi.text:00457DCA push edi.text:00457DCB mov edi, [esp+1Ch+arg_0].text:00457DCF movsx esi, di.text:00457DD2 push ebp.text:00457DD3 push esi ; char.text:00457DD4 push offset aS_cdplayNtrack; "S_CDPlay: nTrack=%d; tMode=%d".text:00457DD9 push 1 ; Format.text:00457DDB call sub_447B20.text:00457DE0 add esp, 10h.text:00457DE3 cmp word_468A88, 0.text:00457DEB jz short loc_457E5C.text:00457DED push esi.text:00457DEE mov word_4670BC, di.text:00457DF5 call sub_43F4C0.text:00457DFA mov ebx, eax.text:00457DFC add esp, 4.text:00457DFF and eax, 0FFh.text:00457E04 mov cl, bl.text:00457E06 lea edx, [esp+1Ch+dwParam2].text:00457E0A mov [esp+1Ch+var_8], eax.text:00457E0E mov eax, mciId.text:00457E13 inc cl.text:00457E15 push edx ; dwParam2.text:00457E16 push 0Ch ; dwParam1.text:00457E18 and ecx, 0FFh.text:00457E1E push MCI_PLAY ; uMsg.text:00457E23 push eax ; mciId.text:00457E24 mov [esp+2Ch+var_4], ecx.text:00457E28 call ds:mciSendCommandA.text:00457E2E test eax, eax.text:00457E30 jz short loc_457E45.text:00457E32 movsx ecx, bx.text:00457E35 push ecx ; char.text:00457E36 push offset aCanTPlayTrackD; "Can't play track %d".text:00457E3B push 7 ; Format.text:00457E3D call sub_447B20.text:00457E42 add esp, 0Ch.text:00457E45.text:00457E45 loc_457E45: ; CODE XREF: sub_457DC0+70j.text:00457E45 test ebp, ebp.text:00457E47 jz short loc_457E5C.text:00457E49 movsx edx, bx.text:00457E4C mov dword_524740, edx.text:00457E52 mov dword_524744, 78h.text:00457E5C.text:00457E5C loc_457E5C: ; CODE XREF: sub_457DC0+2Bj.text:00457E5C ; sub_457DC0+87j.text:00457E5C pop edi.text:00457E5D pop esi.text:00457E5E pop ebp.text:00457E5F pop ebx.text:00457E60 add esp, 0Ch.text:00457E63 retn.text:00457E63 sub_457DC0 endp.text:00457E63.text:00457E63; ---------------------------------------------------------------------------.text:00457E64 align 10h.text:00457E70.text:00457E70; =============== S U B R O U T I N E =======================================.text:00457E70.text:00457E70.text:00457E70; int __fastcall sub_457E70(char).text:00457E70 sub_457E70 proc near ; CODE XREF: sub_411F60+F2p.text:00457E70 ; sub_4303E0+52Ap ....text:00457E70.text:00457E70 dwParam2 = dword ptr -4.text:00457E70.text:00457E70 push ecx ; char.text:00457E71 push offset aS_cdstop; "S_CDStop".text:00457E76 push 1 ; Format.text:00457E78 call sub_447B20.text:00457E7D add esp, 8.text:00457E80 cmp word_4670BC, 0.text:00457E88 jle short loc_457EC9.text:00457E8A mov ecx, mciId.text:00457E90 lea eax, [esp+4+dwParam2].text:00457E94 push eax ; dwParam2.text:00457E95 push 0 ; dwParam1.text:00457E97 push MCI_STOP ; uMsg.text:00457E9C push ecx ; mciId.text:00457E9D call ds:mciSendCommandA.text:00457EA3 test eax, eax.text:00457EA5 jz short loc_457EB6.text:00457EA7 push offset aCanTStopTrack; "Can't stop track".text:00457EAC push 7 ; Format.text:00457EAE call sub_447B20.text:00457EB3 add esp, 8.text:00457EB6.text:00457EB6 loc_457EB6: ; CODE XREF: sub_457E70+35j.text:00457EB6 mov dword_524740, 0.text:00457EC0 mov word_4670BC, 0.text:00457EC9.text:00457EC9 loc_457EC9: ; CODE XREF: sub_457E70+18j.text:00457EC9 pop ecx.text:00457ECA retn.text:00457ECA sub_457E70 endp.text:00457ECA.text:00457ECA; ---------------------------------------------------------------------------.text:00457ECB align 10h.text:00457ED0.text:00457ED0; =============== S U B R O U T I N E =======================================.text:00457ED0.text:00457ED0.text:00457ED0 sub_457ED0 proc near ; CODE XREF: sub_411F60+74p.text:00457ED0 ; sub_4289B0+24p ....text:00457ED0.text:00457ED0 var_18 = byte ptr -18h.text:00457ED0 var_14 = dword ptr -14h.text:00457ED0 var_10 = dword ptr -10h.text:00457ED0 dwParam2 = dword ptr -0Ch.text:00457ED0 var_8 = dword ptr -8.text:00457ED0 arg_0 = dword ptr 4.text:00457ED0.text:00457ED0 sub esp, 18h.text:00457ED3 mov eax, [esp+18h+arg_0].text:00457ED7 push ebx.text:00457ED8 push esi.text:00457ED9 push eax.text:00457EDA mov word_4670BC, ax.text:00457EE0 call sub_43F4C0.text:00457EE5 add esp, 4.text:00457EE8 mov ebx, eax.text:00457EEA push ebx ; char.text:00457EEB push offset aS_startsynceda; "S_StartSyncedAudio: Track %d".text:00457EF0 push 1 ; Format.text:00457EF2 call sub_447B20.text:00457EF7 mov ecx, mciId.text:00457EFD mov esi, ds:mciSendCommandA.text:00457F03 add esp, 0Ch.text:00457F06 lea eax, [esp+20h+dwParam2].text:00457F0A mov [esp+20h+var_8], 0Ah.text:00457F12 push eax ; dwParam2.text:00457F13 push 400h ; dwParam1.text:00457F18 push MCI_SET ; uMsg.text:00457F1D push ecx ; mciId.text:00457F1E call esi; mciSendCommandA.text:00457F20 test eax, eax.text:00457F22 jnz short loc_457F5C.text:00457F24 mov ecx, mciId.text:00457F2A mov edx, ebx.text:00457F2C lea eax, [esp+20h+var_18].text:00457F30 and edx, 0FFh.text:00457F36 inc bl.text:00457F38 push eax ; dwParam2.text:00457F39 push 0Ch ; dwParam1.text:00457F3B and ebx, 0FFh.text:00457F41 push MCI_PLAY ; uMsg.text:00457F46 push ecx ; mciId.text:00457F47 mov [esp+30h+var_14], edx.text:00457F4B mov [esp+30h+var_10], ebx.text:00457F4F call esi; mciSendCommandA.text:00457F51 neg eax.text:00457F53 sbb eax, eax.text:00457F55 inc eax.text:00457F56 pop esi.text:00457F57 pop ebx.text:00457F58 add esp, 18h.text:00457F5B retn.text:00457F5C; ---------------------------------------------------------------------------.text:00457F5C.text:00457F5C loc_457F5C: ; CODE XREF: sub_457ED0+52j.text:00457F5C pop esi.text:00457F5D xor eax, eax.text:00457F5F pop ebx.text:00457F60 add esp, 18h.text:00457F63 retn.text:00457F63 sub_457ED0 endp.text:00457F63.text:00457F63; ---------------------------------------------------------------------------.text:00457F64 align 10h.text:00457F70.text:00457F70; =============== S U B R O U T I N E =======================================.text:00457F70.text:00457F70.text:00457F70 sub_457F70 proc near ; CODE XREF: sub_412120:loc_412252p.text:00457F70.text:00457F70 dwParam2 = dword ptr -10h.text:00457F70 var_C = dword ptr -0Ch.text:00457F70 var_8 = dword ptr -8.text:00457F70.text:00457F70 sub esp, 10h.text:00457F73 mov ecx, mciId.text:00457F79 lea eax, [esp+10h+dwParam2].text:00457F7D push eax ; dwParam2.text:00457F7E push 100h ; dwParam1.text:00457F83 push MCI_STATUS ; uMsg.text:00457F88 push ecx ; mciId.text:00457F89 mov [esp+20h+var_8], 2.text:00457F91 call ds:mciSendCommandA.text:00457F97 test eax, eax.text:00457F99 jnz short loc_457FCB.text:00457F9B mov ecx, [esp+10h+var_C].text:00457F9F mov al, ch.text:00457FA1 and eax, 0FFh.text:00457FA6 lea eax, [eax+eax*2].text:00457FA9 lea edx, [eax+eax*4].text:00457FAC mov eax, ecx.text:00457FAE shr eax, 10h.text:00457FB1 and eax, 0FFh.text:00457FB6 shr ecx, 18h.text:00457FB9 lea eax, [eax+edx*4].text:00457FBC lea eax, [eax+eax*2].text:00457FBF lea eax, [eax+eax*4].text:00457FC2 lea eax, [eax+eax*4].text:00457FC5 add eax, ecx.text:00457FC7 add esp, 10h.text:00457FCA retn.text:00457FCB; ---------------------------------------------------------------------------.text:00457FCB.text:00457FCB loc_457FCB: ; CODE XREF: sub_457F70+29j.text:00457FCB push offset aCanTGetTrackPo; "Can't get track position".text:00457FD0 push 7 ; Format.text:00457FD2 call sub_447B20.text:00457FD7 add esp, 8.text:00457FDA xor eax, eax.text:00457FDC add esp, 10h.text:00457FDF retn.text:00457FDF sub_457F70 endp.text:00457FDF.text:00457FE0.text:00457FE0; =============== S U B R O U T I N E =======================================.text:00457FE0.text:00457FE0.text:00457FE0 sub_457FE0 proc near ; CODE XREF: sub_411AA0+3Cp.text:00457FE0 ; sub_411AA0+6Fp ....text:00457FE0.text:00457FE0 uDeviceID = dword ptr -38h.text:00457FE0 var_34 = dword ptr -34h.text:00457FE0 pac = tagAUXCAPSA ptr -30h.text:00457FE0 arg_0 = dword ptr 4.text:00457FE0.text:00457FE0 sub esp, 38h.text:00457FE3 push ebx.text:00457FE4 push ebp.text:00457FE5 push esi.text:00457FE6 push edi.text:00457FE7 call ds:auxGetNumDevs.text:00457FED test eax, eax.text:00457FEF mov [esp+48h+var_34], eax.text:00457FF3 jbe short loc_458072.text:00457FF5 mov edi, [esp+48h+arg_0].text:00457FF9 xor ebx, ebx.text:00457FFB xor esi, esi.text:00457FFD mov [esp+48h+uDeviceID], 0FFFFFFFFh.text:00458005 test eax, eax.text:00458007 jbe short loc_458050.text:00458009 mov ebp, ds:auxGetDevCapsA.text:0045800F.text:0045800F loc_45800F: ; CODE XREF: sub_457FE0+6Ej.text:0045800F lea eax, [esp+48h+pac].text:00458013 push 30h ; cbac.text:00458015 push eax ; pac.text:00458016 push esi ; uDeviceID.text:00458017 call ebp; auxGetDevCapsA.text:00458019 mov ax, [esp+48h+pac.wTechnology].text:0045801E cmp ax, 1.text:00458022 jnz short loc_45803D.text:00458024 mov ecx, edi.text:00458026 shl ecx, 10h.text:00458029 add ecx, edi.text:0045802B shl ecx, 8.text:0045802E push ecx ; dwVolume.text:0045802F push esi ; uDeviceID.text:00458030 call ds:auxSetVolume.text:00458036 mov ebx, 1.text:0045803B jmp short loc_458047.text:0045803D; ---------------------------------------------------------------------------.text:0045803D.text:0045803D loc_45803D: ; CODE XREF: sub_457FE0+42j.text:0045803D cmp ax, 2.text:00458041 jnz short loc_458047.text:00458043 mov [esp+48h+uDeviceID], esi.text:00458047.text:00458047 loc_458047: ; CODE XREF: sub_457FE0+5Bj.text:00458047 ; sub_457FE0+61j.text:00458047 mov eax, [esp+48h+var_34].text:0045804B inc esi.text:0045804C cmp esi, eax.text:0045804E jb short loc_45800F.text:00458050.text:00458050 loc_458050: ; CODE XREF: sub_457FE0+27j.text:00458050 test ebx, ebx.text:00458052 jnz short loc_458081.text:00458054 mov eax, [esp+48h+uDeviceID].text:00458058 mov edx, edi.text:0045805A shl edx, 10h.text:0045805D add edx, edi.text:0045805F shl edx, 8.text:00458062 push edx ; dwVolume.text:00458063 push eax ; uDeviceID.text:00458064 call ds:auxSetVolume.text:0045806A pop edi.text:0045806B pop esi.text:0045806C pop ebp.text:0045806D pop ebx.text:0045806E add esp, 38h.text:00458071 retn.text:00458072; ---------------------------------------------------------------------------.text:00458072.text:00458072 loc_458072: ; CODE XREF: sub_457FE0+13j.text:00458072 push offset aCdvolumeCouldN; "CDVolume: Could not find CD device".text:00458077 push 7 ; Format.text:00458079 call sub_447B20.text:0045807E add esp, 8.text:00458081.text:00458081 loc_458081: ; CODE XREF: sub_457FE0+72j.text:00458081 pop edi.text:00458082 pop esi.text:00458083 pop ebp.text:00458084 pop ebx.text:00458085 add esp, 38h.text:00458088 retn.text:00458088 sub_457FE0 endp
HVC Posted June 8, 2008 Posted June 8, 2008 (edited) I want to replace the playing routines with bass.dll so I can play the .wav rips instead.I need to be able to play, stop and loop (and checking the position of the current play to loop it).Why not code a dll that performs what you want to do, inline some code to load it, and just call the appropriate functions when needed?Easier debugging, smaller patches, no space limitations and such and such...And why stick to .wav files?mp3/ogg/wma sounds better for a rip?http://www.defacto2.net/text.files/PC%20Mo...ardRipRules.txt Edited June 8, 2008 by HVC
hmi222 Posted June 8, 2008 Posted June 8, 2008 Hi Fungus...Whats exactly the problem with bass.dll.For me its working without prob.Im coding in Purebasic, but i can write a lib that includes this functions yu need for bass.dll
ahmadmansoor Posted June 8, 2008 Posted June 8, 2008 I think u can use "wmp.dll /Windows Media Player " file ....it reg in all windows and u can find the Lib for it by Google ....and it has many property like ...play ..seek...forword ....backword ....eject CD ....and many other....anyway u didn't explain ur problem clearly ...open VB6.0 and form component >>controls>> check ...Windows Media Player and u can realize it nearly....
Fungus Posted June 8, 2008 Author Posted June 8, 2008 I want to stick to wav files, because the cutscene's in the game are synced to some of the audio tracks. I noticed if I compress them to mp3/ogg/flac etc they tend to cut the "dead air" from the beginning of the files. Which makes the audio out of sync with them.I'm just trying to get a good idea of how to do it, google has failed me miserably looking for examples on how to do certain things.
HVC Posted June 8, 2008 Posted June 8, 2008 (edited) Here's a good tutorial if you want to do it with the additional dll approach.I would go with UFO's suggestion though.http://www.codebreakers-journal.com/downloads/cbj/2004/CBJ_1_1_2004_Dracon_Adding_functions_to_any_program_using_a_DLL.pdf Edited June 8, 2008 by HVC
ahmadmansoor Posted June 9, 2008 Posted June 9, 2008 what this Game which contain media control ...and u want to control it .....or only I didn't undersatnd what u want ???mabye this help .....try to find dll file has some easy function like "playsound(filepath,..,...,...,..) " and can run wav type ...in http://www.planet-source-code.com/ mabye helpfull...then load it to ur exe file by LoadLibraryAthen GetProcAddress (playsound) ....and Patch the place in the exe file where he play the media file by his own dll ...so the exe file will use ur dll file instead his ...I hope it easy
hmi222 Posted June 10, 2008 Posted June 10, 2008 What are the return code of BASS_Init()BASS_Start();BASS_SampleLoad();Try to get their return code with BASS_ErrorGetCode();
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now