Programming 2D Games

The official forum for "Programming 2D Games" the book by: Charles Kelly

It is currently Fri Feb 28, 2020 8:18 am

All times are UTC

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Xact query
PostPosted: Tue Mar 22, 2016 8:55 pm 

Joined: Wed Nov 25, 2015 4:56 pm
Posts: 24
I am currently creating my own game engine to insure that I have a good understanding of the code and I'm finding your book extremely useful. I am now adding sound support and I just want to ask a quick question because as far as I can tell your engine loads one set of sounds in. I want to be able to load different sound sets in at different times.

Before I go ahead and code this in, can the WaveBank and SoundBank be initialised multiple times. By this I mean, can I load a sound bank once, then clear the pointer and then load a different sound bank later?

I want to be able to load 1 set of sounds if playing as one faction and a different set if playing as another. I would also like different sounds for the menus. Trying to keep to memory usage down.

If this is possible, is it simple a case of loading the sounds as per your HRESULT Audio::initialize() function and then realising them as in Audio::~Audio() and then reloading new sounds as per the HRESULT Audio::initialize() function?

Thanks :)

[Edit] I cannot post any topics under your second edition section. It sounds interesting and I was just going to ask what topics the book will cover? :)

Reply with quote  
 Post subject: Re: Xact query
PostPosted: Sun Mar 27, 2016 4:55 pm 
Site Admin
User avatar

Joined: Sat Jan 28, 2012 4:36 pm
Posts: 554
I don't recall every attempting to load multiple wave banks. I'm too busy working on the new book to do any research on this subject especially since the new book will not use xact for audio.

Professor Kelly

Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 4 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
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group