<?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>Windows CE Networking Team WebLog : Author: Thais Melo</title><link>http://blogs.msdn.com/cenet/archive/tags/Author_3A00_+Thais+Melo/default.aspx</link><description>Tags: Author: Thais Melo</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Writing a network audio driver in Windows CE – Part 5 - Power consumption</title><link>http://blogs.msdn.com/cenet/archive/2005/12/15/504363.aspx</link><pubDate>Thu, 15 Dec 2005 23:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:504363</guid><dc:creator>cenet</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/cenet/comments/504363.aspx</comments><wfw:commentRss>http://blogs.msdn.com/cenet/commentrss.aspx?PostID=504363</wfw:commentRss><description>&lt;DIV class=Section1&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana"&gt;Writing a network audio driver in Windows CE – Part 5 - Power consumption&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;This blog will discuss &lt;B&gt;power consumption&lt;/B&gt;, the fifth bullet point in my &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Times; mso-bidi-font-family: Times"&gt;&lt;a href="http://blogs.msdn.com/cenet/archive/2005/10/10/479282.aspx."&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana"&gt;first blog&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana"&gt; about networked audio drivers. This is mainly a concern in portable devices using wireless networks, where battery life is important and wireless radio power consumption is usually significant.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana"&gt;In an audio driver that plays directly to local hardware (local audio driver or LAD), typical distribution of power consumptions is in:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 1in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list 1.0in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana"&gt;Higher CPU load to process audio from storage to output:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 1.5in; TEXT-INDENT: -0.25in; mso-list: l0 level2 lfo1; tab-stops: list 1.5in"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;o&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana"&gt;If audio data is encoded, decoding audio data;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 1.5in; TEXT-INDENT: -0.25in; mso-list: l0 level2 lfo1; tab-stops: list 1.5in"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;o&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana"&gt;General processing of audio data in the driver.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 1in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list 1.0in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana"&gt;Disk, reading audio data from storage source:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 1.5in; TEXT-INDENT: -0.25in; mso-list: l0 level2 lfo1; tab-stops: list 1.5in"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;o&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana"&gt;Spinning/seeking/reading in a hard disk;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 1.5in; TEXT-INDENT: -0.25in; mso-list: l0 level2 lfo1; tab-stops: list 1.5in"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;o&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana"&gt;Reading from flash memory.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 1in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list 1.0in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Audio hardware, playing back the reconstructed audio signal to: &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 1.5in; TEXT-INDENT: -0.25in; mso-list: l0 level2 lfo1; tab-stops: list 1.5in"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;o&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana"&gt;Headphone jacks;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 1.5in; TEXT-INDENT: -0.25in; mso-list: l0 level2 lfo1; tab-stops: list 1.5in"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;o&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana"&gt;System speakers.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana"&gt;These activities generally consume a little extra power, optimization from the driver behavior is usually not needed, and this extra power usage ceases when the playing of the audio is done.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana"&gt;For a networked audio driver (NAD) all of the above, with the exception of the outputting the audio signal to hardware, still apply. In addition, there is power used to send data over the network to the remote device responsible for playback (the sink). In a wired network, there is usually little or none extra power involved in sending data through the network.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The wireless case is more interesting, since the cost of having a wireless (i.e. Bluetooth, 802.11) radio on is usually fairly high. Moreover, wireless radios usually have varying levels of power consumption depending on what mode they are &lt;SPAN class=GramE&gt;on .&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana"&gt;For an example of how this can create non-trivial design decisions, when a user requests to play a track, if the source and the sink side don’t have an active connection, a NAD might have to negotiate a connection with a sink device before it starts playing the track. Establishing this connection consumes some power and takes some amount of time, thus adding some latency between the &lt;SPAN class=GramE&gt;time&lt;/SPAN&gt; when the user requests a play to the data actually getting played in the sink side. If the connection is already up, the data can be sent over the network right away without the delay for connection setup, but there is generally some cost involved in keeping the connection up. After the track is done playing, for how long should the connection be maintained (possibly not allowing the wireless radio to go into a lower/no power consumption mode) considering the user could potentially request that a new track be played soon after the initial one is done? The answer to that question is implementation specific, but can follow from:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 76.5pt; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo2; tab-stops: list 76.5pt"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana"&gt;How much power is saved by disconnecting the connection;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 76.5pt; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo2; tab-stops: list 76.5pt"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana"&gt;How likely is the user to request that a sound be played again;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 76.5pt; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo2; tab-stops: list 76.5pt"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana"&gt;What kind of user experience the driver should be optimized for;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 76.5pt; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo2; tab-stops: list 76.5pt"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana"&gt;What the underlying hardware is, and how it behaves in relation to power consumption (for example, certain Bluetooth radios have power save modes built into hardware that are automatically activated and transparent to upper layers).&lt;/SPAN&gt;&lt;/P&gt;
[Author : Thais Melo]
&lt;/DIV&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=504363" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/cenet/archive/tags/Author_3A00_+Thais+Melo/default.aspx">Author: Thais Melo</category></item><item><title>Writing a network audio driver in Windows CE – Part 4 - Transient Errors</title><link>http://blogs.msdn.com/cenet/archive/2005/11/15/493042.aspx</link><pubDate>Tue, 15 Nov 2005 22:18:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:493042</guid><dc:creator>cenet</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/cenet/comments/493042.aspx</comments><wfw:commentRss>http://blogs.msdn.com/cenet/commentrss.aspx?PostID=493042</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/o:p&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;This blog will discuss &lt;B style="mso-bidi-font-weight: normal"&gt;transient errors&lt;/B&gt;, the fourth bullet point in my &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Times"&gt;&lt;a href="http://blogs.msdn.com/cenet/archive/2005/10/10/479282.aspx"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;first blog&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt; about networked audio drivers.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;In an audio driver that plays directly to local hardware (local audio driver or LAD), the audio is usually sent to hardware in fully decoded (PCM) data mode and errors are rare and usually permanent. Thus most audio frameworks are designed with such assumption built in. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;In networks however, transient errors are common and expected. For instance, most networks can lose packets. Certain networks can re-order packets. Networks can also be temporarily disconnected. Wireless networks can have their bandwidth decreased by noise or close to out of range situations. Thus networked audio drivers (from here on NADs) need to be aware of the situations above and handle them graciously:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;If lost packets are possible/expected:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l0 level2 lfo1; tab-stops: list .75in"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;o&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;As mentioned in the &lt;a href="http://blogs.msdn.com/cenet/archive/2005/10/24/484280.aspx"&gt;bandwidth&lt;/A&gt; blog, to save bandwidth, a compression method might be used by a NAD before the data is sent over the network. This compression method should be chosen carefully to assure that if a packet is lost, all (stateless compression) or most of the data that is not lost can still be decoded. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l0 level2 lfo1; tab-stops: list .75in"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;o&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;If packets are being lost often due to network saturation, action might be needed from the NAD to avoid consistent sound degradation. This case is equivalent to diminished &lt;a href="http://blogs.msdn.com/cenet/archive/2005/10/24/484280.aspx"&gt;bandwidth, and is treated in that entry.&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;Packet re-ordering:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l0 level2 lfo1; tab-stops: list .75in"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;o&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;If packet re-ordering can happen in the network, the source side should have a time stamp mechanism so the sink side can determined in which order the packets were sent. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;If temporary disconnections are possible/expected:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l0 level2 lfo1; tab-stops: list .75in"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;o&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;Particularly in wireless networks, the sink and source sides might not be permanently connected due to power concerns. If a request to play audio is made, a connection might need to be started. The driver could do this transparently (connection started when the user hit play on a song for example) or ask the user to connect if currently disconnected.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l0 level2 lfo1; tab-stops: list .75in"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;o&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;If the sink becomes disconnected in the middle of playback, the NAD should behave graciously, possibly warning the user about the error and stopping playback.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;In a wireless network where interference/noise or low signal strength condition can decrease bandwidth temporarily, see &lt;a href="http://blogs.msdn.com/cenet/archive/2005/10/24/484280.aspx"&gt;bandwidth&lt;/A&gt; and/or &lt;a href="http://blogs.msdn.com/cenet/archive/2005/10/18/482474.aspx"&gt;timing&lt;/A&gt; blog for recommended solutions.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;SPAN style="FONT-FAMILY: Times; mso-bidi-font-family: 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;[Author: Thais Melo]&lt;/FONT&gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=493042" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/cenet/archive/tags/Author_3A00_+Thais+Melo/default.aspx">Author: Thais Melo</category></item><item><title>Writing a network audio driver in Windows CE – Part 3 - Bandwidth</title><link>http://blogs.msdn.com/cenet/archive/2005/10/24/484280.aspx</link><pubDate>Mon, 24 Oct 2005 22:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:484280</guid><dc:creator>cenet</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/cenet/comments/484280.aspx</comments><wfw:commentRss>http://blogs.msdn.com/cenet/commentrss.aspx?PostID=484280</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Times; mso-bidi-font-family: 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;This blog will discuss &lt;B style="mso-bidi-font-weight: normal"&gt;bandwidth&lt;/B&gt;, the second bullet point in my &lt;/FONT&gt;&lt;a href="http://blogs.msdn.com/cenet/archive/2005/10/10/479282.aspx."&gt;&lt;FONT face=Verdana&gt;first blog&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana&gt; about networked audio drivers.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Times; mso-bidi-font-family: 'Times New Roman'"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Times; mso-bidi-font-family: 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;In an audio driver that plays directly to local hardware (local audio driver or LAD), bandwidth is usually not a concern since it is only dependent on internal components (disk bandwidth, bus speed, processor speed, DMAs, etc) which provide more than enough bandwidth to play music, is well known and rarely varies.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Times; mso-bidi-font-family: 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;A networked audio driver (or NAD) on the other hand sends packets down the network stack it is using, which then go over some medium to a different device, where it gets played. So it depends in local bandwidth (above paragraph) and network bandwidth. I will from here on only discuss network bandwidth.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Times; mso-bidi-font-family: 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;Networks can only send a limited amount of data, usually have more than one user and are used for more than one purpose. This means that using network bandwidth efficiently is important. One way to do so is to compress the music being transferred in a format that both the source and sink understand. The decision on what type/amount of compression to use could be:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Times; mso-bidi-font-family: 'Times New Roman'"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Times; mso-bidi-font-family: 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;fixed (registry setting or hard coded in both source and sink);&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .75in"&gt;&lt;SPAN style="FONT-FAMILY: Times; mso-bidi-font-family: 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;made at connect time during a connect handshake or some other connecting mechanism;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .75in"&gt;&lt;SPAN style="FONT-FAMILY: Times; mso-bidi-font-family: 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;made during streaming if compression type/amount needs to change.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Times; mso-bidi-font-family: 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;A NAD using a network where the available bandwidth may vary should also be designed to adapt to those situations. For example, on a wireless medium, bandwidth decreases if there is noise in the channel or distance between source and sink increases. In both wired and wireless mediums, if other users/applications are using the network, the bandwidth available for the NAD decreases. As mentioned in the &lt;/FONT&gt;&lt;a href="http://blogs.msdn.com/cenet/archive/2005/10/18/482474.aspx"&gt;&lt;FONT face=Verdana&gt;timing blog&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana&gt;, one possible solution is to decrease the bit rate of the audio data being streamed. Another solution is to temporarily stop streaming until there is again acceptable bandwidth and possibly notify the user in some way. If real time behavior is expected, simply streaming the audio data at a lower bandwidth than required will create poor user experience (depending on the sink implementation, it could create skipping, playing the data at an incorrect rate, etc).&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Times; mso-bidi-font-family: 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Times; mso-bidi-font-family: 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;[Author: Thais Melo]&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=484280" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/cenet/archive/tags/Author_3A00_+Thais+Melo/default.aspx">Author: Thais Melo</category></item><item><title>Writing a network audio driver in Windows CE – Part 2 - Timing</title><link>http://blogs.msdn.com/cenet/archive/2005/10/18/482474.aspx</link><pubDate>Wed, 19 Oct 2005 03:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:482474</guid><dc:creator>cenet</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/cenet/comments/482474.aspx</comments><wfw:commentRss>http://blogs.msdn.com/cenet/commentrss.aspx?PostID=482474</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;FONT style="BACKGROUND-COLOR: #f5f5dc" color=#000080 size=2&gt;[Revision 10/20/05 - minor changes to make content clearer]&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;FONT size=2&gt;This blog will discuss &lt;B style="mso-bidi-font-weight: normal"&gt;timing&lt;/B&gt;, the first bullet point in my &lt;/FONT&gt;&lt;a href="http://blogs.msdn.com/cenet/archive/2005/10/10/479282.aspx."&gt;&lt;FONT size=2&gt;first blog&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=2&gt; about networked audio drivers. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;FONT size=2&gt;In an audio driver that plays directly to local hardware (LAD), the mechanism for timing is usually relatively simple. The driver writes to hardware buffers, stops writing when they are full, gets signaled when there are free buffers again. A networked audio driver (NAD) in the other hand sends packets down the network stack it is using, which then go over some medium to a different device, where it gets played.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;FONT size=2&gt;Note that some of the issues discussed below are also valid for a LAD, but they become more visible/bigger issues in NADs, because NADs might have higher local CPU usage, less information about sink device, less control over sink device, greater latency and performance issues due to the network they stream over, etc. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;FONT size=2&gt;One common system for NADs is to establish a connection through some sort of handshake where the codec type/codec settings/device settings are negotiated and then initiate streaming which is a one way communication from the source device to the sink device. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;FONT size=2&gt;Using the above mechanism, the &lt;SPAN style="COLOR: red"&gt;&lt;FONT color=#000000&gt;sink’s timing&lt;/FONT&gt;&lt;/SPAN&gt; implementation is just to play the sounds at the correct speed, and buffer everything else it receives until it is needed. The source implementation is more interesting due to the challenges below:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo1; tab-stops: list .75in"&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;1.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;It needs to send data fast enough so that the sink has enough data to play at any one time.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo1; tab-stops: list .75in"&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;2.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;It must not send data so fast that the sinks buffers get overrun or latency &lt;FONT color=#000080&gt;due to excessive buffering&lt;/FONT&gt; becomes strongly noticeable. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo1; tab-stops: list .75in"&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;3.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;If there are no built-in throttling mechanisms in the network technology it is using, it must send data to the network at a speed that will not adversely flood the network.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;FONT size=2&gt;If 1 is not followed, the sink will not have enough data to play, which will cause either skips or quality degradation if the sink attempts some skip mitigation technique. &lt;FONT color=#000080&gt;A simple way for the source to figure out how fast it needs to send data is to follow the audio sampling rate (kbit/s) of the audio data it is streaming&lt;/FONT&gt; (and possibly adjust data rate if there is extra data per packet), but trying to figure out what to do when this data rate is not possible due to performance problems in the source device or network presents more design options.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;FONT size=2&gt;If the issue is permanent, probably the best solution is to renegotiate the streaming rate between the devices to lower quality and thus lower kbit/s, or use a different codec. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;FONT size=2&gt;But sometimes performance issues can be intermittent and allow for solutions that will not yield a decrease of quality. For example, assume the music is being streamed from a device where at some point a higher priority application starts using most of the CPU cycles for a short period of time, temporarily starving the NAD, which will yield a skip on the sink side. In the case where the skip in inevitable, the driver might choose to make the skip longer to fill all local buffers and/or temporarily decrease system load before starting to stream again to avoid multiple skips when the system becomes busy. This creates better user experience, and much as one skip is annoying, 100 skips in 10 seconds are considerably worst. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;FONT size=2&gt;On point 2, to avoid sink side overrun, the source side needs to ensure that:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo3; tab-stops: list .75in"&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;The data is not consistently sent faster than the sink can consume it;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 1.25in; TEXT-INDENT: -0.25in; mso-list: l0 level2 lfo3; tab-stops: list 1.25in"&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;o&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;If the source sends more data than the sink can use consistently, even if it is a very small amount, eventually it will completely fill the buffers in the sink side which will have to start to use some mechanism to throw data away.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo3; tab-stops: list .75in"&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;There are no burst of data sent that are larger than the buffers in the sink side.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 1.25in; TEXT-INDENT: -0.25in; mso-list: l0 level2 lfo3; tab-stops: list 1.25in"&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;o&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;For instance, for efficiency reasons the source side might decide to send &lt;FONT color=#000080&gt;n milliseconds worth of&amp;nbsp;audio data&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&amp;nbsp;to the source at a time for efficiency reasons. The amount of data in n milliseconds must never be bigger than the size of the buffers in the sink side. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;FONT size=2&gt;For latency issues, the sink side buffering can also be important. For example, if all the source can do is send data bits to the sink and no control messages in the lines of “flush buffer”, if n milliseconds of data are buffered, several user scenarios can be affected, for example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l3 level1 lfo4; tab-stops: list .75in"&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;It will take n milliseconds to stop playing from the time the source stops sending data;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l3 level1 lfo4; tab-stops: list .75in"&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: red; FONT-FAMILY: Verdana"&gt;&lt;FONT color=#000000&gt;If user decides to change the data that&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt; is being streamed (i.e. skip to another &lt;FONT color=#000000&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="COLOR: red"&gt;&lt;FONT color=#000000&gt;track&lt;/FONT&gt;&lt;/SPAN&gt; &lt;/FONT&gt;mid-&lt;/FONT&gt;&lt;SPAN style="COLOR: red"&gt;&lt;FONT color=#000000&gt;track&lt;/FONT&gt;&lt;/SPAN&gt;), it will take n milliseconds for the change to reflect in the sink;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l3 level1 lfo4; tab-stops: list .75in"&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;If there are sounds created in real-time (i.e. system sounds) those will only be played n milliseconds later;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l3 level1 lfo4; tab-stops: list .75in"&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;SPAN style="COLOR: red; FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT color=#000000&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&lt;FONT color=#000000&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: red; FONT-FAMILY: Verdana"&gt;&lt;FONT color=#000000&gt;If video is being played concurrent to the sounds, the sound and video will become unsynchronized. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="COLOR: red; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;FONT size=2&gt;If (n + network latency time) is small enough this is quite imperceptible to the user, but otherwise this can be a serious user experience issue, so it is important to design buffering appropriately.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;FONT size=2&gt;I will not discuss 3 here since there are a lot of network timing information published, significant research in this area and most networking technologies supply some sort of load control/balancing (for some examples, see how TCP does this at the &lt;/FONT&gt;&lt;A href="http://www.ietf.org/rfc/rfc2001.txt"&gt;&lt;FONT size=2&gt;IETF&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=2&gt; website).&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Unfortunately, I don’t know of any sample audio drivers in CE which have timing mechanisms built in other than interrupts, so the writer of a NAD would have to implement timing themselves. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;There are of course many ways this could be done, but a couple of possible ways would be:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l2 level1 lfo2; tab-stops: list .25in"&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;Minor changes to wavdev sample driver, and add a middle layer between the stack and the driver that blocks the driver on writes for the necessary amount of time for the appropriate data rate. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l2 level2 lfo2; tab-stops: list .75in"&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;o&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;The middle layer would know how fast the data should go to the network, how much has been sent at any one point, and the time elapsed;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l2 level2 lfo2; tab-stops: list .75in"&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;o&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;If the audio driver tries to send a data packet at a time before any more data in meant to be sent to the sink, it is blocked until the appropriate time;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l2 level2 lfo2; tab-stops: list .75in"&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;o&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;If it tries to send data at or after the appropriate time it is allowed to do so without blocking. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l2 level2 lfo2; tab-stops: list .75in"&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;o&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;Some allowance for buffering should be made, so instead of one hard number for data sent in time n, it might be necessary to use 2 or more thresholds.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l2 level1 lfo2; tab-stops: list .25in"&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;Change wavdev (or write an audio driver from scratch) to do its own timing on writes (sends):&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l2 level2 lfo2; tab-stops: list .75in"&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;o&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;This solution does not need any extra layers for timing, but involves more changes on the sample driver;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l2 level2 lfo2; tab-stops: list .75in"&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;o&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;Most of the above changes explained for adding an extra layer to block writes apply, but the driver itself needs to stop and trigger its writes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.25in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;FONT size=2&gt;The choice of which way to implement this of course depends on the technologies being used, and other design trade-offs.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.25in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;FONT face=Verdana size=2&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.25in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&lt;FONT size=2&gt;Author Note: I apologize for posting this one late for the data mentioned in my initial blog.&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.25in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&lt;FONT size=2&gt;[Author: Thais Melo]&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV style="mso-element: comment-list"&gt;
&lt;DIV style="mso-element: comment"&gt;
&lt;DIV language=JavaScript class=msocomtxt id=_com_1 onmouseover="msoCommentShow('_anchor_1','_com_1')" onmouseout="msoCommentHide('_com_1')"&gt;
&lt;P class=MsoCommentText style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=482474" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/cenet/archive/tags/Author_3A00_+Thais+Melo/default.aspx">Author: Thais Melo</category></item><item><title>Writing a network audio driver in Windows CE – Part 1</title><link>http://blogs.msdn.com/cenet/archive/2005/10/10/479282.aspx</link><pubDate>Mon, 10 Oct 2005 22:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:479282</guid><dc:creator>cenet</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/cenet/comments/479282.aspx</comments><wfw:commentRss>http://blogs.msdn.com/cenet/commentrss.aspx?PostID=479282</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&lt;FONT style="BACKGROUND-COLOR: #ffff00" color=#000000&gt;[Updated to reflect status of other parts of this blog]&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&lt;FONT style="BACKGROUND-COLOR: #ffff00" color=#000000&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;In this series of blogs I will discuss the implementation of an audio driver that starts from the wavdev sample and streams audio over a network in real time. In part 1 I will list the main things that one has to worry about only when writing a network audio driver, and I will discuss each bullet point listed below in further blogs (parts 2 through 6) that will be posted in the date mentioned in the bullet point. If there is anything in particular that I listed (or didn’t list) that you want to see described in more detail, please let me know.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;While there are multiple ways for writing an audio driver for Windows CE, probably the easiest way to get started is using the sample driver code provided with Windows CE.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;For more information on the sample driver please see:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceddk40/html/cxconsamplewavedevdriver.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceddk40/html/cxconsamplewavedevdriver.asp&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Starting from the wavdev driver most of the upper layer work is done, meaning only hardware specific changes need to be made. Please note that this is only sample code, and as the documentations suggests, you are encouraged to change the sources in any part of the code to fit your needs. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;In an audio driver that plays to headphones or speakers, usually all the hardware specific layer does is write to certain hardware buffers obeying hardware interrupts. Audio drivers that write to a network are slightly different in that they write to a network buffer that then gets sent down the network stack and over some medium to a remote device.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;Some important differences for network audio drivers, which I will treat in more detail in future blogs:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .75in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;Timing - There are no hardware interrupts, so either the driver or the network layers below it, must be able to throttle the speed at which data is sent to avoid overrunning the buffers in the receiving side, the buffers on lower layers of the network stack or the network itself. Further details in Part 2 – estimated post date 10/17/05. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .75in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;Bandwidth - Most networks can only send a limited amount of data; this means sending raw high quality PCM data might not be acceptable. The driver might need a mechanism to figure out how much data can be sent over the network and in which format can it be sent (which formats does the other side understand). Further details in Part 3 – estimated post date 10/24/05. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .75in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;Latency – Latency in hardware is usually very low. When transmitting data over the network this can increase significantly. Also, in general, buffering data and sending in large chunks improves bandwidth but increases latency. &lt;FONT style="BACKGROUND-COLOR: #ffff00" color=#000000&gt;Further details in Part 2.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .75in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;Transient Errors – Certain networks can lose packets, it is important to consider if this is acceptable. Also, wireless networks can have their bandwidth decreased by noise or close to out of range situations; if using wireless networks are being used it is important for the driver to be able to cope with this situations.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Networks can also be temporarily disconnected, thus the driver needs to be aware of disconnections/connections, and the correct actions to take in such cases. Note that most audio frameworks do not deal with this type of errors graciously because they where in general designed for writing to local hardware, where transient errors are extremely rare. Further details in Part&amp;nbsp;4 – estimated post date 11/14/05. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .75in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;Power consumption - This mostly only applies to portable devices, especially to if the driver is using wireless networks. For instance, design decisions need to be made to when to connect and disconnect to the remote device when the driver is idle or back in use. Further details in Part&amp;nbsp;5 – estimated post date 11/28/05. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .75in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .75in"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;[Author: Thais Melo]&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=479282" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/cenet/archive/tags/Author_3A00_+Thais+Melo/default.aspx">Author: Thais Melo</category></item></channel></rss>