WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Sponsors
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
Hard Drive Recovery
Wiring your own LAN
Personal menu
Welcome Guest
User:
Pass:
Register!
Resend Validation Email
 
Forum
 

Bass.dll version 2.4, the bass.dll is updated to 2.4, and this engine supports 64bit and different parameter; here is my solution souce code

ragdog
Quote Post


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,

PMUsers Website
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian
Google