1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-27 06:58:34 +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"};
}
}
}