1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-01 05:10:50 +01:00
MLEM/MLEM.Data/Content/SongReader.cs

21 lines
577 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"};
}
}
2022-06-17 18:23:47 +02:00
}