我刚调试了你的程序
除了tacmout这个类型的数据,我没有注释了,其它的一切正常,
你这是个什么类型,要是个类的话,就需要先创建才能用,其它的我没有发现问题了,你在看看吧。
除了tacmout这个类型的数据,我没有注释了,其它的一切正常,
你这是个什么类型,要是个类的话,就需要先创建才能用,其它的我没有发现问题了,你在看看吧。
解决方案 »
- 对控件数组(EDIT)中的数进行操作的问题?
- 捆饶我好久了的query的update问题
- 怎么样加空格字符串?
- 如何将SQL数据导出到BDF 不用BATCHMOVE 那个太慢了 最后有原码 谢谢各位了~
- 文本框菜单的问题
- 怎样在动态生成的access2000数据表中定义字符型字段可以为空,谢谢大家
- 众位高手,NT4的启动放在什么地方了,就是那些 在启动菜单里看不到的,
- 有关SQL的一个基本问题
- 我怎样在Delphi中访问远程的ODBC,也就是说ODBC在局域网的另一台计算机上?
- 我有一个商用软件的试用版,他有几个菜单项屏蔽了,我可以激活它吗,如何激活呢?
- 怎样使win98不响应ctrl+alt+delete,alt+e,alt+f
- 在delphi中如何屏蔽windows系统中的打开,复制文件命令?
interface
uses
Classes,AcmOut;
type
PlayThread = class(TThread)
private
acmoutobj:tacmout;
playdata:pointer;
playsize:integer;
protected
procedure Execute; override;
procedure playout;
public
constructor Create(acmout:tacmout;data:pointer;size:integer);
end;
implementation
constructor PlayThread.Create(acmout:tacmout;data: pointer; size: integer);
begin
inherited Create(false);
//-》acmoutobj:=acmout;《-报错
//传入的这个acmout要是一个已经创建了的实例,如果此类型是个类的话。
playdata:=data;
playsize:=size;
freeonterminate:=true;
end;
procedure PlayThread.Execute;
begin
{ Place thread code here }
synchronize(playout);
if terminated then exit;
end;
procedure PlayThread.playout;
begin
acmoutobj.Play(playdata^,playsize);
end;
end.
如果tacmout是类的话,必须这样写,你有写过吗?
interface
uses
Classes,AcmOut;
type
PlayThread = class(TThread)
private
acmoutobj:tacmout;
playdata:pointer;
playsize:integer;
protected
procedure Execute; override;
procedure playout;
public
constructor Create(acmout:tacmout;data:pointer;size:integer);
end;
implementation
constructor PlayThread.Create(acmout:tacmout;data: pointer; size: integer);
begin
inherited Create(false);
//-》acmoutobj:=acmout;《-报错
//传入的这个acmout要是一个已经创建了的实例,如果此类型是个类的话。
If asssined(acmout) then
acmoutobj:=acmout;
playdata:=data;
playsize:=size;
freeonterminate:=true;
end;
procedure PlayThread.Execute;
begin
{ Place thread code here }
synchronize(playout);
if terminated then exit;
end;
procedure PlayThread.playout;
begin
acmoutobj.Play(playdata^,playsize);
end;
end.
acmoutobj.Play(playdata^,playsize);
在主线程的代码中实现吗?
两个不能同时播放,会起冲突。所以要用线程。