Welcome to the Windows Central Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Results 1 to 3 of 3
  1. Daniel Ratcliffe's Avatar
    Retired Moderator

    Posts
    2,821 Posts
    Global Posts
    4,477 Global Posts
       #1  
    Ok, so I'm wanting to release my WP7 app, but one of the things that has me irked is I can't seem to find a way to get audio from the app into the default music player. What I'll be doing is adding a playlist that consists of copies of the stream plus a "Bridge" which plays in between shows on the station to prevent dead air. Now, is there any way to plug this in to the music player while bypassing the shuffle? The reason for bypassing shuffle even if the user has it set is because I don't want 2 stream files next to each other, they need to be bridged. The files are all online so would be streamed to the device (warning about data usage will also be given).

    "Fortune cookie said: 'Outlook not so good'. I said: 'Sure, but Microsoft ships it anyway'."
  2. #2  
    You can't edit system playlists in Zune or directly modify the MediaPlayer's MediaQueue. What you can do in your app is to query the MediaLibrary for the music you want, and then use MediaPlayer.play() to play the Song you wanted. If you have streaming media, you can use Song.FromUri() to get a Song object for MediaPlayer.play(). If you want any kind of "playlist", you will have to manage that yourself somehow. To insert the "bridge", you can hook into the MediaPlayer's MediaStateChanged event to control the flow of the audio you want to play. For dealing with shuffle, you can save whatever value shuffle is set to when you start the app, set MediaPlayer.IsShuffled() to false, and then restore the original value of shuffle when the program exits.
    Last edited by Catholic Tech Geek; 01-16-2013 at 01:33 PM.
    rom developer for Asus Mypal A6x6 and Axim X50 (and soon, LG Quantum too) and (former) Microsoft Student Insider

    My work is free for everyone's use, but if you wish to give a donation towards my work (I am a recent college grad working in what little spare time I have), you may do so (paypal email is toa649@myway.com).

    Check out my blog for news on mobile Windows and other tech: Catholic Tech Geek

    Students, check out Dreamspark for the tools you need and Imagine Cup if you want a challenge
  3. Daniel Ratcliffe's Avatar
    Retired Moderator

    Posts
    2,821 Posts
    Global Posts
    4,477 Global Posts
       #3  
    Had a look through the links. They all seem to be XNA based commands. How would that differ with a standard Silverlight app, if at all?

    Quote Originally Posted by Catholic Tech Geek View Post
    For dealing with shuffle, you can save whatever value shuffle is set to when you start the app, set MediaPlayer.IsShuffled() to false, and then restore the original value of shuffle when the program exits.
    Thanks, would that involve a "get" command to grab the current state, and then setting that value back upon exiting the app? Also, where would that state be stored ready for calling on the app's departure? Final thing is that I'm integrating it into background audio so it plays even when the app isn't open, similar to TuneIn Radio, so not sure if that property would be useful.

    However, if I can find a way to store the state upon closing the app, so that it can be reset upon stopping the app's playlist (along with the Now Playing playlist prior to starting the app's playlist) that would be fantastic. I'm only having Play and Stop buttons in my app, to grab the stream and clear the stream playlists. Controls such as pausing the stream, and skipping tracks, will be handled by the UVC.

    "Fortune cookie said: 'Outlook not so good'. I said: 'Sure, but Microsoft ships it anyway'."

Similar Threads

  1. Replies: 5
    Last Post: 08-02-2011, 03:05 AM
  2. FastBall 2 now arrived to WP7 and is FREE!
    By Ozden79 in forum App Spotlight
    Replies: 0
    Last Post: 08-01-2011, 05:50 PM
  3. WP7 and Ford Sync?
    By daniel_leavitt2000 in forum Windows Phone 7
    Replies: 24
    Last Post: 07-26-2011, 04:54 PM
  4. Replies: 6
    Last Post: 05-31-2011, 11:47 AM
  5. Replies: 8
    Last Post: 03-10-2011, 12:42 PM

Posting Permissions