如何使用任何c代码将文本文件插入音频文件? [英] How to insert a text file into an audio file by using any c code?

查看:95
本文介绍了如何使用任何c代码将文本文件插入音频文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过LSB方法找到将txt文件嵌入音频文件的c代码,否则我找不到。请问有人帮我,因为我甚至不知道从哪里开始。



我需要你的帮助。

提前谢谢。



我尝试过的事情:



我是C的新人,有从来没有在与信号处理相关之前进行编程,这就是为什么我没有通过我的搜索获得任何相关结果。

Im trying to find a c code that embbeds a txt file into an audio file by LSB method or else but I couldt find one. Could anyone help me please because I dont even know from where to start.

I need your help.
Thank you in advance.

What I have tried:

I am new in C and have never programmed before related to signal processing that's why I am not getting any relsults by my search.

推荐答案

将音频文件加载到内存中。您必须了解并了解音频文件的格式。根据音频文件格式,可能需要执行一些解码才能访问原始样本值。获得原始样本值后,设置LSB。现在准备创建新的音频文件。如果您必须在阅读时解码,请立即执行相应的编码。另请注意,某些音频文件格式使用校验和。然后你必须重新计算LSB变化的块的校验和。



最后你应该知道改变LSB会引入失真。但这通常很小,采样率和分辨率都很高。



总的来说这是一个即使知道音频文件格式也无法简单回答的问题。但我希望以上内容可以帮助您了解要查找的内容,以便您可以回复更详细的问题,这些问题可以简单回答。
Load the audio file into memory. You must know and understand the format of your audio file. Depending on the audio file format, it may be necessary to perform some decoding to have access to the raw sample values. Once you have the raw sample values, set the LSB. Now prepare to create the new audio file. If you had to decode upon reading, perform the corresponding encoding now. Note also that some audio file formats use check sums. Then you have to re-calculate the check sums for the blocks where the LSB has been changed.

Finally you should know that changing the LSB will introduce distortion. But this will be usually small with high sample rates and resolutions.

Overall this is a question that can't be answered in short even when knowing the audio file format. But I hope that the above helps you to know what to look for so that you might come back with more detailed questions that can be answered in short.


这篇关于如何使用任何c代码将文本文件插入音频文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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