XNA Essentials

Game Programming for Xbox 360, PC + Windows Phone

NAVIGATION - SEARCH

Chapter 7 problems creating audio engine

Hey,


I am having some problems with chapter 7. When I try to compile SoundDemo.cs I get a DirectoryNotFoundException telling me that "...\XELibrary\SoundDemo\bin\x86\Debug\Content\Sounds\Chapter7.xgs" could not be found.  I solved the problem by manually creating the directory and then building the .xap project in XACT to create the .xgs file which I then dragged into the new directory. This seems quite a crude solution though, have I missed something?


 


Also I noticed on pages 117 - 118 the following code:


Matrix [ ] transforms = new Matrix[m.bones.Count];


m.CopyAbsoluteBoneTransformsTo(transforms)


.......


be.World = world * mesh.ParentBone.Transform;


Am I right in thinking that the third line here makes the first two redundant? I have noticed that the code on the CD does use the transforms array  but the code in the book uses mesh.ParentBone.Transform instead.


I apologise if any of these questions are silly ones, I am fairly new to XNA and visual studio Smile

Valahn - Sunday, May 24, 2009 @ 4:24 PM

Re: Chapter 7 problems creating audio engine

Sorry it has taken me a while to respond.


Unfortunately, the CD has two issues - the biggest being Chapter 7.  You will want to look at the Errata page or the Download page to download the updates to Chapter 7 and Chapter 9


Yes, that last line could be replaced with 


 


be.World = world * transforms[mesh.ParentBone.Index];


So it wouldn't be redundant, but as it stands now it is.


Hope this helps, and again I'm sorry for the late response.


Good luck!


Chad



Chad Carter - Thursday, May 28, 2009 @ 6:26 PM