资源简介
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图形化界面实现的个人通讯录管理
- java航空订票系统毕业设计论文
- Java 试题库管理系统java+mysql
- java课程设计视频播放器 完整
- 斗地主 游戏UML图及java代码
- 编译原理LR1分析器的设计与实现
- java EE考试试卷.zip
- java课程设计图书销售系统全版带数据
- wav简易音乐播放器java实现
- java 银行管理系统
- 门禁系统门禁系统门禁系统 java
- 七篇优秀java餐饮管理系统毕业设计
- 词法分析器java语言版本
- 多元线性回归_Java源码_参考文档
- 物流管理系统源代码java毕设
- guns学习课程包括收费的视频
- 一次,二次,三次指数平滑预测算法
- java俄罗斯方块源码
- JAVA GUI超市管理系统
- Java写的图书管理系统
- 最全 java23种设计模式 Debug模式+内存分
- java 实现Pascal语法分析
- 广工java试卷复习资料
- 采用java编写的C语言词法分析器(可执
- C编译器java编写词法分析,语法分析,
- java调用网易云音乐接口
- 基于MVC的航空订票管理系统
- GRPC简单应用Java+Python
- java程序-图书馆书籍借阅情况分析,完
- 编译原理实验二语法分析java代码Jav
评论
共有 条评论