Tuesday, January 6th, 2009
A DirectSound Buffer is a one-dimensional array of bytes which represent sound waves in a digital form. The data is laid out in a specified Microsoft.DirectX.DirectSound.WaveFormat which specifies the format type, number of channels, number of samples per second and so on.1
Each byte is a part of a sample, and a sample represents the average [...]
Thursday, August 30th, 2007
After struggling with WinAPI code and hacks in .NET 1.0 I was really looking forward to the TextRenderer class when I first heard about it. But as it turns out, not only is TextRenderer horrible at measuring character size it is also monumentally slow at rendering text.
One of many flaws with the RichTextBox control is its lack of support for drag/drop operations. Luckily it’s simple to add. In fact, it’s so simple you’ll wonder why they didn’t just support it out of the box.
Also filed in C#, Programming
|
Tagged .NET, C#, drag_drop, drop_operations, filenames, intellisense, net_framework, Practical, Programming, RichTextBox, richtextbox_control
|
Permalink
|
Recently while reworking the code for the Ascgen dotNET I needed to make sure that a variable is between 0 and 255 before converting it to a byte, and I needed it to be as fast as possible since it can get called several million times a second.
Also filed in C#, Programming
|
Tagged .NET, between, bitwise_operations, byte, C#, dotnet, limit, math, max, min, number, pixel, Programming, Theory
|
Permalink
|