Hello Scott

I have just been debugging some CD projects that are showing what I think
is the same problem. 

The problem exhibits itself when you are using the directsound extra for
sound mixing and the volume of a playing sound is set to 0. This also
happens when you use sound fadein or fadeout. Since these fades where used
a lot in these projects the only option was to offer the user an option to
install quicktime and then use qt3mix or macromix as the sounddevice.

The problem strangely does not apear when you test a projector while
director is still open. This leads me to think that it also has something
to do with wich version of msvcrt.dll is being used. 
The default behavior of win98 is to always use the msvcrt.dll that lives in
the system folder. If this dll is a newer version then the one that came
with dir7 then you get those crashes.

Maybe, since you are installing your project you can set something in the
registry so the projector will use the right version of msvcrt.

The terrible situation is that many CDroms made with Director 7 will now
crash while they used to play ok. This will give Director a bad name, while
it apears to me that Microsoft should do some bugfixing.

Another bug that is also appearing in these old projects is Macromedia's. 
When you made fast start projectors using the use shockwave player option
and then included all the needed dll s next to the projector it should work
according to Macromedia technotes. However when only shockwave 8 is installed
on some machine you are told that you need a newer version of the shockwave
player.

If you still use Director 7 for new projects you  will have to use custom
sound fades and use a self contained projector.

I have adapted Bruce Epstein's Sound Fade Behavior to avoid these direct
sound crashes. You can get the behavior at:
 
http://www.zeusprod.com/nutshell/fade.html

these are the handlers I have changed:

on exitFrame me  
  -- Fade the sound up or down between the starting and ending volumes.  
  -- There are several possible modes for waiting:  
  -- If pTight is TRUE, we'll create a tight repeat loop and fade the sound  
  -- If pTight is FALSE, we'll adjust the volume once per exitFrame event  
  -- If pWait is TRUE, we'll also wait in the frame until the sound fade
completes  
  -- If pTight and pWait are both FALSE, the sound will fade for the number
of  
  -- frames over which the script is tweened. When leaving the sprite span  
  -- the ending volume will may be set abruptly in that case.  
  if pTight then    
    -- pTight is TRUE, so we'll create a tight repeat loop and fade the
sound    
    repeat while not done(me)      
      set elapsed = the ticks - pStartTime  
      newvolume =  pStart + elapsed * pChangePerTick
      if newVolume > 0 then
        set the volume of sound pSoundChannel = newVolume 
      else
        set the volume of sound pSoundChannel = 1
      end if
    end repeat    
  else    
    -- pTight is FALSE, so we'll adjust the volume once per exitFrame event
   
    set elapsed = the ticks - pStartTime    
    newvolume =  pStart + elapsed * pChangePerTick
      if newVolume > 0 then
        set the volume of sound pSoundChannel = newVolume 
      else
        set the volume of sound pSoundChannel = 1
      end if
    -- If desired, wait in the frame until the final volume is achieved    
    if pWait and not done (me) then      
      go the frame      
    end if    
  end if  
end exitFrame

on getPropertyDescriptionList me  
  set param1 =  [#default: 1, #format:#integer, #range:[1,2,3,4,5,6,7,8],
#comment: "Sound Channel"]  
  set param2 =  [#default: TRUE, #format:#boolean, #comment: "Start from
Current Volume"]  
  set param3 =  [#default: 0, #format:#integer, #range:[#min:1, #max:255],
#comment: "Start Volume"]  
  set param4 =  [#default: 255, #format:#integer, #range:[#min:1,
#max:255], #comment: "End Volume"]  
  set param5 =  [#default: 180, #format:#integer, #range:[#min:0,
#max:600],#comment: "Duration in ticks"]  
  set param6 =  [#default: FALSE, #format:#boolean, #comment: "Tight Repeat
loop"]  
  set param7 =  [#default: TRUE, #format:#boolean, #comment: "Wait in
frame"]  
  return [#pSoundChannel:param1, #pBegin:param2, #pstart:param3,
#pEnd:param4, #pDuration:param5, #pTight:param6, #pWait:param7]    
end getPropertyDescriptionList

Actually I am amazed that it has been so silent untill now about this
crashing bug that Microsoft introduced into our system. I hope Macromedia
will lobby to get this terrible showstopping msvcrt/directsound thing
fixed. Otherwise there will be a lot of CDroms that have been produced in
the last two years ready to be destroyed because they are now unuseable.

Succes with debugging all your old projects,
Alfred Rademakers


[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