So Close!

Apr 23, 2009 at 9:40 PM
hi, thanks for helping, my game is almost ready for silverlight on the web! im having problems with some soundeffects though. i get some exceptions and the sound effect gets cut off. here is exception message.

Line: 53
Error: Unhandled Error in Silverlight 2 Application SilverlightApplication1.xap
Code: 3001    
Category: MediaError       
Message: AG_E_INVALID_FILE_FORMAT     

all of my sound files are wma format. I have a background sound playing, is there problems when multiple sounds try to be played at one time?

also, i dont know how to make it so when a user clicks on the game screen, i can set some logic in my game to happen. i need to do this to get focus can you explain that please?
Coordinator
Apr 24, 2009 at 1:14 AM
Funny you should mention it, I fixed something with sound today and checked it in so please get the latest code from thesource tree and let me know how it goes.
Apr 24, 2009 at 3:27 PM
i used silverarcade.silversprite.dll from release directory 22685

i get this error when trying to play a sound right after another one,

element is already the child of another element
Coordinator
Apr 24, 2009 at 4:42 PM
Yes I meant the version in the Source Code tab, I think it will fix this issue for you. I'll have a new release of this soon.
Apr 24, 2009 at 9:32 PM
i thought i downloaded the one from source code tab?
Coordinator
Apr 25, 2009 at 1:33 AM
How long ago? It was updated ysterday.
Coordinator
Apr 25, 2009 at 1:51 AM
Oh I understand now... I checked in the source code but not a new version of the binaries. They should all be updated now, please try again with the latest.
Apr 26, 2009 at 7:31 AM
Edited Apr 26, 2009 at 7:59 AM
awesome works now,
edit: spoke too soon :( sometimes it works, but most of the time i still get the error.
Coordinator
Apr 26, 2009 at 2:24 PM
Yes it looks like if the sounds oerlap too much it still has a problem, I'm looking into it today. I have a game with the same issue and can easily reproduce it so it shouldn't take too long.
Coordinator
Apr 26, 2009 at 2:47 PM
Please try the latest I just checked in and see if it fixes your issue.

Thanks,
Bill
Apr 26, 2009 at 6:27 PM
Edited Apr 26, 2009 at 7:49 PM
yeah that works thanks, is there a way to loop sounds?

here is my game on the web
http://silverlight.services.live.com/invoke/98037/Ye%20Olde%20Dice%20Game/iframe.html
Coordinator
Apr 27, 2009 at 2:55 AM
Glad it works for you now The Song class can loop a sound, but there are some issues looping sound in Silverlight 2. Unless you jump through a lot of hoops there will be a gap of a couple of seconds before the loop starts over.