It is currently Fri Jul 10, 2020 10:04 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: BassMod example
PostPosted: Thu Jan 26, 2006 12:14 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14065
Location: France
Hello, here is a small example using the bassmod lib found here: http://www.un4seen.com/files/bassmod20-osx.zip . It needs PB OS X v3.94d which should be available soon.

Code:
;
; Bassmod (music module) test for OS X (should work on other OS as well)
;

#LibraryPath = ""/Users/fred/Desktop/bassmod20-osx Folder/" ; Put your library path here

#BASS_DEVICE_NOSYNC     = 16

If OpenLibrary(0, #LibraryPath + "libbassmod.dylib")
  If CallCFunction(0, "BASSMOD_GetVersion") >= 2
   
    If CallCFunction(0, "BASSMOD_Init", -1, 44100, #BASS_DEVICE_NOSYNC)

      Filename$ = OpenFileRequester("Choose a module to play", "", "", 0)
 
      CallCFunction(0, "BASSMOD_MusicFree") ; free the current mod
     
      If CallCFunction(0, "BASSMOD_MusicLoad", #FALSE, Filename$, 0, 0, 0)
        CallCFunction(0, "BASSMOD_MusicPlay")
        MessageRequester("Info", "Playing the module !")
      EndIf
     
      CallCFunction(0, "BASSMOD_Free")
    Else
      MessageRequester("Error", "Can't initialize the device")
    EndIf
  Else
    MessageRequester("Error", "Bassmod library version too old (< 2)")
  EndIf
Else
  MessageRequester("Error", "Can't open the bassmod library")
EndIf


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jan 26, 2006 1:41 pm 
Offline
Enthusiast
Enthusiast

Joined: Fri Dec 09, 2005 11:42 pm
Posts: 178
Location: Sweden
@Fred
Nice to hear that next version is on the road...
But, could you add an simple text file 'ReleaseNotes' so we could check what you fixed and news ??
Regards,
SEO


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jan 26, 2006 1:51 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Fri Apr 25, 2003 6:03 pm
Posts: 3000
Location: Lincoln, UK
SEO wrote:
@Fred
Nice to hear that next version is on the road...
But, could you add an simple text file 'ReleaseNotes' so we could check what you fixed and news ??
Regards,
SEO

http://www.purebasic.com/news.php3

_________________
--Kale

Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jan 26, 2006 1:55 pm 
Offline
Enthusiast
Enthusiast

Joined: Fri Dec 09, 2005 11:42 pm
Posts: 178
Location: Sweden
Old news.. http://www.purebasic.com/news.php3
Oct 2005, there ar later releases...


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jan 26, 2006 3:01 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14065
Location: France
No problem for the file, i will add it.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye