从存储在textfile中的原始样本创建wav的副本 [英] creating a copy of wav from original samples stored in textfile

查看:85
本文介绍了从存储在textfile中的原始样本创建wav的副本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好!



我正在开发一个VB.NET项目,处理16位Mono Wav(声音)文件。

我的VB.NET表格包含两个按钮。



阅读Wavfile的按钮1:


我已读取wav文件'Sound1.wav'的标题并将其16位样本值(正和负)存储在名为'readwav.doc'的文本文件中。



用于编写Wavfile的按钮2:

现在我想将这些示例值写入新的wav文件'Sound2.wav'。

我应该编写什么代码来使用存储在文本文件中的样本创建原始wav文件的副本?

Hello!

I am working on a project in VB.NET which deals with a 16-bit Mono Wav (Sound) files.
My VB.NET form contains two buttons.

Button 1 for Reading Wavfile:

I have read the header of a wavfile 'Sound1.wav' and stored its 16-bit sample values (positive & negative) in a Text File named 'readwav.doc'.

Button 2 for Writing Wavfile:
Now I want to write these sample values into a new wav-file 'Sound2.wav'.
What code should I write to create the copy of original wav file using samples stored in the textfile?

推荐答案

如果我理解正确,那么你现在就创建.wav文件的副本,因为你没有改变任何数据?



如果那是通过文本/十六进制编辑器查看Sound1.wav和Sound2.wav,你可以很容易地发现错误。
If I understand correctly, then you just create a copy of the .wav file right now, as you don't change any data?

If that is the case, then you can find out easily what's wrong by looking at Sound1.wav and Sound2.wav with a text/hex editor.


我使用了memorystream而不是textfile,没有失真和波形文件的副本已创建!唷!感谢上帝:))
I used memorystream instead of textfile and there is no distortion and wave file's copy is created! phew! Thank God :)


这篇关于从存储在textfile中的原始样本创建wav的副本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆