Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Loading an Array of MP3's to play with QM.
#1
I am starting work on a project where I want to populate an array with the paths of MP3 files. Then play those files consecutively using Quick Macros "Play" command.

It be nice to have a dialog, probably using a list box, where the names of the MP3's will display and the current playing track will be highlighted.

I figured I'd post to see if anyone has any ideas on the best way to do this. I know whatever I come up with will be mostly a hack.

What's your best shot at this Gintaras? A QM MP3 player...

I am not familiar enough with the windows media player control. it'd be neat if the play command was modified to accept arrays Smile

Thanks,
jimmy Vig
#2
This dialog uses embedded Windows Media Player control. The control has own playlists but here not used.


Attached Files
.qml   QM MP3 Player.qml (Size: 3.98 KB / Downloads: 302)
#3
I thank you so much for this great example of working with the WindowsMediaPlayer ActiveX Control.

Of course I am going to tweak it out to fit my specific needs, but this really helps me see how to do most of the stuff I'll need to use.

Thanks again,
jimmy Vig
#4
Gintaras,

I've been working on getting all of this and am coming to a very good understanding of working with the Windows Media Player Active X control. There are a lot of capabilities here.


Windows Media Player 11 on Windows XP:
I am having one problem with mono files. They won't seem to play in the little media player control...I couldn't get them to play in regular windows media player either. So of course I feverishly googled around for the answer. After sifting through tons of help files and forums where no final solution was ever given I stumbled across the fix...WMP11->Tools->Options->[Devices]->"Speakers"->"Audio Device to Use:" - - Change from Default DirectSound Device to a specific DirectSound Device. After I did that, mono MP3's played without a problem...So I stood up to rejoice, told my girlfriend how great life was...and then tested it on the WMP control in QM...DID NOT WORK! I figure I need to change this setting in the control through QM...but have no idea!

Please help.
jimmy vig
#5
I also have no idea. If you right click the control, there is Options, but I did not find what you need. Using WMP 12.
#6
Options needed are not there for WMP11 either...I've clicked on that about 100 times looking for the answer hoping something would change :oops:

CORRECTION: USED TO PLAY WITH "Play" command. Now they don't stupid automatic windows updates. Something FUBAR'd this whole thing up!


Grr...I invested so much time into working with the WMP control. I've got the program doing exactly what I want except for playing Mono Files!!!


A bit of a gripe:
It really stinks that media player is acting like this. I need it to play every type of file without problems. This is a horrible glitch from Windows Media Player! Mono files are very common in this world and to not play them consistently is a catastrophic failure!
#7
QM Play function uses old version of WMP control. It also can be added to your dialog instead of the new version. Look in function MP_Dialog. It is somewhere in System folder.

Change typelib to
typelib MediaPlayer {22D6F304-B0F6-11D0-94AB-0080C74C7E95} 1.0

Change control in dialog definition to
99 ActiveX 0x54000000 0x4 0 0 140 28 "MediaPlayer.MediaPlayer {22D6F312-B0F6-11D0-94AB-0080C74C7E95}"

And so on. All control functions are different.
#8
I've tested on several other computers without the same problem. Just some weird glitch on my current machine with mono mp3's and WMP11.

I really appreciate this example. It is really very good.

I've been trying to implement this just like the "Play" command without any luck:
Code:
Copy      Help
str s=
;$my music$\file1.mp3
;$my music$\file2.mp3
;$my music$\file3.mp3

ARRAY(str) PlayList=s
PlayARRAY 1 PlayList
PlayARRAY(action [ARRAY(str)] [show])
action: 0 none, 1 play, 2 stop, 3 pause, 4 loop, 5 play while macro runs; show: 0 none, 1 show, 2 hide, -1 close player.

Thanks again.


Forum Jump:


Users browsing this thread: 1 Guest(s)