(My apologies if this has been posted twice. Didn't look like the 
first email ever got through...)

I'm stuck with a problem I can't seem to solve and I'm getting the 
picture that there isn't much I can do about it, so I'm posing my 
question to the group in hopes of a solution.

Here's the background. Enhanced Audio CD project for a big client. 
Red book audio session followed by hybrid mac/windows cd-rom session 
(blue book, essentially.) I am using Penworks CD Pro xtra (of course) 
in my director files to play audio tracks from the red book session.

I am having a devil of a time getting proper drive selection and 
playback (even more so) on the Mac.

Using a suggestion in the CD Pro Xtra documentation, (see code below) 
I have the movie fetch and count a list of all available cd-drives 
(if there is more than one drive in the system). It then checks each 
one for the disc's name. When it finds the name it sets the CD drive 
to that device number. (Well, usually. There's the rub)

-- This routine selects and sets up a CD-drive for audio playback

on enterFrame me
   global cd
   set cd=New(xtra "cdPro")
   SeekOnFailedLanding(cd, TRUE)
   cdDrives = getCDDrive(cd)
   if listP(cdDrives) = 1 then
     devcnt = getCDDrive(cd, #disc).count
     devname = getCDDrive(cd, #disc)
     repeat with devs = 1 to devcnt
       if devname[devs] contains "Alive" then selectDrive(cd, devs)
     end repeat
   end if
   if listP(cdDrives) = 0 then selectDrive(cd,1)
end

Anybody see any glaring mistakes? This seems to work in almost every 
situation on the windows side of the hybrid cd-rom, but I am having 
very mixed results on the mac side. It seems to select the right 
drive most of the time, but half the time barfs on playback giving a 
Script error (runtime only, doesn't usually barf during debug. 
Figures!)

Here's the goofy part. If I go out to the desktop and "select" the CD 
drive manually from the cd-audio control strip, or run iTunes, Apple 
CD Audio player, or any app that plays audio and generate some cd 
playback, it seems to "activate" the cd audio functions so that the 
next time I run the director movie, it finds and PLAYS audio from the 
proper drive.

So what's going on here? What has to be triggered in the OS to make 
the cd playback suddenly work right and not give an error? Can I 
trigger this from inside Director? Do I write some sort of error 
handler if I can't make it play consistently?

Now, the CD pro xtra documentation does mention something about a mac 
related issue: "The Macintosh drivers don't always report properly 
with Enhanced CDs. It is recommended that you use the 
SeekOnFailedLanding() feature for compatibility with Enhanced CDs. It 
is off by default, but you should turn it on after initializing. It 
only takes effect when needed, anyway. The command is ignored under 
Windows (returns #Unsupported)."

Well, I call SeekOnFailedLanding as soon as the first instance of the 
CD xtra has been created. It doesn't seem to help much. :p 

I've also made sure nothing is trying to load from the data session 
while the cd is playing audio.

Perhaps I can use the status and error functions of the cd pro xtra 
to handle the glitches? But I still don't know if it's even possible 
to get dependable cd-audio control on the mac side. I noticed this 
sort of trouble on commercial enhanced cds like Sheryl Crow's Globe 
sessions and Fiona Apple's Tidal. The audio playback just isn't quite 
right if it plays at all.

All right, I've gone on long enough and you get the picture by now. 
Surely somebody else has tried this before me. How'd you figger it 
out?

        Thanks!

        -Jeff Hirsch
         St. Louis, MO

[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to