I want to be able to crete a buffer, insert data into that buffer, and have some sort of sound device read and play from that buffer. I have spent a little time trying to figure this out.
I tried using SoundPlayer, but it said I had corrupt header data. (*I used a stream instead of file location) I suppose I could put data that would simulate a header in first that would indicate a really long file (my song needs to have a length of infinite time, as it has no end, and can change at any time). But this to me seems like a really nasty way of doing things. And I'm not exactly sure it would even work.
I tried adding DirectSound as a reference, but I had a problem with the function:
SetCooperativeLevel();
The first parameter needs to be a windows form or Control. How would I make this work for a 360 game?
Also, someone recommended not using Managed assemblies in XNA. Could you confirm or deny this?
I have noticed that others have complained a little about not having direct access to sounds like this, but I didn't see any solutions for it.
I couldn't find the source for SoundPlayer.cs on my computer (I thought I could just kind of work backwards).
I just need something like DirectSound in XNA; does such a thing exist? If not, could anyone tell me how to play a sound from a buffer and have it work on the 360? Thank you!
Mark Baker