9 Replies Latest reply on May 14, 2008 7:38 AM by Production Monkey

    MIAWs and audio

    millino
      hi everybody

      i've got a little problem with a movie i'm working on
      it's an old dir that i'm updating and upgrading but i didn't create it so i'm just trying to use the scripts that the previous programmers wrote.. (and it's hard!)

      i have the main movie that launches some sounds
      there could be more than one active sound channel at a time
      the sounds are cast members (a cast for the music - a cast of the speakers - a cast for the interface sounds)
      usually there is a background music looping and serials spekers depending on the user choices
      sound volume is managed by an external movie which is opened as a MIAW
      the volume movie actually runs correctly (the volume is correctly set)

      the problem is that when the main movies launches the volume movie as MIAW
      the current playing sounds stop (both the background music and the speaker)
      so when the volume MIAW is closed
      the looping music does not start anymore..

      what i would like to know is WHY the audio stops
      it just seems that the volume movie takes the audio channels for its use and forgets about the previously playing sounds..
      is it correct?
      is it normal that a MIAW stops the audio from the movie which launched it?
      maybe there is an error in the scripts that launches the sounds?
      are there some particular settings in the MIAW launching that i must set in order to let the audio play continously?

      i have found a lot discussions about the sounds stopping during the exit from a MIAW
      but i can't find anything on that topic..

      thanks in advance for your answers and suggestions
        • 1. Re: MIAWs and audio
          Wolfgang Herold Level 2
          it's a bug in Director , sound stops when closing a miaw.

          You could check the state of the soundchannel if sound is playing,
          and the restart the sound

          eg:
          if sound(1).status <> 3 then sound(1).play("member(your_sound"))

          Wolfgang
          • 2. Re: MIAWs and audio
            Level 7
            > it's a bug in Director , sound stops when closing a miaw.

            I thought the OP was stating the sound stopped when the window was
            *opened*, not forgotten.
            • 3. Re: MIAWs and audio
              Level 7
              Post the code that deals with opening your volume window
              • 4. MIAWs and audio
                millino Level 1
                > it's a bug in Director , sound stops when closing a miaw.

                > I thought the OP was stating the sound stopped when the window was
                *opened*, not forgotten.

                in fact audio stops when OPENING the MIAW


                > You could check the state of the soundchannel if sound is playing,
                and the restart the sound

                i've got some problems with that because audio channels are activated automatically by script and i don't know how to find active channels in order to check their status..
                more over i don't even know which sound is playing because it is previously launched always by script..
                so in the example code line you posted
                if sound(1).status <> 3 then sound(1).play("member(your_sound"))
                i don't know wich channel to check and which sound to play
                if sound( ?).status <> 3 then sound( ?).play( ?)

                here is the code that launches the volume window

                • 5. Re: MIAWs and audio
                  millino Level 1
                  ok i'm facing it
                  that's what i'm doing

                  pause all sound channels
                  open the MIAW
                  resume all sound channels

                  it almost works correctly
                  the problem is now that the sound is not actually RESUMED but it is PLAYED again from the start

                  i tried saving the currenttime in the pause method and using it in the resume method as the starttime
                  but it seems not to work..

                  here's my code
                  • 6. Re: MIAWs and audio
                    millino Level 1
                    any other suggestions on how to avoid the problem of sound stopping??
                    • 7. Re: MIAWs and audio
                      Level 7
                      Any better luck if you use sound.queue() in place of sound.play() in your
                      sndResume handler?

                      Replace:

                      sound(channel).play([#member:member(...)

                      with:

                      sound(channel).queue([#member:member(...)

                      followed by:

                      sound(channel).play()

                      with no parameters.

                      Just curious, since I think the queue() method has been around longer
                      and that they added the queue features to the play()(Sound Channel) in later
                      a later version.



                      --
                      Mark A. Boyd
                      Keep-On-Learnin' :)
                      • 8. Re: MIAWs and audio
                        Production Monkey Level 3
                        millino ,

                        You do understand that Director does Not stop any sounds from playing when you open a miaw.

                        There is some code in your program that is stopping the sound channels or setting the volume to zero, or something. You will just have to fine the problematic code and fix it.
                        • 9. Re: MIAWs and audio
                          Production Monkey Level 3
                          Correction:

                          Director does not stop any sounds playing in channels 1 and 2 when you open a miaw.

                          Place your background music in channel 1 or 2 and you will probably will be fine.