Playing sounds from markup

How would one go about playing sounds in markup

Specifically, I want to trigger audio from a focused state without passing an event to script. I understand that I can create a wav object, but how is the object sent to Player.audio.effect in markup

Thanks!



Answer this question

Playing sounds from markup

  • Strange_Will

    Do you mean that if you have very fast animations (eg, move 1000px over 2 frames) it looks bad Well.... not much you can do there I am afraid. There's only 24 (or 50/60) frames per second to draw in. Make your duration longer or your distance shorter, or you *could* create a version of you graphic that was deliberatly "blurred" and use that so it looks like a smoother animation.

  • Mike3983

    what i have to write on the playlist And in the manifest i put it like if it was an image

    Sorry if the answer is too obvious...



  • andris11

    Audio is played by setting the style:display attribute to "auto". When it is "none", the sound will not play.

    So you have something like:

    <object id="MenuSound" type="audio/x-wav" src="file:///dvddisc/ADV_OBJ/ding.wav" style:display="none"/>

    And then:

    <cue select="id('MenuSound')" begin="id('foo')[state:focused()]" dur ="2s" >
    <
    set style:display="auto"
    />
    </
    cue>



  • ToddGibbs

    thanks!
  • BobInVermont

    Yes, you just reference it in the playlist and the manifest the same way you would reference an image. And if you put everything inside an ACA, you only need to reference the ACA :-)

  • MorGas

    Is the player unabled to play sound effects if the disc isn't AACS protected I'm accessing the .wav file from the script it works good in the emulators but not on the real player. Using 1536kbps 16bit 2ch 48khz PCM wav's and no luck also not with a the mono version.
  • Alan Browne

    hehe i got it, btw... if you "move the buttons" too fast the behavior isn't good... any idea to solve this

  • Andreas Asterlund

    Cool Peter. Did not realize you could do it that way.


  • jordabi

    Please start another thread and post your code that isn't working...

  • Loopsludge

    Sweet. I did not know this was possible without the use of script...

  • JeffSkla

    This will simplify things quite a bit, thanks.
  • crbeckman

    You can find answer in the thread: "Correct Time Code" at the end by Jeff Williams.

    It looks like a bug in HDi simulator as it can play an effect sound without this setting.


  • Artie Sluka

    no i mean that if the sound duration is 1 second but you move from one button to another too fast no sound is played... you understand

  • Playing sounds from markup