Browsed by
Category: Programming

Quick Audio Taskbar Sound Switcher

Quick Audio Taskbar Sound Switcher

When using my computer I often use my speakers when listening to music, watching movies, or coding something up. As a first-person shooter fan, I usually want to use headphones so I can use the mic to coordinate play with the other live players and not completely bother the rest of the people in the house with gunfire, explosions, and ‘colorful language’.

Switching between audio output devices on Windows systems usually requires no less than:

  1. Right-click on speaker tray icon
  2. Left click on playback devices
  3. Right click on device you want to be the default output device in Sound selector
  4. Left click on ‘Set as Default Device’

Fun! Not. Even worse is that many times I click on the game I want to play only to realize I forgot to switch audio devices.  In many games, alt-tabbing out and switching the default audio device doesn’t actually change the in-game playback device.  You have to exit the game and restart.  Annoying.

What I want is a taskbar icon I can simply double-click to switch between headphones and speakers – or any of my many audio devices really.  So to that end, I wrote up an app that does exactly that.  You simply select which devices you want to toggle between (any number) and double-clicking the tray icon simply toggles you to the very next device.

Or, you can right-click on the icon and select the device directly with a single click.

Give it a try.

Click here to download a copy.

The MSI installer is in the source directory.  Even better is that I’ve put the code up on Google Code and it’s open-source under the BSD license.

Drop a line if you found it handy or have suggestions!

 

 

 

Taking celebrities to lunch

Taking celebrities to lunch

So, you go to the Portland Retro Gaming panel of 80’s Atari programmers. Each one of which made the most popular games of the age, ones you and all your friends played. After the talk, you’re chatting with them and everyone discovers it’s well past lunch. You say, “Hey guys, you wanna go across the street and grab a bite to eat? My treat.”

And that’s how you end up taking all your childhood programming heroes out to lunch.

From L to R:
David Crane – Founder of Activision, Activision’s Pitfall
Tod Frye – Atari’s PacMan, Swordquest series
Rob Zdybel – Star Trek, Star Raiders, Atari Football
Bob Smith – Star Wars, Video Pinball, co-founder of Imagic
Gary Kitchen – Donkey Kong, Keystone Kapers
Mr Kitchen’s son
Me

Installing WordPress using XAMPP

Installing WordPress using XAMPP

When customizing/working on a new WordPress layout – it’s better if you don’t do it on your live blog.  Instead, install XAMPP

http://www.wikihow.com/Install-Wordpress-on-XAMPP

You can then set up the database and install WordPress in the httpdocs/ directory – but that’s not a straightforward/easy process.

Instead of all the extra setup, you can also use Bitnami’s WordPress application that installs WordPress for you and takes care of a lot of the annoying database and other setup bits.  They have versions for Windows, OS X, and Linux to make your life easier.

After setup, instead of the WordPress files being in the normal httpdocs\ directory, Bitnami’s WordPress on top of XAMPP puts the WordPress files in X:\..\XAMPP\apps\wordpress

 

Steam OpenGL tracer/debugger VOGL

Steam OpenGL tracer/debugger VOGL

Steam Developer Days were a little while ago, but As a member of the Intel GPA team, I found their VOGL new tool announcement to be very interesting.  It’s a new graphics debugging/tracing tool – this time from Valve.

Here’s the link to Rich Geldreich’s Blog and gives all the details:
VOGL – OpenGL Tracer/Debugger

You can find the github distribution of the software here:
https://github.com/ValveSoftware/vogl

 

Use Windows Git with proxy server

Use Windows Git with proxy server

Shesh – you’d think they’d have this more easily found on the official GIT website.

  1. Open a bash or cmd GIT shell
  2. git config --global http.proxy http://my.proxy.server:1234

That should do it.

 

Violating your classes Objective-C with method swizzling

Violating your classes Objective-C with method swizzling

Went to a iOS programmers meetup recently here in Portland and they did a talk on the C-runtime.  I missed most of the talk due to other commitments, but the topic of method swizzling came up.

Basically, it allows you to change what class methods are called by a class – at runtime.  In other words, you can start willy-nilly re-pointing your member functions at runtime by:

  1. Create your 2 or more classes as normal (class A, class B)
  2. Create some methods off each class you want to swizzle (A.thisFunc, B.thatFunc)
  3. Swap’em – using the runtime functions:
    1. class_getInstanceMethod()
    2. class_addMethod()
    3. class_replaceMethod()
    4. method_exchangeImplementations()
  4. Profit!

 

While this is obviously very, very dangerous and likely not something you’d do in production, it does create some interesting opportunities for testing and exercising record/replay and persist/restore code.

Either way – interesting write-up.  Perhaps the title of the talk should have been called ‘Stupid Objective-C tricks’. 🙂

 

Adaptive Volumetric Shadow Maps

Adaptive Volumetric Shadow Maps

AVSM1

Many people ask me what sorts of things I work on.  Well, here’s one of them you can download and run on your own!  This is a graphics and code sample that co-developed to show off not only a novel new kind of volumetric effect, but also a new extension on some of Intel’s new CPU graphics hardware.

This technique is called adaptive volumetric shadow maps.  The base idea was developed by Marco Salvi who published a paper on it a little while back.  However, this version has been substantially improved by the use of a new feature of Intel processors called PixelSync which allows one to do the volumetric shadowing effect with a constant-sized buffer and no depth slicing.

The effect allows for self-shadowing on any kind of transmissive, volumetric media – such as smoke or hair simulations.

You can download the sample, run it your own, and read more about it here:
http://software.intel.com/en-us/blogs/2013/03/27/adaptive-volumetric-shadow-maps

Mr. Div and his amazing graphics

Mr. Div and his amazing graphics

As a 3D graphics software developer, what attracted me to the field was always the fact that you could create images and scenes of the mind.  There were no physical laws other than the ones you created when generating visuals.

Mr. Div is a designer that has captured much of what I have always hoped to do.  He communicates unique experiences and ‘feels’ via strange and unique graphics/animation.  I find myself drawn to the 70’s era style of his work that was present in the very first days of 3D graphics.  Even though it’s not the highest rez/most realistic graphics, and the tools he uses are simple off-the-shelf variety – it’s the output and imagination that’s amazing. It’s exactly this kind of stuff that makes me excited to be in this field.

http://mrdiv.tumblr.com/