在C中打开一个.mp3文件 [英] Open an .mp3 file in C

查看:79
本文介绍了在C中打开一个.mp3文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!
最近,我学习了如何使用fopen,fclose在C中打开和关闭文本文件,以及如何使用fprintf,fscanf等!
现在,我想使用C语言打开.mp3文件,但这似乎有点困难!
我尝试使用mp3文件,就好像它是txt文件一样,但显然没有用!
我知道您可以帮助我!:)

Hey everyone!
Recently I learnt how to open and close text files in C with fopen, fclose and how to use fprintf, fscanf etc!
Now I want to open an .mp3 file using C language but it seems a bit difficult!
I tried to work with the mp3 file as if it was a txt file but obviously it didn''t work!
I know you can help me!:)
Thank you in advance!

推荐答案

MP3绝对是二进制文件,因此您必须(至少在Windows平台上)以二进制模式阅读.
但是,仅阅读它不会有帮助,因为解释MP3编码的数据有点困难(通常您必须使用" >]).
MP3 is definitely a binary file, hence you have to read it (on Windows platform, at least) in binary mode.
However, just reading it won''t help you, since it is a bit difficult to interpret the MP3 encoded data (usually you have to use a library[^] for the purpose).


这篇关于在C中打开一个.mp3文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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