
Extremely Active Member
     
Group: Moderators
Posts: 874
Member No.: 5019
Joined: 13-May 07

|
Hi
The bass.dll is updated to 2.4
And this engine support 64bit and different parameter
Here is my solution
| CODE | OpenAndPlay proc local p64 :QWORD ; for 64-bit parameters!!!
.data szFilter db "(*.mo3,*.xm,*.mod,*.s3m,*.it,*.mtm,*.umx)",0, \ "*.mo3;**.xm;*.mod;*.s3m;**.it;*.mtm;*.umx",0, \ "(*.mp3,*.mp2,*.mp1,*.ogg,*.wav,*.aif)",0, \ "*.mp3;*.mp2;*.mp1;*.ogg;*.wav;*.aif",0,0 .data? hBuffer db 512 dup (?) ofn OPENFILENAME <> hChan dd ? hError dd 256 dup(?) .code invoke RtlZeroMemory,addr hBuffer, 256 mov ofn.lStructSize, SIZEOF ofn mov ofn.lpstrFilter, offset szFilter mov ofn.lpstrFile, offset hBuffer mov ofn.Flags, OFN_EXPLORER + OFN_FILEMUSTEXIST + OFN_PATHMUSTEXIST mov ofn.nMaxFile,512 invoke GetOpenFileName,addr ofn .if eax == TRUE invoke BASS_Init, -1, 44100, 0, 0, 0 .if eax==0 invoke FormatErrorMessages,CTEXT ("Can't initialize device") .else mov DWORD PTR [p64], 0 mov DWORD PTR [p64+4], 0 mov eax, BASS_SAMPLE_LOOP or BASS_MUSIC_POSRESET or BASS_MUSIC_RAMPS invoke BASS_StreamCreateFile,FALSE,offset hBuffer,p64,p64,eax .if eax mov [hChan], eax .else ;Loads a MOD music file; MO3 / IT / XM / S3M / MTM / MOD / UMX formats. invoke BASS_MusicLoad, 0, ADDR hBuffer, p64, 0, eax, 0 ; load musicfile mov [hChan], eax .endif invoke BASS_ChannelPlay, hChan, 0 ; play tune invoke MessageBox,0,CTEXT ("Playing..."),0,MB_OK invoke BASS_Free .endif .endif ret OpenAndPlay endp
FormatErrorMessages proc lpszIn:DWORD invoke BASS_ErrorGetCode invoke crt_sprintf,addr hError,CTEXT ("%s! (error code: %d)"),lpszIn,eax invoke MessageBox,0,addr hError,0,MB_OK ret FormatErrorMessages endp
|
Greets,
|