cokuscz / audiowavecanvas Goto Github PK
View Code? Open in Web Editor NEW这是一个录音实时录制绘制波形,最后转成整个波形的例子。
这是一个录音实时录制绘制波形,最后转成整个波形的例子。
点击开始录音,录完音后,播放录音,在播放录音时,按back键退出应用,声音还在播放,无法停止。
看了代码,似乎只能对于刚刚录制的文件显示波形图,有本法加载本地音频文件显示波形图吗?
小米4c上使用这个demo进行录音,录下来的都是杂音,听不清话。我的小米4c是安卓7.0的。另外,放在小米5s上就没问题了,录音比较清楚。
我在研究WaveCanvas.java编写绘制波形图的示例中,指示时间的纵向横线未能显示,数据超出单屏的宽度后,非实时更新,请问Githuber有空能解答我的疑惑吗?
这是我的仓库地址AcousticNativeModule
绘制类在
\AcousticNativeModule\app...\acousticloc\audio\wave\AudioWavePainter
NullPointerException
WaveformView.millisecsToPixels(int)' on a null object reference
播放录制内容,更新waveView的时候
Android7.0 上播放全是刺啦的声音怎么解决
// Should be removed when the app will use directly the samples instead of the frames.
public int getSamplesPerFrame() {
return 1024; // just a fixed value here...
}
我想知道一下,如果使用自己的PerFrame,需要怎么修改。如果使用这个,我用本地的音频去加载。在ReadFile的时候,下面这部分代码会执行几十万上百万次。
for (i=0; i<mNumFrames; i++){
gain = -1;
for(j=0; j<getSamplesPerFrame(); j++) {
value = 0;
for (int k=0; k<mChannels; k++) {
if (mDecodedSamples.remaining() > 0) {
value += Math.abs(mDecodedSamples.get());
}
}
value /= mChannels;
if (gain < value) {
gain = value;
}
}
mFrameGains[i] = (int)Math.sqrt(gain); // here gain = sqrt(max value of 1st channel)...
mFrameLens[i] = frameLens; // totally not accurate...
mFrameOffsets[i] = (int)(i * (1000 * mAvgBitRate / 8) * // = i * frameLens
((float)getSamplesPerFrame() / mSampleRate));
}
Can you please grant a permissive license for your project, such as MIT?
运行会提示
java.io.FileNotFoundException: /storage/emulated/0/record/test.pcm: open failed: ENOENT (No such file or directory)
可能你的文件夹之前创建过... 可是adb删除以后运行看一下
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.