我怎么知道第一个音频文件使用C#保存第二个? [英] How Can I Know The First Audio File Holds The Second One Using C#?

查看:84
本文介绍了我怎么知道第一个音频文件使用C#保存第二个?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用C#比较两个音频文件?



i有两个音频文件,第一个音频文件是最长的文件,第二个第二个音频是最小的文件。这意味着第一个音频文件保存第二个音频文件信息。因此,当我需要比较它们时,我怎么知道第一个音频文件使用C#保存第二个?



提前感谢

SZ

How can i compare two audio files by using C#?

i have two audio files the first audio file is the longest file and the second second audio is the smallest file. which means the first audio file holds the second one audio file information. So when i need to compare them how can i know the first audio file holds the second one using C#?

thanks in advance
SZ

推荐答案

最简单的方法是检查两个音频文件的格式和质量(分辨率)是否相同。

对于以下内容代码可以帮助 -

Easiest way is to check for the size if both audio files are of same format and quality (resolution).
For this following code can help-
FileInfo fi = new FileInfo(fileName);
long fileSize = fi.Length;





否则你可以检查持续时间和该检查以下链接 -

获取MP3持续时间和大小的最简单方法 [ ^ ]

如何确定C#中.wav文件的长度? [ ^ ]



希望,它有帮助:)



更新

对不起。这可能对您没有帮助,因为您的问题似乎有所不同,最初我误解了您是如何进入这种情况的。来自@SA的反馈有助于了解您的真正问题。我仍然没有删除解决方案,因为这可能会在推导出实际解决方案时帮助您。



Otherwise you can check for the duration and for that check following links-
Easiest way to get MP3 duration and size[^]
How can I determine the length of a .wav file in C#?[^]

Hope, it helps :)

UPDATE
Sorry. This probably may not help you as your problem seems to be different and initially I misunderstood about how you got in to that situation. The feedback from @SA helped understanding what can be your real problem. I still haven't deleted the solution as this may help you while deriving the actual solution.


这篇关于我怎么知道第一个音频文件使用C#保存第二个?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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