M Rice

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!



Re: HD DVD Interactivity Authoring Playing sounds from markup

Peter Torr - MSFT

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>






Re: HD DVD Interactivity Authoring Playing sounds from markup

Gunnar Adler

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




Re: HD DVD Interactivity Authoring Playing sounds from markup

M Rice

This will simplify things quite a bit, thanks.



Re: HD DVD Interactivity Authoring Playing sounds from markup

Will Merydith

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





Re: HD DVD Interactivity Authoring Playing sounds from markup

LevelX

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.



Re: HD DVD Interactivity Authoring Playing sounds from markup

mico88

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.





Re: HD DVD Interactivity Authoring Playing sounds from markup

LevelX

thanks!



Re: HD DVD Interactivity Authoring Playing sounds from markup

Xavier Arnau

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






Re: HD DVD Interactivity Authoring Playing sounds from markup

Peter Torr - MSFT

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




Re: HD DVD Interactivity Authoring Playing sounds from markup

Xavier Arnau

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




Re: HD DVD Interactivity Authoring Playing sounds from markup

Peter Torr - MSFT

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.




Re: HD DVD Interactivity Authoring Playing sounds from markup

Xavier Arnau

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




Re: HD DVD Interactivity Authoring Playing sounds from markup

Peter Torr - MSFT

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