Sign in to follow this  
  • entries
    97
  • comments
    98
  • views
    50538

Here ya go.

Sign in to follow this  
caffeineaddict

108 views

I guess i've decided to give away a bit of code today. It's nothing much, just my audio wrapper. I don't know, maybe it'll help someone or it'll save them from doing some work? Anyway, it's here for the taking.

Oh, and feel free to critique.

Sound wrapper.
Sign in to follow this  


1 Comment


Recommended Comments

Well it's certainly a start [smile] Two things tho:

1. You should use enums rather than strings to define the type of file

2. You forgot to call FSOUND_Close()

Another alternative to #1 (and what I do) is have a base CAudioObject class with a pure virtual load function, then have CMusicObj and CSFXObj inherit from CAudio and impliment their own loading. This also works for playing and stopping sounds. All the common channel functions are handled in CAudioObject.

UML Diagram

Share this comment


Link to comment

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