易截截图软件、单文件、免安装、纯绿色、仅160KB

delphi版MP3切割

好久没写BLOG了,送上一份原创的DELPHI版MP3切割,splitMp3为切割函数,支持按时间切割和按大小切割。望大家支持。
参考VC的资料编写的MP3切割DELPHI版单元.
unit UnitMp3DataUtil;
{
MP3 Cut Unit.
@author Jim Wu
2009-08
}
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls;
type
  Mp3SplitMode = (Mp3SplitByTime, Mp3SplitByDateLength);
  TMp3DataInfo = packed record
    isMp3: Boolean;
    bitrate: Integer;
    sampleRate: Integer;
    isMono: Boolean;
    isVBR: Boolean;
  end;
  function readMp3Head(fileName: string): TMp3DataInfo;
  function splitMp3(mode: Mp3SplitMode; length: Integer; fr: TFileStream; writeFileName: string; var actualLength: Integer; var actualMillisecond: Integer): integer;
const
  mpegBitrateTable: array[1..2,1..3,1..14] of Integer=(
    (
      ( 32, 64, 96,128,160,192,224,256,288,320,352,384,416,448),
      ( 32, 48, 56, 64, 80, 96,112,128,160,192,224,256,320,384),
      ( 32, 40, 48, 56, 64, 80, 96,112,128,160,192,224,256,320)
    ),
    (
      ( 32, 48, 56, 64, 80, 96,112,128,144,160,176,192,224,256),
      (  8, 16, 24, 32, 40, 48, 56, 64, 80, 96,112,128,144,160),
      (  8, 16, 24, 32, 40, 48, 56, 64, 80, 96,112,128,144,160)
    )
  );
  samplingRateTable: array[1..3,0..2] of Integer=(
    (44100,48000,32000),
    (22050,24000,16000),
    (11025,12000,8000)
  );
  frameLengthTable: array[1..2,1..3] of Integer=(
    (48000,144000,144000),
    (24000, 72000, 72000)
  );
  samplesPerFrameTable: array[1..2,1..3] of Integer=(
    ( 384


相关文档:

delphi 编写的com 对象 用php调用的实例

delphi 编写的com 对象 用php调用

实例
delphi:
function Tmyxml.Get_xml: WideString;
begin
      Get_xml:='wo shi a lei!';
end;
function Tmyxml.Get_xmldata: WideString;
var
xmlStr:string;
begin
  xmlStr := '<?xml   version="1.0" & ......

括号匹配(delphi)-转

type
TCharStack = class(TStack)
private
function GetTop: Char;
public
function Pop: Char;
function Push(Item: Char): Char;
property Top: Char read GetTop;
end;
const
FindSet = ['(',')'];

implementation
{$R *.dfm}
{ TCharStack }
......

Delphi 相关记录

1、TStringList支持的最大行数是多少?(http://topic.csdn.net/t/20060209/14/4547405.html)
楼主结论:“TStringList的LoadfromFile函数应该只能读取15万行以内的数据,但TStringList和TList的Add函数可以加到几百万行(甚至更多)也不会出错。程序出错的原因应该是Add非法内存指针导致的,正如tanlim(求学者) &nb ......

Delphi in a Unicode World Part I

 ---
Delphi in a Unicode World Part I: What is Unicode, Why do you need
it, and How do you work with it in Delphi?
By: Nick
Hodges
原文链接:http://dn.codegear.com/article/38437
Abstract: This article discusses Unicode, how Delphi developers
can benefit from using Unicode, and ho ......

Delphi 发布ActiveX控件 数字签名(转)

原作者:光明兄弟
最近我正在研究ActiveX技术。我使用Delphi 7创建了一个具有ActiveForm的ActiveX控件应用程序。这个控件产生一个.OCX文件。现在,我需要把这个控件部署在服务器端,在用户浏览网页并选择安装这个控件的时候,用户的IE才会下载、安装并显示这个控件。
但是我的控件必须作数字签名以后,IE才会下载安装。 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号