mirror of
https://github.com/LazyDuchess/OpenTS2.git
synced 2025-01-22 08:11:47 -05:00
Fix mp3 audio not restarting playback
This commit is contained in:
parent
2df0533145
commit
5eb08fec11
1 changed files with 3 additions and 3 deletions
|
@ -36,10 +36,11 @@ namespace OpenTS2.Content.DBPF
|
|||
private AudioClip _clip;
|
||||
private Mp3FileReader _mp3Reader;
|
||||
private ISampleProvider _sampleProvider;
|
||||
private MemoryStream _stream;
|
||||
|
||||
public MP3AudioAsset(byte[] data) : base(data)
|
||||
{
|
||||
var stream = new MemoryStream(data);
|
||||
_stream = new MemoryStream(data);
|
||||
_mp3Reader = new Mp3FileReader(stream);
|
||||
_sampleProvider = _mp3Reader.ToSampleProvider();
|
||||
}
|
||||
|
@ -58,8 +59,7 @@ namespace OpenTS2.Content.DBPF
|
|||
|
||||
private void OnClipPositionSet(int position)
|
||||
{
|
||||
// Hallo :3
|
||||
//_mp3Reader = new Mp3FileReader(_stream);
|
||||
_mp3Reader = new Mp3FileReader(_stream);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue