I can never remember how to square a matrix in Excel. It’s not a thing you can find in a menu, you just have to know. But really, F2 ctrl-shift-enter? Really?
I can never remember how to square a matrix in Excel. It’s not a thing you can find in a menu, you just have to know. But really, F2 ctrl-shift-enter? Really?
We are packing up, so I’m done for now. Progress has been pretty good. The core parts of the posting module are done, though they are not yet managed by a “topic manager” or some similar. I have YUI talking via PHP to MySQL, sending objects that contain data that will be needed in a structured way. That turned out to be much harder than I thought, simply because I couldn’t make the debugger in IntelleJ work in the PHP server file in such a way that I could watch an HTTP request come in. In olden days, I would have RTFM about the process and worked from that, but now with OpenSource, I’ve become very dependent on the debugger to tell me what’s actually going on. Many times things don’t correspond with (often stale) documentation. So in the end, I put together a light PHP class that pretty much echoed POST calls back at me so that I could look at them in the JavaScript debugger. That burned a day. Sigh.
The last (new) thing to do is to make the database access robust. I did my code based on Learning PHP, MySQL, and JavaScript, a generally fine book, but it still uses the deprecated “mysql_*” calls. I need to update that and have some generalized data return structures built. Then that part should be reasonably static from here on out.

#ifdef DXAUDIOINTERFACEDLL_EXPORTS #define DXAUDIOINTERFACEDLL_API __declspec(dllexport) #else #define DXAUDIOINTERFACEDLL_API __declspec(dllimport) #endif DXAUDIOINTERFACEDLL_APIÂ BasicAudio*Â getBasicAudio(void);
Good progress today

Looks like everything is working in the proof of concept! Here’s the code:
#include "stdafx.h"
#include <Windows.h>
#include <conio.h>
#include "audio.h"
int _tmain(int argc, _TCHAR* argv[])
{
int keyIn;
HRESULT hr; // standard return type
LPTSTR buf;
LPTSTR targetDir = "C:\\Programming 2D Games in DirectX 11\\Chapter 7 - Sound\\ConsoleSound\\ConsoleSound\\ConsoleSound";
Audio *audio = new Audio();
SetCurrentDirectory(targetDir);
buf = (LPTSTR)calloc(256, sizeof(char));
GetCurrentDirectory(256, buf);
printf("Current dir: '%s'\n", buf);
if (*WAVE_BANK != '' && *SOUND_BANK != '') // if sound files defined
{
if( FAILED( hr = audio->initialize() ) )
{
if( hr == HRESULT_FROM_WIN32( ERROR_FILE_NOT_FOUND ) ){
printf("Failed to initialize sound system because media file not found.\n");
printf("hit return to exit\n");
getchar();
return -1;
}
else{
printf("Failed to initialize sound system.\n");
printf("hit return to exit\n");
getchar();
return -1;
}
}
}
printf("Type 'x' to quit, 1, 2, or 3 for sounds.\n");
bool doit = true;
while(doit){
if(kbhit()){
keyIn = getch();
printf("key = %c\n", keyIn);
switch(keyIn){
case 'x' : doit = false;
break;
case '1' : audio->playCue(BEEP1); // play sound
break;
case '2' : audio->playCue(BEEP2); // play sound
break;
case '3' : audio->playCue(BEEP3); // play sound
break;
}
}
audio->run(); // perform periodic sound engine tasks
Sleep(100);
}
SAFE_DELETE(audio);
printf("hit return to exit");
getchar();
return 0;
}
Tomorrow, we’ll try to add positional sound.
Apparently when you’re using OpenAL.
There is a multichannel test binary that you can run. (C:\Program Files (x86)\OpenAL 1.1 SDK\samples\bin\win64\PlayMultiChannelWin64.exe). It should run
front left, center, front right, rear right, rear left, and subwoofer.
Instead, it’s running
front left, front right, and center.
I’ve verified that all eight speakers are working in the test app that comes with the drivers. I’ve also verified that the sound is correctly sent using the Control Panel Sound->configure tool. So I’m not sure if it’s OpenAl or something else. Ah well. That’s for tomorrow.
Not a good week for development.
The headgear is done, the divers are in, and I was ready to start doing a serious dive into the Java3D sound capabilities (as per Section 2 of the plan “Develop codebase for testing haptic rendering”). Then my father got sick and landed in the hospital for a week. Which kinda shot productivity to hell.
Anyway, I’m picking up the pieces. The (official) java3d.java.net site was down for most of yesterday, so I’ve only just connected to it again. So far I’ve downloaded and installed the AMD64 version of the jar files, hooked up my Eclipse IDE to the J3d-examples subversion repository (https://svn.java.net/svn/j3d-examples~svn).
The downloaded code compiles and runs as an ant file, but the structure doesn’t accommodate Eclipse’s code navigation for some reason. To fix this, I created a new Java project and copied the entire “resources” tree over and the tree that starts under “classes” in the original file. Here’s a screenshot:
This still didn’t compile though. I got an “Access restriction on class due to restriction on required library“, which I’ve never seen before. Poking around led me to StackOverflow, where there was this suggestion:
“go to java build path and under Library tab, remove JRE System Library. Then again Add Library –> JRE System Library”
Well, that makes no sense. It is just deleting and re-adding the system library. On the other hand, that’s exactly the kind of senseless thing that fixes weird errors, so I gave it a shot. Worked like a charm.
Anyway, now I’m having problems locating files that are right where the code says they are, but the loader’s can’t find them. Regardless, it’s time to go take care of Dad.