Logo Subtitle Subtitle

ExtensionMethod.net MVC3 update

Fons Sonnemans and I are working on an a major extensionmethod.net update. Our goal is to use MVC3, jQuery and a lot of Nuget goodies. Here are some screenshots of work in progress:

jQuery search box

the great syntax highlighter that I know and love from my blog.

We hope to upload the new version soon. In the mean time you can get all your great extension methods at the old site.

Windows Phone SoundEffect clipping

Today I’ve noticed some strange behavior on my Windows Phone. I was working on a game which uses the SoundEffect to play wave files.

_match = SoundEffect.FromStream(TitleContainer.OpenStream("Audio/m-match.wav"));
FrameworkDispatcher.Update();
_match.Play(.5f, 1f, 1f);

The _match SoundEffect was the only sound that was played at a lower volume level than 100% and was the only sound that did not play at all. When I changed the code to

_match.Play();

it worked again. So I opened the wave in my wave editor, adjusted the volume there and saved it. This time some clipping occurred.
It seemed like a part of the sound was missing. In the emulator everything worked OK. I tried different wave formats (mono/stereo/16bit/8bit) but the clipping occured every time on the device.

Solution

I just found out what the problem was. The volume of my phone was at a low level — not off — and it seems that the Phone has some sort of gate mechanism that cuts of sounds if they are not above a certain level. Turning the volume up did the trick. Like Rakim said: Pump up the volume!

Windows Phone Mahjong Solitaire V2.0

Windows Phone Mahjong Solitaire has been updated to version 2.0. Play five brand new board layouts and enjoy a lot of enhancements. Watch it here running in the emulator:

Download it from the Windows Marketplace on your phone. 

New board layouts

Silverlight Templated Image Button with two images

Download Demo Project

In my previous article I showed a video in which I created a Windows Phone ImageButton just using styling & templating. In this tutorial I’ll show how to create a Templated ImageButton Control that holds one Image for the normal state and another for the hover state.

The trick here is to choose the proper property type (ImageSource) so Blend let’s you choose images like this:

And the result can look like this:

normal                                                                                                 hovered

How to create this ImageButton?

The next video shows how to create the templated ImageButton control in Silverlight. I’ve used the DependencyProperty snippet from our Silverlight Training.

Submission fee for free wp7 apps in the Marketplace

When you submit a paid Windows Phone 7 app or game to the Marketplace, no submission fee is charged. For free apps and games, there is a limit of five free submissions each year (starting at the account create date). But what about a failed submission? I’ve asked Matthijs Hoekstra and this is what we came up with:

Submission failed 1 credit or $19,99
Submission succeeded 1 credit or $19,99
Update failed 0 credits/free
Update succeeded 0 credits/free

To save credits, Matthijs has a temporary workaround. (Dutch alert!)