当前位置:主页>仓库管理软件> 列表

音频波型的实现 找esale服装进销存

仓库管理软件版1楼: [:D]偶学delphi不久,今天试着做个MP3播放器,哄哄MM!遇到个问题。
请问怎样才可以,在播放歌曲的时候,现实波形的显视,我下载过网上的pvmp3.dll文件,
不过用此文件很难控制播放进度,请问各位D姐D哥,有什么简单点的方法可以实现波形的显视。[:)]散分了!!!谢谢

2楼: http://www.2ccc.com/article.asp?articleid=766
看看这里吧,有你想要的 如esale服装进销存

3楼: 这个网站里面有你需要的东西
http://www.dsp-worx.de/

下面这个是下載的控件源码
http://download.dsp-worx.de/DCDSPFilter_v1.03_Source.zip

4楼: 好象我也没有找到可以使用的东东哟

5楼: 直接找控件做吧,到google找找

6楼: //***********************************************************************//
// //
// 画放音时的动态波形 //
// 参数: //
// Buf : 音频数据指针 //


// Length : 音频数据的长度 //
// DesCanvas : 用来显示波形的目标画布 //
// DH, DW : 目标画布工作区的高度与宽度 //
// Min, Max : 音频数据的最小值与最大值 //
// DrawLineColor : 画波形的颜色 //
// DrawBackColor : 画波形的背景颜色 //
// StartPoi : 开始画波形的位置 //
// DrawLength : 要画的波形的数据的长度 //
// 返回值: 无 //
// //
//***********************************************************************//
procedure HawDrawWave(Buf: PChar; Length: LongInt; DesCanvas: TCanvas;
DH, DW: SmallInt; Min, Max: LongInt; DrawLineColor, DrawBackColor: TColor;

StartPoi: LongInt = 0; DrawLength: LongInt = 0);
Var
i: LongInt;
Y: SmallInt;
DesBitMap: TBitMap;
begin
DesBitMap := TBitMap.Create;

with DesBitMap do //初始化图像对像
begin
Width := DW;
Height := DH;
Canvas.Brush.Color := DrawBackColor;
Canvas.Brush.Style := bsSolid;
Canvas.Pen.Color := DrawLineColor;
Canvas.Pen.Mode := pmCopy;
Canvas.FillRect(Rect(0, 0, DW, DH));
Canvas.MoveTo(0, DH DIV 2);
Canvas.LineTo(DW, DH DIV 2);
end;

if ((Length = 0) or (Buf = NIL)) then
begin
BitBlt(DesCanvas.Handle, 0, 0, DW, DH, DesBitMap.Canvas.Handle, 0, 0, SRCCOPY);
Exit;
end;

if (StartPoi MOD 2) = 1 then
StartPoi := StartPoi + 1;

if StartPoi >= Length then
StartPoi := 2;

if DrawLength div 2 > DW then //开始处
DrawLength := DW * 2;

if (StartPoi + DrawLength) > Length then
DrawLength := Length - StartPoi;


if DrawLength <= 0 then
DrawLength := DW * 2;

Max := Max - Min;
for i := 0 to (DrawLength div 2 -1) do
begin
if Max <> 0 then
Y := Abs(PCMInt(PChar(Buf) + StartPoi + i * 2)^ - Min) * DH div Max
else
Y := 0;

Y := ABS(DH DIV 2 - Y);

if Y >= (DH DIV 2) then
continue;

//画波形
DesBitMap.Canvas.MoveTo(i, DH DIV 2 - Y);
DesBitMap.Canvas.LineTo(i, DH DIV 2 + Y);

if i > DW then break;
end;
//复制图像
BitBlt(DesCanvas.Handle, 0, 0, DW, DH, DesBitMap.Canvas.Handle, 0, 0, SRCCOPY);
DesBitMap.Free;
end;

仓库管理软件版7楼: 关住

8楼: 我有现成的例子,要不?QQ:280501393

9楼: 数据应该转成pcm格式的 再画
才是正确的

www.zn123.com

10楼: 多人接受答案了。