WAVE Sample Files

http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/Samples.html

 

WAVE Sample Files

The following are WAVE files with various data types.

  • The files marked with an asterisk (*) will not play with Windows Media Player.
  • The file marked with a plus sign (+) plays as noise with Windows Media Player.

Sample Files from CopyAudio

The CopyAudio program (part of the AFsp package) can produce output files of a number of different types. Samples files produced by converting stereo 16-bit data are as follows. All of these files have information chunks at the end of the file after the sampled data.

Sample Files from GoldWave

The following file were created by Goldwave. The µ-law and A-law formats differ slightly from those produced by CopyAudio (The ITU-T standard is permissive as to which way to quantize sample values which fall exactly mid-way between output values.)

Multi-Channel Examples (WAVE_FORMAT_EXTENSIBLE)

A six channel (5.1 channel) audio file from the Microsoft site: 5.1 Audio

6_Channel_ID.wav (3.0 MB) Warning: LARGE file
A 6-channel WAVE file with speaker locations (FL FR FC LF BL BR)
44100 Hz, 16-bit, 5.8 s
- This file has a "cue " chunk with a count of zero cue points, followed by two empty cue point structures.

An eight channel (7.1 channel) audio file from the Microsoft site: Creating 7.1 Audio

8_Channel_ID.wav (8.8 MB) Warning: LARGE file
An 8-channel WAVE file with speaker locations (FL FR FC LF BL BR - -)
48000 Hz, 24-bit, 8.05 s

SoundCard Attrition Files (including WAVE_FORMAT_EXTENSIBLE files)

These files are taken from Soundcard Attrition Page.

  • stereol.wav (116 kB)
    A standard 16-bit stereo WAVE file, but with a long header
    22050 Hz, 16-bit, 1.32 s
    stereofl.wav (229 kB) +
    The same, but in TYPE-3 32-bit floats
    22050 Hz, 1.32 s
    4ch.wav (1,321 kB)
    Speech idents, in LCRS surround format
    44100 Hz, 3.83 s (from Microsoft)
    drmapan.wav (825 kB)
    Drum, panned ambisonically in a circle in quad format (LF, RF, LR, RR)
    22050 Hz, 4.78 s (created with CDP Multi-Channel Toolkit)

Perverse Files

The following WAVE files are perverse or have problems.

  • Pmiscck.wav (1 kB)
    WAVE file (9 samples) with an odd length intermediate chunk (type " XxXx").
    Ptjunk.wav (1 kB)
    WAVE file with trailing junk after the RIFF chunk.
    GLASS.WAV (79 kB)
    WAVE file with a RIFF chunk length larger than the file size (originally from www.sipro.com).
    Utopia Critical Stop.WAV (6 kB)
    WAVE file, PCM data, with a Fact chunk following the data. The Fact chunk contains the four characters " FILT" and not the number of samples. (From C:/WINNT/Media on a Windows 2000 system).

Other WAVE files

These files are from CCRMA at Stanford: ftp://ftp-ccrma.stanford.edu/pub/Lisp/sf.tar.gz.

首先,需要在项目中添加NAudio库的引用。然后,可以使用以下代码读取wave文件的chunk并在屏幕上显示出来: ```csharp using System; using System.IO; using System.Windows.Forms; using NAudio.Wave; namespace WaveChunkReader { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void btnBrowse_Click(object sender, EventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Filter = "Wave files (*.wav)|*.wav"; if (openFileDialog.ShowDialog() == DialogResult.OK) { txtFilePath.Text = openFileDialog.FileName; } } private void btnReadChunk_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(txtFilePath.Text)) { MessageBox.Show("Please select a wave file"); return; } using (WaveFileReader reader = new WaveFileReader(txtFilePath.Text)) { int bytesToRead = (int)(reader.SampleRate * reader.BlockAlign * 0.1); // read 100ms of audio data byte[] buffer = new byte[bytesToRead]; int bytesRead = reader.Read(buffer, 0, bytesToRead); if (bytesRead > 0) { // display the chunk on the screen txtChunkData.Text = BitConverter.ToString(buffer, 0, bytesRead).Replace("-", " "); } else { MessageBox.Show("Unable to read audio data"); } } } } } ``` 在上面的代码中,我们首先使用`OpenFileDialog`选择要读取的wave文件。然后,在单击“Read Chunk”按钮时,我们使用`WaveFileReader`类从文件中读取100毫秒的音频数据。最后,我们将读取到的字节数据显示在屏幕上的`txtChunkData`文本框中。 请注意,上面的代码只读取了wave文件的一个小部分数据,如果需要读取整个文件,可以使用类似于上面的代码来实现。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值