Results 1 to 6 of 6

Thread: How to play audio in windows phone 7

  1. #1
    Join Date
    Sep 2010
    Posts
    65

    How to play audio in windows phone 7

    The windows mobile is good with all the features and the looks. I tried by the different ways to load and to play the audio file on my windows mobile. I tried to do this by the Microsoft application XNA, which is used for the making the audio statement of the file. How can I play the audio files on my windows mobile? Another problem some of the audio files are not loading into the device, while I tried to loads this one. Any suggestion on this issue?

  2. #2
    Join Date
    Apr 2008
    Posts
    2,366

    Re: How to play audio in windows 7 phone?

    You can try o play the audio file into your windows mobile by the utilizing the following method to consume the media file or format. I suggest you to use the Media Player Launcher which is used for the windows phone to launch the media file in to the device. It will embed the audio as well as the video file by the using of Device Media player. It will works with the XNA application. Along with this use the Microsoft Silverlight Media Element API, it will help to embed the audio or the video file into some of the customize interfaces. Suppose for the audio format use the API with the Silverlight application. As per my knowledge in the XNA application you can add the sound effect feature with the audio format. I recommend you to play the audio file by the using of MediaStreamSource, if you are having any problem regarding the streaming/loading of the audio or the video file. Some codec’s are available for the windows mobile, if you still facing the problem after applying the above mentioned processes then install the codec for the player where you tried to play the audio file.

  3. #3
    Join Date
    Apr 2008
    Posts
    2,277

    Re: How to play audio in windows 7 phone?

    Simply tried by the Time line Meta data associated, it helps to load or to play the file on a particular. These markers are mainly used for making for the dead time of the audio file for the audio file itself. This is typically for the video file also. It will operate while the Media Element will reach to the Timeline marker during the playback of the audio file; it appears in the Marker reached event. It will handle the cod of the background of the event. Then the Media element object will help you to access the embedded file, it will store in the current media file. The collection of the returned list of the media will which is comes from the property of the Marker does not include in the timeline maker coded file.

  4. #4
    Join Date
    Apr 2008
    Posts
    2,465

    Re: How to play audio in windows 7 phone?

    In your post are trying to mean, to play the file in the background of the device? Then XNA sound effect, XNA Media player and the Silver light media file all are happens on the background of the device while it playback any file. And the thread which is using to play the file will not create the block of the operation. So while you tried to play any audio or the video file it will respond according to the expectation on the device thread. Or you are tried to say, to play the file while there is another file is playing on the background? So for that, you are correct while there is another file is already playing on the background of the device, no other file will play in the device. It will play while the package of the application that want to play will active, because every applications is comes with the package in the device. If you try to play the music then it will first interact with the API which are in the library, then it will play.

  5. #5
    Join Date
    Jan 2006
    Posts
    2,257

    Re: How to play audio in windows 7 phone?

    If you are trying to start the device with the playing something in the music library of the phone, it will continue after the dismissing from the user. Suppose there is one file is active on the device and you are trying to play the My Application file of the music library, then before the dismissing the playing file, the My Application will not active on the windows mobile. Because there might be a difference in the music file of the device. The package is might be not compatible with the windows mobile, make sure that. Also the file which you picked from the music library, is it delegates with the application or the launcher that you are using for the media file playback. If this is happens with you, then try to play the file with the Zune Music player, it will play the file while there is another file is playing on the background.
    With great power comes great responsibility - Spiderman's Uncle

    The Greatest Sig Ever

  6. #6
    Join Date
    Apr 2008
    Posts
    2,565

    Re: How to play audio in windows 7 phone?

    The script will help you to play a media clip in an infinite sequence in windows mobile phone. I did this it will help you. it will embed the media file with the Media Element and the Media Timeline application. This script will help to repeat the media file.
    Code:
    <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
      <StackPanel>
    
        <!-- The MediaElement control plays the sound. -->
        <MediaElement Name="myMediaElement" >
          <MediaElement.Triggers>
            <EventTrigger RoutedEvent="MediaElement.Loaded">
              <EventTrigger.Actions>
                <BeginStoryboard>
                  <Storyboard>
    
                    <!-- The MediaTimeline has a RepeatBehavior="Forever" which makes the media play
                         over and over indefinitely.-->
                    <MediaTimeline Source="media\tada.wav" Storyboard.TargetName="myMediaElement"  
                     RepeatBehavior="Forever" />
    
                  </Storyboard>
                </BeginStoryboard>
              </EventTrigger.Actions>
            </EventTrigger>
          </MediaElement.Triggers>
        </MediaElement>
    
      </StackPanel>
    </Page>

Similar Threads

  1. Unable to play streaming audio on windows Media Player 12
    By SURNAME in forum Windows Software
    Replies: 4
    Last Post: 28-12-2010, 10:04 PM
  2. Is there an API which can record audio in Windows Phone 7
    By Valdis in forum Portable Devices
    Replies: 5
    Last Post: 27-10-2010, 09:08 AM
  3. Replies: 6
    Last Post: 01-07-2010, 05:04 AM
  4. Replies: 3
    Last Post: 26-02-2008, 05:33 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,574,584.07805 seconds with 17 queries