file access in winrt apps media player library - c#

I am new to WinRT and I was planning on developing a WinRT app for a simple media player that would play audio/video, create playlist and have media library.
As I was thinking I would make a playlist class and serialize it when a playlist is saved. This playlist class would be holding path to the audio/video files that could be anywhere in the hard disk. Similarly for library I would store files info and path in the database for future access in the database. But as it turned out I can only access other files on system using pickers (except for few files).
But as we know that there is library and playlist features in the winrt music app in win8, there must be a legal and efficient way to do so.

Related

How to get local music information in Xamarin.Forms?

I am gonna build Xamarin.Forms app which will read music information like the artist's name and song's name from local music file.
Is there any way to do that?
Actually I need to get local music files like iTunes.
Here is a link for the Xamarin Media Manager to play music and videos using Xamarin.Forms
https://github.com/martijn00/XamarinMediaManager
You can combine this with a local file reader and away you go.

how can I Copy songs from Media library to Isolated Storage?

I am trying to create an Alarm Application with the Tone set by song from users Music Library. However, I can't find any documentation or example to Copy a song from Media Library -> Isolated Storage.All I find is the opposite of what I want to do. Please Help.

Is it possible to export a soundEffect as an audio file on Windows Phone?

I'm writing an app that can record sounds as soundEffects from XNA. Is it possible to save those sound effects as say an MP3, WAV, or WMA file? I know with the Camera class in XNA, you can export the texture and image data as a jpg file, but is there a similar function with soundEffects? I know there's IsolatedStorage, but I need users to be able to plug their phone into the computer and be able to easily access their sound files and I'm pretty sure users have no access to the IsolatedStorge used by the app.

need help playing mp3 files within .NET application?

My requirements are:
- play a mp3 file on button click
- provide a option to seek to a particular time
Almost all of the tutorials/resources that I came through, used ".wav" files to play the sound. But I need to play a ".mp3" file within the application, preferably without using any 3rd party library(NAudio, BASS, etc). I expect, it can be done using the available classes of the System.Media namespace.
What is the difference between a .wav file and .mp3 file? Are they encoded in different manner, and need different media plugins to be played?
So any help regarding mp3 files would be appreciated. Thanks.
I don't believe System.Media supports MP3 files. Assuming you are using Windows, a possible approach could be to use the Windows Media Player API by adding a COM reference to "Windows Media Player" in the Add Reference dialog. Then add a using directive:
using MP = MediaPlayer;
and then instantiate the class:
MP.MediaPlayer mediaPlayer = new MP.MediaPlayer();
You can then play music files by calling:
mediaPlayer.Open("filename.mp3");
This open method seems to automatically play the media file once it is opened, however there are explicit Play() and Stop() etc methods you can use to customise this behaviour to your liking.
The XNA framework also has ability to play music files using isn't allowed to contain spaces for some annoying reason so I recommend you use the Windows Media Player API if this is intended to be used on a PC.
I hope this has put you in the right direction!

opening or browsing for mp3 files in windows phone 7

im trying to create a mp3 player for windows phone 7...how do i create a open file dialog or something that will allow me to access my files on the phone so that i can play them with my app"???
EG:
say i have a folder in my sd card...how do i browse to that folder so that i can imports the songs from that folder into a playlist in my app...
There are no standard open file dialogs for WP7. (some choosers excepted.)
If you want to do this you'll have to create the dialog yourself. You can get the details of the songs saved into the Music&Video hub via the MediaLibrary object. (Add a reference to Microsoft.Xna.Framework.dll to use this from Silverlight.)
You'll then have access to lists (collections) of Albums, artists, playlists, songs, etc.
If you want to play tracks you've save in IsolatedStorage you can access these directly yourself.

Categories