Author Topic: Sharing BassMod with other Apps (newbie question)  (Read 2350 times)

RobotLover

  • Posts: 2
I'm developing a shareware title using a multimedia authoring tool called Multimedia Fusion.  While this program doesn't provide any programming or scripting capabilities, it does work with ActiveX objects.  So last night I downloaded the Control Creation Edition of Visual Basic (version 5.0 -- it's free) and somehow managed to make an ActiveX control that actually works!

There are two problems with it, however:

1.  When I initialize modbass.dll at the start of my program, the program crashes.  If I wait a few seconds first, however, it seems to run fine.  (Anything I can do to fix this problem?  I'd like my music to start immediately.)

2.  The biggest issue I'm having is that when the BassMod music is playing (an .it file), the sound effects in my app don't work.  I suspect that BassMod has seized control of the sound card and isn't sharing.  Do I need to use Bass.dll instead? This is probably a complicated problem, but I'm not even sure where to start looking... so any suggestions or advice will be appreciated.

NOTE:  I have used the DMC2 object, but it only works with Bass.dll.  (And an older version at that, I believe.)  I'd prefer to use the smaller BassMod.dll if this is possible.  

Thanks in advance!

Ian @ un4seen

  • Administrator
  • Posts: 22829
Re: Sharing BassMod with other Apps (newbie questi
« Reply #1 on: 24 Mar '03 - 16:35 »
I can't help with the ActiveX stuff, but you should usually be able to use BASSMOD and other audio stuff simultaneously. The exception is if you're using Windows 95/98, and the soundcard does not support multiple output channels. What Windows version and soundcard are you using?

RobotLover

  • Posts: 2
Re: Sharing BassMod with other Apps (newbie questi
« Reply #2 on: 24 Mar '03 - 20:13 »
I'm running a pretty standard Dell Windows 98 machine with an SB Live card.  (It's a 733Mhz P2 with plenty of RAM.)

It may not have been clear in my original post, but the problem seems to be that the bassmod.dll and whatever sound routines are running in my app -- don't want to work at the same time.  As a test I started a bassmod.dll song and then tried to play a .wav file using Media Player; and as I suspected, Media Player gave me an error message that basically said: "Your sound hardware is unavailable."  Similarly, if I'm playing sound effects using my app, the bassmod.dll music won't play.

Instead of using the ActiveX control there is a[limited] "routine" that allows me to make .dll calls.  I junked the ActiveX and got this going last night and it works like a charm -- but I still have the sound effects problem.  They won't play.  (I'm only using the following calls:  BASSMOD_Init, BASSMOD_LoadSong, BASSMOD_PlaySong.)

NOTE:  I tried to get music playing with standard bass.dll, but this seems to require a *handle* and I haven't been able to get my program to return a value that I can use.

ALL I need to do is load a song, play the song, restart the song when it's finished, and stop the song.  (And still be able to have .wav sound effects playing at the same time.)  Can I do this with just a few basic .dll calls, or do I need to worry about streaming, memory management etc?

Ian @ un4seen

  • Administrator
  • Posts: 22829
Re: Sharing BassMod with other Apps (newbie questi
« Reply #3 on: 25 Mar '03 - 15:09 »
Quote
I'm running a pretty standard Dell Windows 98 machine with an SB Live card.  (It's a 733Mhz P2 with plenty of RAM.)

It may not have been clear in my original post, but the problem seems to be that the bassmod.dll and whatever sound routines are running in my app -- don't want to work at the same time.

hmm... if I remember correctly, I think you should be able to use multiple audio apps simultaneously in Win98 with an SB Live. What drivers do you have installed?

Quote
NOTE:  I tried to get music playing with standard bass.dll, but this seems to require a *handle* and I haven't been able to get my program to return a value that I can use.

I guess you mean the "win" parameter of the BASS_Init call? That should be the handle of your app's main window. If you don't have access to that handle, you can try using "0" instead. Make sure the window is created before calling BASS_Init.