In article <230420041804484778%anony-mouse@[EMAIL PROTECTED]
>,
Anony-mouse <anony-mouse@[EMAIL PROTECTED]
> wrote:
> In article <230420041613029252%anony-mouse@[EMAIL PROTECTED]
>,
> Anony-mouse <anony-mouse@[EMAIL PROTECTED]
> wrote:
>
> But now I've got a "Type assignment incompatibility" error in the first
> line of the sound playing procedure.
>
> procedure PlaySound;
> var
> MySound: Handle;
> DummyError: OSErr;
> begin
> MySound := GetResource('snd ', 128);
> DummyError := SndPlay(nil, MySound, 0);
> end;
>
> It appears to be exactly the same as the example I was copying (with
> minor changes to variable names).
SndPlay takes a SndListHandle, rather than a plain handle. You should
be able to typecast it like this:
DummyError := SndPlay(nil, SndListHandle(MySound), 0);
Phil Taylor


|