Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

BASS Sound Engine


Guest
 Share

Recommended Posts

I've decided to release this mostly because most of the code isn't mine (credits for 90% of the code go to Damian666, I've really just fixed up a few things, cleaned it up, optimised it and added fading out) so I should really share it but also because I've mostly been bitching around here lately.

BASS is a sound library that allows you to play, from what I've noticed, most, if not all, formats. As a personal recommendation I suggest you use OGG simply because they are not tied under a license, the file size is still small and the quality is even better than MP3.

So let's start with the modules. Add [these two](http://fbe.am/cAw) modules to your project (Put the modules in your /src/ folder, hit Ctrl-D, select Existing and point it to the location of the modules). The first module, modBass adds library functions and the second, modSound adds playback functionality.

Next you will also need the .DLL file required to run the BASS library, you can get that [here](http://fbe.am/cAv).

Now what we have is essentially a working music engine. There is one final thing for people who like smooth fading out though.

At the start of the GameLoop add:

```
Dim TmrMusicFade as Long
```

And somewhere else in the GameLoop:

```

' Music fading

If TmrMusicFade < Tick And ShouldMusicFade Then

If MusicVolume - 0.1 > 0 Then

MusicVolume = MusicVolume - 0.1

Call SetVolume(MusicIndex, MusicVolume)

Else

MusicFaded = True

ShouldMusicFade = False

PlayMusic NewSong

End If

TmrMusicFade = Tick + 100

End If

```

This will make sure that your music fades out before the new song is played. If you want the song to simply fade out without going onto the next one then call PlayMusic like so:

```
PlayMusic ""
```

This will make it transition to an empty song which it simply won't play.

If you do not want a song to fade out then call PlayMusic like so:

```
PlayMusic "songhere.ogg", True
```

The true tells PlayMusic to simply ignore the fading out code.

This is a bit advanced, I understand, but hopefully I've explained it in an easy to follow way. If not feel free to ask any questions. Once again, 90% of the credits for this code goes to Damian666 who creared the initial module.
Link to comment
Share on other sites

I highly doubt Un4seen care about the old, unsupported, VB6 module and neither do they probably care about a small community using it. It's not like you'll be making millions off an Eclipse game or attract enough attention to cause someone to grow suspicious and report you to Un4seen (which would be pretty hilarious actually).
Link to comment
Share on other sites

  • 1 year later...
  • 4 months later...
> wait… why is he banned? does anyone have the files? i know this post is like 6 years older than dirt, but i'd sell my soul for those files....

[Here's a link](https://www.mediafire.com/?h3q56fnbjuhol4i) to the client side of an engine Sekaru and I worked on. It used modBass, so the files you're looking for should be there. I'd post the whole engine, but Amish doesn't really want EVB on the site. Anyways, I look forward to receiving your soul in the mail as promised. Hopefully this isn't a scam.
Link to comment
Share on other sites

I honestly don't think Amish will care: [https://github.com/IndieRising/EVB/blob/master/client/src/modBass.bas](https://github.com/IndieRising/EVB/blob/master/client/src/modBass.bas)

Just copy the code from that webpage, and you should be good to go.
Link to comment
Share on other sites

> [Here's a link](https://www.mediafire.com/?h3q56fnbjuhol4i) to the client side of an engine Sekaru and I worked on. It used modBass, so the files you're looking for should be there. I'd post the whole engine, but Amish doesn't really want EVB on the site. Anyways, I look forward to receiving your soul in the mail as promised. Hopefully this isn't a scam.

shame your not getting my soul *evil laughter* i may have sold it for some strawberry soda. 

what exactly did he get banned for?
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...