It is currently Fri Apr 28, 2017 8:42 pm

All times are UTC - 5 hours




 Page 1 of 1 [ 4 posts ] 
Author Message
 Post subject: Shader VMK 107 - Audio Playback
PostPosted: Tue Nov 10, 2015 8:59 pm 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1094
Location: Ontario Canada
In this VMK I use the Audio Manager to load audio files into the game engine, and then play each file back on command by pressing keys on the keyboard.


Offline
 Profile  
 
 Post subject: Re: Shader VMK 107 - Audio Playback
PostPosted: Wed Nov 11, 2015 8:44 pm 

Joined: Sat Aug 16, 2008 7:58 am
Posts: 447
Very simple and straight forward, the only question I have is within the Engine's Destructor is where should the unique_ptr for the AudioManager reset call be located; before or after the AssetManager, etc.? You did not show this in your video to have the Engine manually release this smart pointer when it is being destroyed.


Offline
 Profile  
 
 Post subject: Re: Shader VMK 107 - Audio Playback
PostPosted: Thu Nov 12, 2015 9:02 am 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1094
Location: Ontario Canada
You're right, it looks like I forgot to update the Engine destructor. Order doesn't really matter here because there are no dependencies between the different singleton classes. I'd reset all the singleton's in the opposite order in which they are constructed.


Offline
 Profile  
 
 Post subject: Re: Shader VMK 107 - Audio Playback
PostPosted: Thu Nov 12, 2015 3:52 pm 

Joined: Sat Aug 16, 2008 7:58 am
Posts: 447
Yeah I figured as much and that is the approach that I took.


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

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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