當我運行包含NAudio庫的程序時,出現以下「由於其保護級別而無法訪問」錯誤。當我運行包含NAudio lib的程序時,出現以下錯誤(WaveInterop.mmioStringToFOURCC)無法訪問
public void ReadWaveHeader(Stream stream)
{
this.dataChunkPosition = -1;
this.waveFormat = null;
this.riffChunks = new List<RiffChunk>();
this.dataChunkLength = 0;
BinaryReader br = new BinaryReader(stream);
ReadRiffHeader(br);
this.riffSize = br.ReadUInt32(); // Read the file size (minus 8 bytes)
if (br.ReadInt32() != WaveInterop.mmioStringToFOURCC("WAVE", 0))
{
throw new FormatException("Not a WAVE file - no WAVE header");
}
if (isRf64)
{
ReadDs64Chunk(br);
}
int dataChunkID = WaveInterop.mmioStringToFOURCC("data", 0);
int formatChunkId = WaveInterop.mmioStringToFOURCC("fmt ", 0);
// Sometimes a file has more data than is specified after the RIFF header
long stopPosition = Math.Min(riffSize + 8, stream.Length);
問題是waveintrop – Layan
您運行的是什麼操作系統? –
窗口8,問題是WaveInterop.mmioStringToFOURCC請我需要你的幫助,並覺得你 – Layan