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

  • B.Huard

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

    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.


  • JeevesIndia

    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.

  • selvan_06

    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...



  • WinstonPennypacker

    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 :-)

  • DaveZJ

    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

  • Khass

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

  • Jake.K

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


  • Abualnassr

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

  • kaynos

    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.
  • ManuelT

    thanks!
  • Clemens Vasters - MSFT

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

  • donnie100

    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>



  • Playing sounds from markup