Here ya go.
Published November 03, 2004
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.
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