Sample – WASAPI loopback capture (record what you hear)

In a previous post I showed how to play silence to a given audio device and hinted at a possible application. Attached to this post is a sample WASAPI loopback capture app – amd64, x86 and source included.  This allows you to record the sound that is coming out of your speakers: >loopback-capture -?loopback-capture -?loopback-capture…


Sample – playing silence via WASAPI event-driven (pull) mode

Be vewy vewy quiet – we’we hunting wabbits.    — Elmer Fudd Attached is a mini-app I’ve written to play silence to any given playback device using WASAPI event-driven (pull) mode.  Source, x86 binary, and amd64 binary are attached. Usage statement: >silence -?silencesilence -?silence –list-devicessilence –device “Device long name”     With no arguments, plays silence to…


Good Perl, Bad Perl

One of my favorite languages is Perl.  Perl has an ambivalent reputation; some people take to it, some accuse it of being a syntax-complete language.  (There’s some truth to this.) My view is that Perl gives you a very direct link into the mind of the programmer – much more so than other languages.  Perl…


xargs start

Like many programmers, I’ve messed around in a lot of development environments – including the UNIX/Linux family of operating systems. One of the UNIX commands I like is xargs… this is very handy when writing one-off command lines or scripts. I like it so much that I miss it terribly when I’m in a Windows…


xkcd finds East and West confusing – what about North and South?

Stealing from XKCD again: I have a similar problem with North and South.  On the globe, there’s a clearly marked “North Pole” and a clearly marked “South Pole.” Fine. Magnets also have North and South poles.  These are typically labeled N and S respectively.  Fine. But if you consider the Earth as a large magnet…


The case of the default audio device from the future

Hover the mouse over each picture (xkcd-style) in turn to get the text that tells the story. An amusing behavior of Windows Vista recently came to my attention… sometimes the Sound control panel wants to go back… to the future! So far, so good. D’oh! Luckily, there’s a way to recover… Voil√† tout.


How long can the logoff sound be?

Windows has a customizable soundtrack – when different things happen, sounds play.  You can live with the default sounds, turn all the sounds off, or substitute your own sounds.  All configurable via the Sound control panel:   You can assign short or long, pleasant or annoying sounds to any event in the list.  For example,…


Rotating a matrix redux

Vincent Tan picked up on Raymond Chen’s “rotate a matrix” interview post. As Vincent Tan points out, there is no way to create an n x n matrix R such that RA is a rotated version of A – for example, in the 2 x 2 case: There is no 2 x 2 matrix R…


The largest prime ever – you saw it here first

The GIMPS project says they’ve found the largest prime number ever, but they’re keeping quiet about what it is until they’ve verified it (they expect to be done in a couple of weeks.) Pshaw.  I can tell you right now what their prime number is. Since I’m a computer scientist I’ll write it down in…


Solution: x! + y! + z! = x * y * z

Last time I discussed the fact that there is a single, unique, solution to the formula x ! + y ! + z ! = x * y * z, where x, y, and z are non-negative integers.  I asked for a computer program to find the solution given that x, y, and z are…