taglib c# windows phone 8.1 (and above)

Vagelis Dermos vagder at gmail.com
Tue Aug 18 15:59:56 UTC 2015


Hi to all, I do not know right place to ask my question
I am trying to develop an app for windows phone 8.1
my problem is that when I am trying to save the tags my app freeze .

my code is that:

code for Load:

private async Task LoadProperties()
{
 var fileStream = await audioFile.OpenStreamForReadAsync();
 var tag = TagLib.File.Create(new StreamFileAbstraction(audioFile.Name,
fileStream));
 tagFile = tag;
 properties = tag.Properties;
 var thumbnail = await audioFile.GetThumbnailAsync(ThumbnailMode.MusicView);
 var bitmap = new BitmapImage();
 bitmap.SetSource(thumbnail);
 SongIco.Source = bitmap;
 AlbumTB.Text = tagFile.Tag.Album;
 AlbumArtistTB.Text = tagFile.Tag.JoinedAlbumArtists;
}

Code for Save:

StorageFile audioFile;
TagLib.Properties properties;
TagLib.File tagFile;

private async Task SaveProperties()
{
 tagFile.Tag.Performers[0] = ArtistTB.Text;
 tagFile.Tag.Album = AlbumTB.Text;
 tagFile.Tag.TrackCount =
Convert.ToUInt32(Regex.Replace(TrackNumberTB.Text, @"[^\d]", ""));
 tagFile.Tag.Year = Convert.ToUInt32(Regex.Replace(YearTB.Text, @"[^\d]",
""));
 tagFile.Save();
 var messageDialog = new MessageDialog("Tags Saved!!!");
 await messageDialog.ShowAsync();
}

Just after "tagFile.Save();" everything freeze.
What I am doing wrong?

Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/taglib-devel/attachments/20150818/b1698920/attachment.html>


More information about the taglib-devel mailing list