Previous Thread
Next Thread
Print Thread
AG_PLAYSOUND #37700 06 Dec 24 08:54 AM
Joined: Aug 2016
Posts: 403
J
John Andreasen Offline OP
Member
OP Offline
Member
J
Joined: Aug 2016
Posts: 403
Hi,

I can't seem to get AG_PLAYSOUND to work. Am I doing something wrong?
Code
PRINT TAB(-10, AG_PLAYSOUND);"C:\Windows\Media\tada.wav,1";CHR(127);


Thanks,
John Andreasen
Diversified Data Software

Re: AG_PLAYSOUND [Re: John Andreasen] #37702 06 Dec 24 11:46 AM
Joined: Jun 2001
Posts: 11,925
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,925
Wow, I guess this isn't a very popular command! Either that or people read the documentation and hard-code the AG_PLAYSOUND opcode as 105 rather than using symbol from ashell.def. The AG_PLAYSOUND symbol was added 11 years ago, but was entered incorrectly as having value 104 instead of 105. It should look like this:
Code
    define AG_PLAYSOUND     = 105   ! [245] Play a sound [311] was 104

(Confusion was introduced by skipping 104, which is actually defined as a function that disable redraw for a control, but apparently was never documented on the theory that it was really only for internal use.)

You can download the corrected ashell.def file from the repository here.

Re: AG_PLAYSOUND [Re: John Andreasen] #37703 06 Dec 24 11:51 AM
Joined: Jun 2001
Posts: 11,925
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,925
While you're at it, you might as well execute UPDCUR in the SYS: directory to pick up the updated AGCMD.LIT utility so that it works properly with the PLAYSOUND command.

Re: AG_PLAYSOUND [Re: John Andreasen] #37704 06 Dec 24 12:06 PM
Joined: Aug 2016
Posts: 403
J
John Andreasen Offline OP
Member
OP Offline
Member
J
Joined: Aug 2016
Posts: 403
It is working now. Thank you!


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3