<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.xna.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Audio/XACT</title><link>http://forums.xna.com/forums/33.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 0.0)</generator><item><title>Re: Xact Custom Streaming?</title><link>http://forums.xna.com/forums/thread/67172.aspx</link><pubDate>Fri, 06 Jun 2008 22:58:37 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:67172</guid><dc:creator>Duncan</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/67172.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=33&amp;PostID=67172</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com//Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;johnsm:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Well after reading the beta notes for XAudio 2, it looks like thats the way I&amp;#39;d like to go instead of XAct... Too bad XAudio 2 doesn&amp;#39;t support reverb yet... Looks like this is a wasted effort and perhaps I should just stick with using DirectSound for the PC... &lt;br /&gt;
&lt;br /&gt;
No one happens to know when reverb is planning on getting added to XAudio 2 do they?&lt;br /&gt;
&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;XAudio2 ships with a reverb effect: &lt;a href="http://msdn.microsoft.com/en-us/library/bb924655(VS.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/bb924655(VS.85).aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You may&amp;nbsp;also add your own&amp;nbsp;DSP effects via&amp;nbsp;xAPOs: &lt;a href="http://msdn.microsoft.com/en-us/library/bb669165(VS.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/bb669165(VS.85).aspx&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: Xact Custom Streaming?</title><link>http://forums.xna.com/forums/thread/67122.aspx</link><pubDate>Fri, 06 Jun 2008 20:26:23 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:67122</guid><dc:creator>Bjoern Graf</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/67122.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=33&amp;PostID=67122</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com//Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;BMKane:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;This is interesting.&amp;nbsp; I&amp;#39;m basically in the same boat as John: I open my (non-PCM) audio file within my own code, pass part of it through a decoder to get raw WAV data, and buffer some number of bytes.&amp;nbsp; But these File IO callbacks seem to assume that XACT loads the file itself and then calls the callback with the handle it opened.&amp;nbsp; Does anyone know if this is actually the case?&amp;nbsp; The documentation pages for these callbacks are pretty sparse and I haven&amp;#39;t found any sample code for this feature, so I&amp;#39;m not sure exactly how it&amp;#39;s supposed to work.&lt;/p&gt;
&lt;p&gt;If that is what it does, it doesn&amp;#39;t work too well for me since I&amp;#39;d like to load and close files myself.&amp;nbsp; More importantly, since I&amp;#39;m trying to stream audio that isn&amp;#39;t in WAV format, there&amp;#39;s no way XACT could get format and size information from the handle it opens.&amp;nbsp; Anyone know if there&amp;#39;s another way around this?&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;XACT expects that WaveBanks are in xwb format and nothing else. The custom file IO support exists&amp;nbsp;mainly&amp;nbsp;(as far as I can tell)&amp;nbsp;to support something like having all your assets in an archive instead of individual files. If you can figure out the binary format of the xwb you could create your own dummy for your audio files, implement the relevant XACT_FILEIO_CALLBACKS and feed the decoded data into the XACT engine. However, if that is worth the hassle is another question and&amp;nbsp;it might either be better to switch to use XAudio2 for these audio files or, if this is about compression only,&amp;nbsp;create the&amp;nbsp;WaveBank with xWMA compression - assuming this is all about XACT3. After all, XACT is not a&amp;nbsp;generic audio API, that&amp;#39;s what XAudio2 :]&lt;/p&gt;</description></item><item><title>Re: Xact Custom Streaming?</title><link>http://forums.xna.com/forums/thread/67085.aspx</link><pubDate>Fri, 06 Jun 2008 18:20:32 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:67085</guid><dc:creator>BMKane</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/67085.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=33&amp;PostID=67085</wfw:commentRss><description>This is interesting.&amp;nbsp; I&amp;#39;m basically in the same boat as John: I open my (non-PCM) audio file within my own code, pass part of it through a decoder to get raw WAV data, and buffer some number of bytes.&amp;nbsp; But these File IO callbacks seem to assume that XACT loads the file itself and then calls the callback with the handle it opened.&amp;nbsp; Does anyone know if this is actually the case?&amp;nbsp; The documentation pages for these callbacks are pretty sparse and I haven&amp;#39;t found any sample code for this feature, so I&amp;#39;m not sure exactly how it&amp;#39;s supposed to work.
&lt;p&gt;If that is what it does, it doesn&amp;#39;t work too well for me since I&amp;#39;d like to load and close files myself.&amp;nbsp; More importantly, since I&amp;#39;m trying to stream audio that isn&amp;#39;t in WAV format, there&amp;#39;s no way XACT could get format and size information from the handle it opens.&amp;nbsp; Anyone know if there&amp;#39;s another way around this?&lt;/p&gt;</description></item><item><title>Re: Xact Custom Streaming?</title><link>http://forums.xna.com/forums/thread/25208.aspx</link><pubDate>Tue, 18 Sep 2007 18:39:06 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:25208</guid><dc:creator>Scott Selfon</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/25208.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=33&amp;PostID=25208</wfw:commentRss><description>&lt;P&gt;Hi John,&lt;/P&gt;
&lt;P&gt;I may be misreading the question, but you can actually hook all of the file I/O callbacks in XACT; then it's up to you to deliver the content to XACT when it requests it for playback, and you can store/stream it however is most appropriate for your game. For more info, check out the documentation pages for&amp;nbsp;XACT_FILEIO_CALLBACKS, which you can fill in during initialization of your game's engine&amp;nbsp;(IXACTEngine::Initialize). Hope this helps!&lt;/P&gt;
&lt;P&gt;-Scott&lt;/P&gt;</description></item><item><title>Re: Xact Custom Streaming?</title><link>http://forums.xna.com/forums/thread/19598.aspx</link><pubDate>Wed, 08 Aug 2007 11:54:45 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:19598</guid><dc:creator>johnsm</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/19598.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=33&amp;PostID=19598</wfw:commentRss><description>Well after reading the beta notes for XAudio 2, it looks like thats the way I'd like to go instead of XAct... Too bad XAudio 2 doesn't support reverb yet... Looks like this is a wasted effort and perhaps I should just stick with using DirectSound for the PC... &lt;br&gt;&lt;br&gt;No one happens to know when reverb is planning on getting added to XAudio 2 do they?&lt;br&gt;</description></item><item><title>Xact Custom Streaming?</title><link>http://forums.xna.com/forums/thread/19484.aspx</link><pubDate>Tue, 07 Aug 2007 12:09:26 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:19484</guid><dc:creator>johnsm</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/19484.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=33&amp;PostID=19484</wfw:commentRss><description>&lt;p style="margin-bottom:0in;"&gt;Sorry if this has already been explained, but I've done my share of searching already...&lt;br&gt;&lt;/p&gt;

&lt;p style="margin-bottom:0in;"&gt;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...). 
&lt;/p&gt;

&lt;p style="margin-bottom:0in;"&gt;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...&lt;/p&gt;

&lt;p style="margin-bottom:0in;"&gt; 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...&lt;/p&gt;

&lt;p style="margin-bottom:0in;"&gt;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...&lt;/p&gt;&lt;p style="margin-bottom:0in;"&gt;&lt;/p&gt;:-(&lt;br&gt;</description></item></channel></rss>