VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



MP3 Player ActiveX (xAudio) Control no more Windows Media player

by TheFrogPrince (8 Submissions)
Category: OLE/COM/DCOM/Active-X
Compatability: Visual Basic 5.0
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating: (6 Votes)

This download contains an ActiveX control project created in Visual Basic that implements a simple MP3 player using the xAudio library. The quick story on xAudio is, last year the software was purchased by InterTrust, and since then, the SDK for the library has been unavailable. While I eventually did find an older copy of the SDK, my work that you see here is based on a post I found in vbcoders.com.
https://www.vbcoders.com/vb/scripts/ShowCode.asp?txtCodeId=24534&lngWId=1

The zip contains a couple of dlls. The xAnalyze, xAudio, and apigid32 dlls are all static DLLs and are placed in the \Windows\System directory of your computer. The file jeffActiveXStaticDLL.dll is an ActiveX dll that must be registered with RegSvr32.exe. While I am not making the source code available for this dll, I can tell you that all it contains is the subclasser and hook modules from vbAccelerator.

Subclassing is required for the implementation of the player, so you could use the subclassing approach used in Gene's article, but I think you will find vbAccelerator's approach to subclassing (and my approach in this control) much better and easier to work with and debug.

At the time of this posting, I've tested the control in VB, FrontPage, and Visual Interdev. It is a simple player, offering up a handful of what I consider to be critical events from a player. The control has a .Play method that accepts either a filename or a url. The position slider is working, as are pause and stop. I've tested it pretty thoroughly thus far.

However, there are a couple of items I should mention. First, the volume and mixer have not been implemented yet. You can use the VBC project to see how these items are to be implemented. Second, I'm having some difficulty detecting an error when a bad mp3 file is sent to the player. Doing this does not generate any errors currently, the player simple starts then stops as soon as a Play command is issued. I haven't yet been able to detect whether the library is sending any kind of file format error notification or not.

That said, this is a basic, stable player... and it will free your app from any dependencies on Windows Media player stuff. Since from this point forward, I will be including additional dependencies in this control, here's where I've decided to break off a chunk to share.

So download a copy today... and get started on your own custom MP3 player control. =)

Don't forget to VOTE if you like this. =)

https://www.vbaccelerator.com/codelib/ssubtmr/ssubtmr.htm

https://www.vbaccelerator.com/codelib/hook/vbalhook.htm

Rate MP3 Player ActiveX (xAudio) Control no more Windows Media player

Download MP3 Player ActiveX (xAudio) Control no more Windows Media player

Download MP3 Player ActiveX (xAudio) Control no more Windows Media player (230 KB)

MP3 Player ActiveX (xAudio) Control no more Windows Media player Comments

No comments have been posted about MP3 Player ActiveX (xAudio) Control no more Windows Media player. Why not be the first to post a comment about MP3 Player ActiveX (xAudio) Control no more Windows Media player.

Post your comment

Subject:
Message:
0/1000 characters