Jump to content
  • Advertisement
Sign in to follow this  
suliman

Any1 using audiere?

This topic is 4884 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I can only create individual sounds and load them at the same time as I create the "holder" for the sound. I wanna do arrays, something like: suitalbeAudiereSoundClass * walksound[100]; walksound[0]->loadSample("spagetti.wav"); walksound[1]->loadSample("cucumber.wav"); Is it possible? How else can I add sounds belonging to a certain class etc and then load/unload it somewhere else... Thanks! Suliman

Share this post


Link to post
Share on other sites
Advertisement
Never used it before, but I'm guessing you should be able to. It just looks like you're doing it a little wrong. Maybe try:
suitalbeAudiereSoundClass walksound[100];

walksound[0].loadSample("spagetti.wav");
walksound[1].loadSample("cucumber.wav");
//etc.

Or if you wanna do it dynamically:
suitalbeAudiereSoundClass* walkSound;
walkSound = new suitalbeAudiereSoundClass[100];

walksound[0].loadSample("spagetti.wav");
walksound[1].loadSample("cucumber.wav");
//etc.
delete [] walkSound;

Also, the way you have it you're making an array of suitalbeAudiereSoundClass pointers. For each element you'd have to say:
walkSound[0] = new suitalbeAudiereSoundClass;
walkSound[0].loadSample("sample.wav");
And remember to delete each element
delete walkSound[0];

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!