It is currently Mon May 29, 2017 8:23 pm

All times are UTC - 5 hours




 Page 1 of 1 [ 6 posts ] 
Author Message
 Post subject: Ghost VMK 54 - Stream Game Music
PostPosted: Sun Feb 20, 2011 3:47 pm 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1094
Location: Ontario Canada
Four music streams are added to the game in this VMK. One is used during the intro/splash screen, one is used in the menu, one is used during regular play, and the last is used when the game is over.


Offline
 Profile  
 
 Post subject: Re: Ghost VMK 54 - Stream Game Music
PostPosted: Sat Apr 23, 2011 6:35 am 

Joined: Sat Aug 16, 2008 7:58 am
Posts: 447
As I was going through this VMK where you added the code for cleaning up OpenAL errors, I noticed that in the OpenAL series you added the alGetError() function in the AudioManager.h file, but you did not add this in the Ghost Toast series. Did you forget to add this, or will the code be ok?


Offline
 Profile  
 
 Post subject: Re: Ghost VMK 54 - Stream Game Music
PostPosted: Sat Apr 23, 2011 6:54 am 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1094
Location: Ontario Canada
I remember removing a few error messages from the AudioManager in Ghost Toast. If you are getting errors when trying to do something with audio, then you should put them back in.

Please post a message in the forums showing others where you inserted the missing error messages so that you can help others who may run into the same problem.

thanks!


Offline
 Profile  
 
 Post subject: Re: Ghost VMK 54 - Stream Game Music
PostPosted: Sun Apr 22, 2012 11:42 am 

Joined: Sat Aug 16, 2008 7:58 am
Posts: 447
I think I may have found a small memory leak. Inside of Scene::clearAll() I noticed in the video that you didn't add the deleting of the intro and menu streams.

These two lines of code should be added inside this function in the GROUP_1 section

pAudio->deleteObject( AUDIO_STREAM_INTRO );
pAudio->deleteObject( AUDIO_STREAM_MENU );

for the AUDIO_STREAM_PLAY and AUDIO_STREAM_GAMEOVER, you do not need to worry about this since it is already handled inside of the Scene::cleanLevelData() function.

I hope this helps!


Offline
 Profile  
 
 Post subject: Re: Ghost VMK 54 - Stream Game Music
PostPosted: Sun Apr 22, 2012 4:37 pm 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1094
Location: Ontario Canada
skilz80 wrote:
These two lines of code should be added inside this function in the GROUP_1 section

pAudio->deleteObject( AUDIO_STREAM_INTRO );
pAudio->deleteObject( AUDIO_STREAM_MENU );


This is not necessary in Ghost Toast since everything gets cleaned up in the AudioManager destructor when cleanUp() is called.


Offline
 Profile  
 
 Post subject: Re: Ghost VMK 54 - Stream Game Music
PostPosted: Sun Apr 22, 2012 11:05 pm 

Joined: Sat Aug 16, 2008 7:58 am
Posts: 447
Oh ok, I wasn't sure, I just noticed that every other object was deleted.


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 6 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  

cron