For Programmers: Free Programming Magazines  


Home > Archive > Rexx > September 2006 > playing wav files from oRexx in Windows









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author playing wav files from oRexx in Windows
eybuch

2006-09-30, 4:01 am

Hello community...

I wish to play a couple to wav files from a rexx exec on my PC running
Windows XP.
when rexx executes this statement ... address CMD 'file.wav' ... the
Windows media player is open and the 'file.wav' file is executed
playing the sound, but the player is kept open and the rexx exec is
waiting until I manually close (X) the player. I need a way to do it
automatically without manual intervention.

many thanks for your help!

Gert van der Kooij

2006-09-30, 4:01 am

In article <1159609730.396169.10840@c28g2000cwb.googlegroups.com>,
eybuch@hotmail.com says...
> Hello community...
>
> I wish to play a couple to wav files from a rexx exec on my PC running
> Windows XP.
> when rexx executes this statement ... address CMD 'file.wav' ... the
> Windows media player is open and the 'file.wav' file is executed
> playing the sound, but the player is kept open and the rexx exec is
> waiting until I manually close (X) the player. I need a way to do it
> automatically without manual intervention.
>
> many thanks for your help!
>
>


When running with ooRexx you can use the RxWinExec command to start WMP.

Check this article for the WMP commandline options:
http://support.microsoft.com/KB/241422
Sahananda

2006-09-30, 8:02 am

Also, you can play sound files without invoking anything huge like WMP using
the functions PlaySoundFile(), PlaySoundFileLoop(), and StopSoundFile()
provided with OODialog. You just pass the address of the wav file you want
to play.

If you have not previously initialiseded a dialog in your code then you will
need to add the OODialog Functions first using this code

call RxFuncAdd InstMMFuncs, "OODialog", InstMMFuncs
call InstMMFuncs

It is possible (but I think unlikely) that it is necesary for you to
::require 'oodialog.cls'.

Hope that helps,

Jon

"Gert van der Kooij" <nomail@invalid.nl> wrote in message
news:MPG.1f88614354ad0a619896e9@news.xs4all.nl...
> In article <1159609730.396169.10840@c28g2000cwb.googlegroups.com>,
> eybuch@hotmail.com says...
>
> When running with ooRexx you can use the RxWinExec command to start WMP.
>
> Check this article for the WMP commandline options:
> http://support.microsoft.com/KB/241422



eybuch

2006-09-30, 7:04 pm

Hello Sahananda,
your suggestion solved my problem... I used the instruction
ret = PlaySoundFile("d:\wav\sound.wav","YES") and it worked out as
expected.
thank you.

Sahananda wrote:[color=darkred]
> Also, you can play sound files without invoking anything huge like WMP using
> the functions PlaySoundFile(), PlaySoundFileLoop(), and StopSoundFile()
> provided with OODialog. You just pass the address of the wav file you want
> to play.
>
> If you have not previously initialiseded a dialog in your code then you will
> need to add the OODialog Functions first using this code
>
> call RxFuncAdd InstMMFuncs, "OODialog", InstMMFuncs
> call InstMMFuncs
>
> It is possible (but I think unlikely) that it is necesary for you to
> ::require 'oodialog.cls'.
>
> Hope that helps,
>
> Jon
>
> "Gert van der Kooij" <nomail@invalid.nl> wrote in message
> news:MPG.1f88614354ad0a619896e9@news.xs4all.nl...

eybuch

2006-09-30, 7:04 pm

I solved the issue by the instruction ret = PlaySoundFile("file.wav")
thank you for your help.

Gert van der Kooij wrote:
> In article <1159609730.396169.10840@c28g2000cwb.googlegroups.com>,
> eybuch@hotmail.com says...
>
> When running with ooRexx you can use the RxWinExec command to start WMP.
>
> Check this article for the WMP commandline options:
> http://support.microsoft.com/KB/241422


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com