Archive for the 'Programming' Category



What are threads?
A thread executes code synchronously—a set of instructions processed by the CPU “first in first out”. This can include virtually any kind of code, be it updating of the GUI, processing calculations, or waiting for user input.
Windows Forms is arguably one of the most used aspects of .NET Framework. GUI programs typically rely […]

Previous readers of my blog might already know that I am a big fan of ImageX, a tool that has been supplied by Microsoft in the Windows Automated Installation Kit since the release of Windows Vista.
A quick introduction
ImageX is a command-line tool that enables original equipment manufacturers (OEMs) and corporations to capture, to modify, and […]

FlacReader + WavWriter
As a follow-up to my previous article on FLAC and encoding uncompressed audio, I have further developed the Wav2Flac library and added FLAC decoding to the WAVE container. Some key points of this aspect of the WavFlacTest library are:

Support for 16- and 24-bit audio streams
Support for virtually all FLAC channel mappings: mono, […]

Inline Tweet Translator

One thing that popped in my mind yesterday after having a conversation over twitter (admittedly, a service I had rarely used until recently), is that the more followers you have, the higher the odds you would have to use other languages in addition to a lingua franca. This ‘leaves out’ other friends who could have […]

Resizing a form while keeping aspect ratio is useful in many cases, like video playback or vector graphics. This way, the window can be resized while retaining the original ratio and avoiding the use of letterboxing or pillarboxing.
What’s needed is for the window function to be overriden (WndProc) and pre-process the target window rectangle used […]

Why lossless?
Lossless audio is used on various media, including studio masters, CD, DVD-Audio (via MLP) and Blu-ray (via Dolby TrueHD, which is technically a rebrand of and an extension to MLP, and DTS-HD Master Audio). All of these, when decoded, will result in a pulse-code modulated signal identical to the source, unlike the popular MP3 […]

Command-line interface tools. We usually prefer to write these when we need a lightweight application to get work done.
Some operations can be lengthy, or we simply want to present the a visual indicator of progress to the user. For this purpose I usually update Console.Title for simplicity’s sake.
However, if the tool is intended for a […]

2010

I’d like to wish everyone a very happy and successful new year!
This month I will be posting useful code snippets and a series on high-definition audio.
I would like to focus on the now-popular Blu-ray disc format and decoding DTS-HD Master Audio streams to PCM and compressing with the open-source FLAC codec in C#. The next […]

Just a couple of days ago Microsoft MVP lead Alessandro Teglia announced the newly awarded and renewed Most Valuable Professionals for 2009 — I would like to congratulate all of them on their achievements. Rock on!
I am also very happy and proud to be given the award for Visual C# this year. It is my programming language of […]

With Windows Vista, Microsoft introduced a whole new window manager which provides a better experience to the user and an independent graphics surface to us developers by taking advantage of graphics acceleration hardware (your graphics card or integrated GPU).
In a three-part blog post, I will show you how to use a wrapper around the Desktop […]