![]() |
||
| Home | SwiftForth Archive | SwiftX Archive | |

Greetings,
I've found out how to do it a long time ago. Basically you can use the windows
MCI api. I suspect that all your mp3 players use the same api as well. I've
used it for much more as well - I've played avi files to the console and all
sorts of things, so you have access to alot more than just mp3 and wave. Here
is the sample:
\ how to play an mp3 file in 6 lines of code
library winmm.dll
4 import: mciSendString
create returnstring 256 allot
0 value returnvalue
: mcicommand returnstring 255 returnvalue mciSendString ;
an example would be: z" play c:\mymp3.mp3" mcicommand
and you should hear something.
-Tom Dixon
Quoting Roger Dube <rogerdube_at_dathq.com>:
> I know how to play wav files using a Windows api, such as:
>
> ABSENT PlaySound [IF] LIBRARY WINMM.DLL
>
> 3 IMPORT: PlaySound [THEN]
>
> : tada ( --)
> z" c:\windows\media\tada.wav" 0 SND_FILENAME SND_SYNC OR PlaySound DROP ;
>
> Has anyone been successful in finding a way to play an mp3 file in a similar
> fashion? The standard shell commands to mp3 players usually have windows
> that pop up during play, whereas the above plays without any window
> distracting the operator.
>
>
> -- Roger
> --------------------------------------------
> Dr. Roger Dube
> President and Chief Science Officer
> Digital Authentication Technologies, Inc.
> 561.392.7404 (office)
> 561.892.2474 (eFax)
> RogerDube_at_datHQ.com
>
> http://www.datHQ.com
>
> PO Box 811564
> Boca Raton, FL 33481-1564
>
> ----------------------------------------------------------------------
> This email message is for the sole use of the intended recipient(s) and may
> contain confidential and privileged information. Any unauthorized review,
> use, disclosure or distribution is prohibited. If you are not the intended
> recipient, please contact the sender by reply email and destroy all copies
> of the original message. Any views expressed in this message are those of
> the individual sender, except where the sender specifically states them to
> be the views of Digital Authentication Technologies, Inc.
>
>
> ----------------------------------------------------------------------
> sftalk_at_forth.com The SwiftForth programming discussion email list
> To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
> For list command help, send subject "help" to sftalk-request_at_forth.com
> Message archives are located at http://www.forth.com/archive/sftalk
> ----------------------------------------------------------------------
> This list is a forum for SwiftForth users. For product support and bug
> reports, please send email to support_at_forth.com
> ----------------------------------------------------------------------
>
>
-- ---------------------------------------------------------------------- sftalk_at_forth.com The SwiftForth programming discussion email list To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com For list command help, send subject "help" to sftalk-request_at_forth.com Message archives are located at http://www.forth.com/archive/sftalk ---------------------------------------------------------------------- This list is a forum for SwiftForth users. For product support and bug reports, please send email to support_at_forth.com ----------------------------------------------------------------------Received on Sat Oct 16 2004 - 12:06:30 PDT
This archive was generated by hypermail 2.2.0 : Thu Nov 20 2008 - 03:04:34 PST