1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-12-26 18:19:24 +01:00
MLEM/MLEM.Data/Content/SongReader.cs

20 lines
576 B
C#
Raw Normal View History

2020-04-22 00:30:55 +02:00
using System;
using System.IO;
using Microsoft.Xna.Framework.Media;
namespace MLEM.Data.Content {
/// <inheritdoc />
2020-04-22 00:30:55 +02:00
public class SongReader : RawContentReader<Song> {
/// <inheritdoc />
2020-04-22 00:30:55 +02:00
protected override Song Read(RawContentManager manager, string assetPath, Stream stream, Song existing) {
return Song.FromUri(Path.GetFileNameWithoutExtension(assetPath), new Uri(assetPath));
}
/// <inheritdoc />
2020-04-22 00:30:55 +02:00
public override string[] GetFileExtensions() {
return new[] {"ogg", "wav", "mp3"};
}
}
}