Click here to Skip to main content
15,743,934 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
i am working on wp8 so after doing mess with it i am stuck at converting the song/audio file into stream or memory stream. i need the memory stream because than i will be sending it over my own asp webservice to upload the song file. this is what i have done for fetching songs from wp8 but now i am unable to convert it so that it can be sent over werbservice:

public GetAudio()

private void fetchFromPhone()
    MediaLibrary med = new MediaLibrary();
    SongCollection allAlbums = med.Songs;
    foreach (Song item in allAlbums)
        var stream = item;
        string arr = Convert.ToString( stream);
        byte[] by=Convert.FromBase64String(arr);
        MemoryStream ms= new MemoryStream (by);
        // i am unable to get stream..
        // what to do here next to send it over service



Or suggest me some better way to achieve this. thanks in advance.
Sergey Alexandrovich Kryukov 2-Dec-13 1:31am    
Who told you that base64 is somehow involved?! Weird idea...
Member 9357064 2-Dec-13 1:38am    
i am doing the same thing with a slightly changes for photos and its working fine..
well suggest what to do in this case for audio?
Sergey Alexandrovich Kryukov 2-Dec-13 2:28am    
You did not answer my question...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900