<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.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>So how do I play sounds anyway?</title><link>http://blogs.msdn.com/b/larryosterman/archive/2004/10/27/248701.aspx</link><description>Well, the answer to that is WAY more complicated than I can answer, there are LOTs of different ways, and I&amp;rsquo;m not qualified to talk about most of them. But I can talk about some of the easier ways to make noises. The first, and simplest one is PlaySound</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>What's in a WAV file?</title><link>http://blogs.msdn.com/b/larryosterman/archive/2004/10/27/248701.aspx#249168</link><pubDate>Thu, 28 Oct 2004 21:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:249168</guid><dc:creator>Larry Osterman's WebLog</dc:creator><description>&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=249168" width="1" height="1"&gt;</description></item><item><title>re: So how do I play sounds anyway?</title><link>http://blogs.msdn.com/b/larryosterman/archive/2004/10/27/248701.aspx#249039</link><pubDate>Thu, 28 Oct 2004 14:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:249039</guid><dc:creator>Edward</dc:creator><description>I've noticed a similar issue with my Compaq Tablet PC when I remove it from the keyboard. I think the keyboard is a mini usb hub with three HID devices, the keyboard, touchpoint and the swivel switch that changes the screen orientation. I get a couple of ding-dongs straight away after seperating the keyboard, and another one about 10 minutes later. Wierd.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=249039" width="1" height="1"&gt;</description></item><item><title>re: So how do I play sounds anyway?</title><link>http://blogs.msdn.com/b/larryosterman/archive/2004/10/27/248701.aspx#248986</link><pubDate>Thu, 28 Oct 2004 10:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:248986</guid><dc:creator>ga</dc:creator><description>IIRC, in order for /dev/dsp or /dev/audio to play a file correctly you have to configure it with a call to the ioctl function in &amp;lt;sys/ioctl.h&amp;gt;.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=248986" width="1" height="1"&gt;</description></item><item><title>re: So how do I play sounds anyway?</title><link>http://blogs.msdn.com/b/larryosterman/archive/2004/10/27/248701.aspx#248961</link><pubDate>Thu, 28 Oct 2004 08:46:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:248961</guid><dc:creator>Roger Lipscombe</dc:creator><description>Instead of SND_ALIAS, you can use MessageBeep. Strangely, though, MSDN says that it's not sent to the client under Terminal Services.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=248961" width="1" height="1"&gt;</description></item><item><title>re: So how do I play sounds anyway?</title><link>http://blogs.msdn.com/b/larryosterman/archive/2004/10/27/248701.aspx#248864</link><pubDate>Thu, 28 Oct 2004 02:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:248864</guid><dc:creator>Larry Osterman</dc:creator><description>ga,&lt;br&gt; How does /dev/audio know the sample rate of foo.wav?  Or does it just assume that the sample rate is some constant?&lt;br&gt;&lt;br&gt;Norman,&lt;br&gt;  SND_ASYNC means that the sound is actually played on a separate thread (inside winmm.dll), playing the sound is inherently synchronous to winmm, but we let the application's thread go before the sound finishes playing.&lt;br&gt;  What you're seeing is the time between when you plug in the card and the PnP notification that the card's been plugged in is received by the shell.  There's a lot of things that have to happen before the shell notification plays (like swapping in the shell notification code, and the PnP notification sound, etc).  That may be the cause of a large part of the delay.&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=248864" width="1" height="1"&gt;</description></item><item><title>re: So how do I play sounds anyway?</title><link>http://blogs.msdn.com/b/larryosterman/archive/2004/10/27/248701.aspx#248839</link><pubDate>Thu, 28 Oct 2004 00:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:248839</guid><dc:creator>ga</dc:creator><description>cat foo.wav &amp;gt; /dev/audio&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=248839" width="1" height="1"&gt;</description></item><item><title>re: So how do I play sounds anyway?</title><link>http://blogs.msdn.com/b/larryosterman/archive/2004/10/27/248701.aspx#248835</link><pubDate>Thu, 28 Oct 2004 00:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:248835</guid><dc:creator>Norman Diamond</dc:creator><description>&amp;gt; SND_ASYNC means that the playback of the&lt;br&gt;&amp;gt; sound file is asynchronous.&lt;br&gt;&lt;br&gt;Hmm.  By any chance is the Windows XP PCMCIA driver using that where previous versions of Windows didn't?  In Windows XP, sometimes I get the pair of tones indicating that Windows recognized removal of a PCMCIA card, and then I remember that 15 minutes ago I indeed removed one.&lt;br&gt;&lt;br&gt;By the way it doesn't seem to matter if I got Windows XP's permission to remove the card first.  If I'm going to remove an external hard drive (USB, or USB via a CardBus card, or SCSI) then of course I'd better get permission first.  But if it's a DVD or CD or floppy drive with no media in it, or a CardBus USB card with no device on the other end, sometimes I just pull it out without asking first.  In previous versions of Windows the recognition sounds were immediate, but in Windows XP the sounds might be 5, 15, or 30 minutes later.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=248835" width="1" height="1"&gt;</description></item><item><title>re: So how do I play sounds anyway?</title><link>http://blogs.msdn.com/b/larryosterman/archive/2004/10/27/248701.aspx#248809</link><pubDate>Wed, 27 Oct 2004 23:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:248809</guid><dc:creator>Larry Osterman</dc:creator><description>Chris, I'm sure that Stuart knows you can P/Invoke it, it's a dead simple API, so..&lt;br&gt;&lt;br&gt;But he's spot-on in saying that the framework doesn't handle multimedia at all.&lt;br&gt;&lt;br&gt;This will undoubtedly be fixed, but I'm not sure when (I'm not a CLR person).&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=248809" width="1" height="1"&gt;</description></item><item><title>re: So how do I play sounds anyway?</title><link>http://blogs.msdn.com/b/larryosterman/archive/2004/10/27/248701.aspx#248808</link><pubDate>Wed, 27 Oct 2004 23:31:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:248808</guid><dc:creator>Chris Lundie</dc:creator><description>I looked this one up on pinkvoke.net just a few days ago, and it works fine.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=248808" width="1" height="1"&gt;</description></item><item><title>re: So how do I play sounds anyway?</title><link>http://blogs.msdn.com/b/larryosterman/archive/2004/10/27/248701.aspx#248736</link><pubDate>Wed, 27 Oct 2004 20:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:248736</guid><dc:creator>Larry Osterman</dc:creator><description>I'll be honest and say that the 1.0 framework doesn't have a good story for multimedia events.&lt;br&gt;&lt;br&gt;I believe that there are plans for a better story in future versions of the framework, but...&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=248736" width="1" height="1"&gt;</description></item></channel></rss>