1
0
mirror of https://github.com/SineVector241/VoiceCraft-MCBE_Proximity_Chat.git synced 2024-11-20 10:27:45 +00:00
VoiceCraft-MCBE_Proximity_Chat/ATL/AudioData/IO/DummyReader.cs
2024-07-13 11:16:08 +10:00

65 lines
1.9 KiB
C#

using System.Collections.Generic;
using System.IO;
namespace ATL.AudioData.IO
{
/// <summary>
/// Dummy audio data provider
/// </summary>
public class DummyReader : IAudioDataIO
{
/// <summary>
/// Instanciate a dummy reader
/// </summary>
/// <param name="filePath"></param>
public DummyReader(string filePath)
{
Logging.LogDelegator.GetLogDelegate()(Logging.Log.LV_DEBUG, "Instancing a Dummy Audio Data Reader for " + filePath);
FileName = filePath;
}
/// <inheritdoc/>
public string FileName { get; }
/// <inheritdoc/>
public double BitRate => 0;
/// <inheritdoc/>
public double Duration => 0;
/// <inheritdoc/>
public int SampleRate => 0;
/// <inheritdoc/>
public int BitDepth => -1;
/// <inheritdoc/>
public bool IsVBR => false;
/// <inheritdoc/>
public Format AudioFormat => Factory.UNKNOWN_FORMAT;
/// <inheritdoc/>
public int CodecFamily => AudioDataIOFactory.CF_LOSSY;
/// <inheritdoc/>
public long AudioDataOffset { get; set; }
/// <inheritdoc/>
public long AudioDataSize { get; set; }
/// <inheritdoc/>
public ChannelsArrangements.ChannelsArrangement ChannelsArrangement => ChannelsArrangements.UNKNOWN;
/// <inheritdoc/>
public List<MetaDataIOFactory.TagType> GetSupportedMetas()
{
return new List<MetaDataIOFactory.TagType> { MetaDataIOFactory.TagType.NATIVE, MetaDataIOFactory.TagType.ID3V2, MetaDataIOFactory.TagType.APE, MetaDataIOFactory.TagType.ID3V1 };
}
/// <inheritdoc/>
public bool Read(Stream source, AudioDataManager.SizeInfo sizeInfo, MetaDataIO.ReadTagParams readTagParams)
{
return true;
}
}
}