Play MP3 file 
Author Message
 Play MP3 file

How would one go about playing an MP3 file from Dolphin, with notification
that it's finished? I looked at ST3D, but I don't need a full graphics
framework--I just want to write a WinAmp-type of program.


Sun, 26 Feb 2006 05:54:25 GMT  
 Play MP3 file
Mark,

Quote:
> How would one go about playing an MP3 file from Dolphin, with notification
> that it's finished? I looked at ST3D, but I don't need a full graphics
> framework--I just want to write a WinAmp-type of program.

The Windows Media Player has an Automation interface, and Dolphin's ActiveX
Component Wizard should happily generate interface classes for you.  That's
the good news.  The bad news is that, at least when I last looked at it, the
Media Player's Automation interface is, at best, an exercise in reverse
engineering, and the MS documentation was silent on many salient points.
It's probably worth a look though.

Good luck!

Bill

--
Wilhelm K. Schwab, Ph.D.



Sun, 26 Feb 2006 08:12:08 GMT  
 Play MP3 file
Mark,

One approach would be to use the Dolphin's WinMMLibrary and use the "send
string" interface.

For example, open an mp3 file:
WinMMLibrary default

    mciSendString: 'open "filename" type MPEGVideo alias currentFile

    lpszReturnString: nil

    cchReturn: nil

    hwndCallback: nil.

Play the file you just opened:

WinMMLibrary default

    mciSendString: 'play ', currentFile

    lpszReturnString: nil

    cchReturn: nil

    hwndCallback: nil.

You don't get any notification when the file is finished playing though.
You might be able to use hwndCallback parameter for this.  I haven't
investigated that myself.

The other option, as Bill suggested, would be to wrap the Windows Media
Player control.  That approach does provide event-based notification.

ST3D uses the WinMMLibrary for playing MP3s.

VideoDoc, another Dolphin app, makes use of the Windows Media Player
control:

http://www.creative-computing-inc.com/VideoDoc/VideoDoc.htm


Quote:
> How would one go about playing an MP3 file from Dolphin, with notification
> that it's finished? I looked at ST3D, but I don't need a full graphics
> framework--I just want to write a WinAmp-type of program.



Mon, 27 Feb 2006 03:13:58 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Playing mp3 files with wxPython

2. Can use python to play MP3 file?

3. MP3 MP3 MP3

4. need subroutine for MP3 playing

5. Playing an mp3 in Clarion4?

6. Playing MP3

7. mp3 to wav, wav to mp3

8. rb3 and mp3 files??

9. Using mp3 files and database over a network

10. Clarion and mp3 Files

11. Fade-in / Fade-out MP3 Files

12. MP3 Files - Reading Information

 

 
Powered by phpBB® Forum Software