get loudness level from raw data recieved from microphone in DirectShow

感情迁移 提交于 2019-12-08 13:52:39

问题


How I can get loudness level from raw data received from microphone in DirectShow?

IMediaSample keep data in bytes. And how I can read this bytes and get something?


回答1:


Loudness is an aural quality, not a physic formula. There are many many definitions for it.

It's a also a temporal value. As a consequence, this value changes during the time.

The simplest implementation I remember I had seen some years ago, was simply putting a time out on the maximum value of the amplitude. But the log of the amplitude is surely better to approximate the ear sensitivity much closer.

You can also consider the power of the signal ( signal * signal ... but there are also more definitions that takes into account the frequency spectrum components...).

It's kitchen recipes. Choose the simplest.

Edit: it seems my answer was too fast and fuzzy, I probably mistake Volume and Loudness. this wikipedia article states there are units for measuring loudness. Sone and Phon.




回答2:


You need to process data to calculate loudness out of raw bytes. One of the method is defined in BS.1770 : Algorithms to measure audio programme loudness and true-peak audio level specification and describes the algorithm involved.



来源:https://stackoverflow.com/questions/14247589/get-loudness-level-from-raw-data-recieved-from-microphone-in-directshow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!