资源简介
java对音频文件的频谱分析,很好的东西 !

代码片段和文件信息
/*
* Light Development Spectrum Analyzer Component
* Copyright (C) 2003-2005 Ulrich Hilger
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not write to the Free Software
* Foundation Inc. 59 Temple Place - Suite 330 Boston MA 02111-1307 USA.
*/
package com.lightdev.lib.audio.ui;
import java.awt.Graphics2D;
import java.awt.Color;
import java.awt.image.BufferedImage;
/**
* a user interface component to show an amplitude value
*
* @author Ulrich Hilger
* @author Light Development
* @author http://www.lightdev.com
* @author info@lightdev.com
* @author published under the terms and conditions of the
* GNU General Public License
* for details see file license.txt in the distribution
* package of this software
*
* @version 1 January 20 2005
*/
public class LevelMeter {
/**
* constructor
* @param bi BufferedImage the offscreen image to use for painting
* @param index int index inside a group of level meters
* @param width int width of this level meter
* @param height int height of this level meter
* @param min int minimum value to display by this level meter
* @param max int maximum value to display by this level meter
*/
public LevelMeter(BufferedImage bi int index int width int height int min
int max) {
this.bi = bi;
this.index = index;
setSize(width height);
this.min = min;
this.max = max;
sideMargin = barGap / 2;
}
/**
* set the size of this component
* @param width int the width
* @param height int the height
*/
public void setSize(int width int height) {
if(width > 0 && height > 0) {
this.outerWidth = width;
this.meterHeight = height;
meterWidth = outerWidth - barGap;
}
}
/**
* repaint this component
* @param value double the decibel value to display
*/
private void repaintMeter(double value) {
if(value > min && value < max) {
double oldValue = meterValue;
if (oldValue != value) {
//paintValue = oldValue;
meterValue = value;
if(bi != null) {
Graphics2D g2 = bi.createGraphics();
if (oldValue < value) {
increaseMeter(g2 value);
}
else {
re
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 5428 2005-01-21 22:02 ldsa.jar
目录 0 2005-01-22 09:47 doc\api\
文件 908 2005-01-22 09:46 doc\api\allclasses-fr
文件 868 2005-01-22 09:46 doc\api\allclasses-nofr
目录 0 2005-01-22 09:47 doc\api\com\
目录 0 2005-01-22 09:47 doc\api\com\lightdev\
目录 0 2005-01-22 09:47 doc\api\com\lightdev\lib\
目录 0 2005-01-22 09:47 doc\api\com\lightdev\lib\audio\
目录 0 2005-01-22 09:47 doc\api\com\lightdev\lib\audio\ui\
文件 16084 2005-01-22 09:46 doc\api\com\lightdev\lib\audio\ui\LevelMeter.html
文件 1113 2005-01-22 09:46 doc\api\com\lightdev\lib\audio\ui\package-fr
文件 6931 2005-01-22 09:46 doc\api\com\lightdev\lib\audio\ui\package-summary.html
文件 6910 2005-01-22 09:46 doc\api\com\lightdev\lib\audio\ui\package-tree.html
文件 66671 2005-01-22 09:46 doc\api\com\lightdev\lib\audio\ui\SpectrumAnalyzer.html
文件 4979 2005-01-22 09:46 doc\api\constant-values.html
文件 4915 2005-01-22 09:46 doc\api\deprecated-list.html
文件 8802 2005-01-22 09:46 doc\api\help-doc.html
文件 1274 2005-01-22 09:46 doc\api\index.html
文件 11373 2005-01-22 09:46 doc\api\index-all.html
文件 6669 2005-01-22 09:46 doc\api\overview-tree.html
文件 27 2005-01-22 09:46 doc\api\package-list
目录 0 2005-01-22 09:47 doc\api\resources\
文件 57 2005-01-22 09:46 doc\api\resources\inherit.gif
文件 8383 2005-01-22 09:46 doc\api\serialized-form.html
文件 1231 2005-01-22 09:46 doc\api\st
目录 0 2005-01-21 17:02 src\com\
目录 0 2005-01-21 17:02 src\com\lightdev\
目录 0 2005-01-21 17:02 src\com\lightdev\lib\
目录 0 2005-01-21 17:02 src\com\lightdev\lib\audio\
目录 0 2005-01-21 17:02 src\com\lightdev\lib\audio\ui\
文件 6411 2005-01-20 16:46 src\com\lightdev\lib\audio\ui\LevelMeter.java
............此处省略6个文件信息
- 上一篇:java图形化界面实现的个人通讯录管理系统
- 下一篇:JSP期末考试试卷及参考答案
相关资源
- 微博系统(Java源码,servlet+jsp),适
- java串口通信全套完整代码-导入eclip
- jsonarray所必需的6个jar包.rar
- 三角网构TIN生成算法,Java语言实现
- java代码编写将excel数据导入到mysql数据
- Java写的cmm词法分析器源代码及javacc学
- JAVA JSP公司财务管理系统 源代码 论文
- JSP+MYSQL旅行社管理信息系统
- 推荐算法的JAVA实现
- 基于Java的酒店管理系统源码(毕业设
- java-图片识别 图片比较
- android毕业设计
- java23种设计模式+23个实例demo
- java Socket发送/接受报文
- JAVA828436
- java界面美化 提供多套皮肤直接使用
- 在线聊天系统(java代码)
- 基于Java的图书管理系统807185
- java中实现将页面数据导入Excel中
- java 企业销售管理系统
- java做的聊天系统(包括正规课程设计
- Java编写的qq聊天室
- 商店商品管理系统 JAVA写的 有界面
- JAVA开发聊天室程序
- 在linux系统下用java执行系统命令实例
- java期末考试试题两套(答案) 选择(
- JAVA3D编程示例(建模、交互)
- Java 文件加密传输
- java做的房产管理系统
- 基于jsp的bbs论坛 非常详细
评论
共有 条评论