The Windows Media Center Platform Team Blog RSS 2.0
 Wednesday, September 12, 2007

This sample demonstrates how to use the PlaySound Element with the Timer Class to create a playback loop which does not use the PlayMedia Method and therefore is not reflected in the Windows Media Center user experience.

<Mcml xmlns="http://schemas.microsoft.com/2006/mcml">

 <UI Name="Default">

  <Locals>
   <Timer Name="MyTimer" Interval="10000" Enabled="true" AutoRepeat="true"/>
  </Locals>

  <Rules>
   <Rule>
    <Conditions>
     <Modified Source="[MyTimer.Tick]" InitialEvaluate="true"/>
    </Conditions>
    <Actions>
     <!-- MyContent.wav is of a known length which     -->
     <!--is slightly shorter than the interval defined -->
     <!--in the timer.                                 -->
     <PlaySound Sound="
file://MyContent.wav"/>
    </Actions>
   </Rule>
  </Rules>

  <Content>
   <Text Content="PlaySound + Timer" Color="White"/>
  </Content>

 </UI>

</Mcml>

Categories: Sample | Comments [0] | # | Posted on Tuesday, September 11, 2007 11:46:07 PM (GMT Standard Time, UTC+00:00)   
Blogroll
About

Disclaimer
All information available via this site is provided 'as is' with no warranties and confers no rights.

© Copyright 2008 Microsoft Corporation.

Sign In
All Content © 2008, Microsoft Corporation.