Sorry if this has already been explained, but I've done my share of searching already...
So I'm trying to get streaming to work
with my audio engine, and the way mine works is I have another layer
that takes care of the streaming (double buffered). It seems like
there is no way to do custom streaming, like without a file handle
passed to XACT_STREAMING_PARAMETERS (as the data is already loaded
from the file on my engine...).
So I also tried using
PrepareInMemoryWave for my custom streaming, and specifying it to
loop forever and handle streaming myself. Because I have a double
buffer system, I can use XACTNOTIFICATIONTYPE_WAVELOOPED to get a
message back when I need to send it data for the second frame (soon
as the first frame should start playing). But I don't see any way for
it to receive a message exactly half way through the sample so I can
load the first frame soon as the second frame starts playing. I see a
XACTNOTIFICATIONTYPE_MARKER, but it looks like that doesn't actually
work yet... So I could just calculate how many milliseconds it would
take to play from the beginning of my wave to the center, and then
just start a timer callback to trigger on the middle on the playback
through my buffer... Hacky but doable...
But that leaves me with my final
problem... if I start changing the data in BYTE* pbWaveData I passed to
PrepareInMemoryWave, will it know to copy this buffer down to
wherever it needs to for actual playback? I doubt it...
So is custom streaming actual possible
on Xact, or should I just go back to using the old Xaudio for 360,
and DirectSound for W32? I was looking very forward to having cross
platform support without having to have duplicated code...
:-(