Indigo Rose Software
  #1  
Old 09-13-2008
qberty qberty is offline
Forum Member
 
Join Date: Sep 2008
Posts: 4
MOD,S3M/Music Player Script?

Is it Possible to have a setup created by setup factory be able to Play MOD or S3M/UNI tracker files? Or even Music files WHILE Installing or during Setup?

If so could someone help me?
Reply With Quote
  #2  
Old 09-14-2008
jassing's Avatar
jassing jassing is offline
Indigo Rose Customer
 
Join Date: Jan 2001
Location: Anderson Island, WA, USA
Posts: 1,899
Quote:
Originally Posted by qberty View Post
Is it Possible to have a setup created by setup factory be able to Play MOD or S3M/UNI tracker files? Or even Music files WHILE Installing or during Setup?

If so could someone help me?
I don't think this could be done directly....
You could probably use rundll to let windows handle it; and then forceably terminate it when you're done.
__________________
Reply With Quote
  #3  
Old 09-14-2008
slota slota is offline
Forum Member
 
Join Date: Aug 2008
Posts: 21
Use bassmod.dll (http://www.un4seen.com/) See sources. It's easy.
Reply With Quote
  #4  
Old 09-14-2008
slota slota is offline
Forum Member
 
Join Date: Aug 2008
Posts: 21
OK! check this out:
setup_factory_bassmod_player.zip
See Global Functions and descriptions.
Reply With Quote
  #5  
Old 09-14-2008
jassing's Avatar
jassing jassing is offline
Indigo Rose Customer
 
Join Date: Jan 2001
Location: Anderson Island, WA, USA
Posts: 1,899
Quote:
Originally Posted by slota View Post
OK! check this out:
Attachment 7046
See Global Functions and descriptions.
Great example. Worth noting to the newusers -- be sure to also review the OnCancel of screens & last screen's OnNext
UnloadModMusic()
is called.
__________________
Reply With Quote
  #6  
Old 09-14-2008
qberty qberty is offline
Forum Member
 
Join Date: Sep 2008
Posts: 4
Thank you guys! Very understanding.. And yea I looked into BASSMOD before this thread but didnt really know it.. and im OK at scripting so ill try it out.
Reply With Quote
  #7  
Old 09-15-2008
slota slota is offline
Forum Member
 
Join Date: Aug 2008
Posts: 21
Quote:
Originally Posted by jassing View Post
-- be sure to also review the OnCancel of screens & last screen's OnNext
UnloadModMusic()
is called.
Yes. In my "fast" example some mistakes are committed . Function UnloadModMusic() must be called always before APPLICATION_EXIT action on the all screens.

Create example with mp3 (Bass.dll)?
Reply With Quote
  #8  
Old 09-15-2008
qberty qberty is offline
Forum Member
 
Join Date: Sep 2008
Posts: 4
THanks works perfectly guys! ... What about mp3's?
Reply With Quote
  #9  
Old 09-16-2008
slota slota is offline
Forum Member
 
Join Date: Aug 2008
Posts: 21
- Setup Factory Bass Player -
Place this code to Global Functions and follow all descriptions:
Code:
----------------------------------------
-- Setup Factory Bass Player by slota --
----------------------------------------

-- Primer files
cPathDLL = _TempLaunchFolder .."\\bass.dll";   -- required library (http://www.un4seen.com/)
cPathMuz = _TempLaunchFolder .."\\zombie.mp3"; -- MP3/MP2/MP1/OGG/WAV/AIFF file
-- Mod music also supported (some modification in code required) but use for this smaller bassmod.dll

-- Parameters for playing, see included sources and help for bass.dll for more parameters
BASS_MUSIC_MONO = "2";
BASS_MUSIC_LOOP = "4";

-- Initializing, loading and playing (place PlayBassMusic() function in 'On Startup' actions)
function PlayBassMusic()
   -- Loading dll into the memory
   hDLL = DLL.CallFunction("kernel32.dll", "LoadLibraryA", "\""..cPathDLL.."\"", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL); 
   if (hDLL ~= 0) then -- if loaded then
     -- Initializes an output device
     fDll = DLL.CallFunction(cPathDLL, "BASS_Init", "-1,44100,0,0,0", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL); 
     if (fDLL ~= 0) then -- if initialized then
       -- Starts the output
       sDLL = DLL.CallFunction(cPathDLL, "BASS_Start", "", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL); 
       if (sDLL ~= 0) then -- if successful then
         -- Creates a sample stream from an MP3, MP2, MP1, OGG, WAV, AIFF or plugin supported file
         -- Please note: new bass.dll v2.4 used in some functions 64-bit parameters (QWORD)
         -- In this case parameters must be doubled (64 = 32 and 32), for example: "result, result, integer, integer"
         iDLL = DLL.CallFunction(cPathDLL, "BASS_StreamCreateFile", "0,\""..cPathMuz.."\", 0, 0, 0, 0,"..BASS_MUSIC_MONO+BASS_MUSIC_LOOP, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);
         if (iDLL ~= 0) then
           -- Starts playback of a stream
           DLL.CallFunction(cPathDLL, "BASS_ChannelPlay", iDLL..",1", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL); 
         end 
       end 
     end 
   end 
end 

-- Unload dll from the memory
-- Please note: this function must be called every time before exiting from setup
-- Place it on each screen on 'On Cancel' properties:
--[[
if g_ConfirmSetupAbort() then
    UnloadBassMusic()
	Application.Exit(EXIT_REASON_USER_ABORTED);
end
]]--
-- On finish page place it on 'On Next' (and 'On Cancel') screen properties
--[[
UnloadBassMusic()
Screen.Next();
]]--
function UnloadBassMusic()
  -- Frees all resources used by the output device, including all its samples, streams and MOD musics
  DLL.CallFunction(cPathDLL, "BASS_Free", "", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL); 
  DLL.CallFunction("kernel32.dll", "FreeLibrary", hDLL, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);
end

Last edited by slota; 09-16-2008 at 09:43 AM.
Reply With Quote
  #10  
Old 09-16-2008
qberty qberty is offline
Forum Member
 
Join Date: Sep 2008
Posts: 4
Thanks man! Your really Cool. What else could i Stuff into my setup to make it look cool? any equalizer? Slider for song info? Radio?...So much stuff.
Reply With Quote
  #11  
Old 05-02-2009
williamrogers williamrogers is offline
Forum Member
 
Join Date: Feb 2009
Posts: 2
Hi is it possible you could make so its a little more easy for us noobies to use this as everytime i try i get nill errors on the setup file loading.

I'd be gratefull if you could make a project in sf8.0 and then send it me.


Thanks
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I know the FS Command name of a movie??? yoske AutoPlay Media Studio 5.0 27 01-01-2005 11:39 PM
HOWTO: Install the Flash Player from a CD-ROM Support AutoPlay Media Studio 4.0 Examples 0 10-29-2002 05:05 PM
INFO: Difference between the Media Player Object and the AVI Object Support AutoPlay Media Studio 4.0 Examples 0 10-29-2002 03:15 PM
HOWTO: Make a Media Player Object Go Full Screen Support AutoPlay Media Studio 4.0 Examples 0 10-23-2002 12:23 PM
INFO: Minimum requirements for the Flash Object, Media Player Object, and Web Browser Object Support AutoPlay Media Studio 4.0 Examples 0 10-04-2002 11:09 AM


All times are GMT -6. The time now is 06:26 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software