Lester Jacobs
Guest
|
Posted:
Thu Sep 23, 2004 6:58 pm Post subject:
Getting CD Track Info via the WMP Cdrom Object |
|
|
Hi,
I'm using the wmp9 activex control in my custom application. One of the
things I need to do with my custom application is to resolve CD title and
track information for any CDs present the CD-ROM drive(s). Currently, when
I use the Cdrom object to retrieve the playlist from a drive I usually track
titles whose names are in the format Track # (e.g. Track 1, Track 2, Track
3, etc). However if I then retrieve the playlist again after a few seconds
then I get the real track titles. Obviously the wmp control takes a few
seconds to contact AMG and retrieve the info.
Question is: How can I ensure that I alwasy wait a sufficient time before
retreiving the playlist so that I can ensure that I always get the resolved
track information? I could hardcode somethign like 5 seconds but I'm
thinking it would be better to be able to "block" until the track info is
retrieved.
Does anyone have a solution for this? (I'm using VB6, by the way)
P.S. I know I could resort to coding my own fetch from CDDB, freedb or
other sources but since Windows Media Player gets the info from AMG already
then it seems sensible to use that data.
--
-----------------------------------------
Lester Jacobs
E-Mail: lester.jacobs@disus.com
Phone: +1 (416) 368 7677 x225
Mobile: +1 (416) 725 9281
Web: http://www.disus.com
|
|