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

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.

Related

Embed/Play sound from web page (Like Amazons Digital music samples)

I'm creating a tool to scrape and search the Amazon music database, it then cross references with google to display a bunch of information about the songs. One thing I want to add if possible, is to play the sound from the form using the media link scraped form amazons webpage.
This is the media link:
https://d2q1srilgjznst.cloudfront.net/64%2F30%2F232646106_S64.mp3?response-content-type=audio%2Fmpeg&Expires=1534727161&Signature=HF~qj5XP2WRKBJlT0VT1hDIq4cieH7SWcgnxRUGWm045iqIV4L7YTxlLihQdde9ZNrL97xf8zkfatRn-YxGYh0Yk1RmCHHI6H53j1wjig36KsHPdlnwoEp7qM45NsNhYf4IfXXjHzQ-tnkDfocpFSHMqss9FosYXWCf9qGrWKTo_&Key-Pair-Id=APKAJVZTZLZ7I5XDXGUQ
I have already scraped the data needed, I just am unsure how I can go about playing this on my C# application?
I don't have any code to show as searching on google I couldn't find a single thing relevant to this, or if its even possible. The closest I found was this, for playing media files.
System.Media.SoundPlayer player = new System.Media.SoundPlayer(#"");
player.Play();
The other question is for MP3 files, this is for data sourced online.

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.

file access in winrt apps media player library

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.

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!

How can I play any audio file(e.g. mp3,wav) in C#?

I have a question regarding with audio files.My question is:How can I play any audio file(e.g. mp3,wav) in C#? So if I press a button,I want to play to an audio file.
How can I do that? Can you tell me how it is done with a sample code?Lastly,I have used .Net Framework 4.0.
for that first you need to load wmp.dll from your system32 folder
Then you need to add COM component
Now you can do other things(creating player)
I have a tiny project (cutted NAudio version, only playback is left and only MP3 and WAV is supported) to play MP3 and WAV files. Do you still need it? I can upload it if you need to.
A full code example on how to play waves in c# forms apps can be found here
http://msdn.microsoft.com/en-us/library/ms173187%28v=VS.100%29.aspx
You can also play wave files using C# and the XNA Framework. But that may not serve your purpose, since that is primarily for games development.

Categories