Monthly Archives: July 2013

On the plus side, my house didn’t explode

Not much to report today, the gas people were running new lines to my house. It seems they do that once a century, if it needs it or not. With all the hardware at work, it makes developing at home pretty much a no go.

  • Did verify that the release builds work with the end-user DirectX install
  • Added text to emitter position on the graphics screen
  • changed the timer to to std::chrono::high_resolution_clock (check the bottom of this post for an example)
  • It looks like MSVC 2010 doesn’t have <chrono>. Made do with clock_t and clock() instead.
  • Added xml output for test setup. Why does ctime() return a string with a line feed!?

vector<tuple<float, float, string>>::iterator it = sourcePositions->begin();

C++ is like being in a candy store, full of a huge variety of bright, shiny treats that can blow your hand off if you don’t pay attention.

  • Finishing up adding multiple sound capability per test attempt. Because I’ve been away from C++ for a while and I like to try new things, I poked around with tuples for a while, which are kind of neat. Then I decided to put them into a vector and access them. That lead to code like this:
    • vector<FOURF_SAMPLE_TUPLE>::iterator it = myVector.begin();
      while(it != myVector.end()){
      	float sourceX = get<EMITTER_X>(*it);
      	float sourceY = get<EMITTER_Y>(*it);
      }
    • That is *not* the most intuitive code I’ve seen. I mean, it makes sense, and given the limited set of overloadable characters, ok. But I think “[” and “]” would have been a better choice than “<” and “>”.
  • Got the multi sound playing and the results output to .csv. Next is to get the xml setup files running.

Pulling everything apart and putting it back together

  • Adding multiple sound playback
    • Rework the output to handle multiple sounds. This means one TestResult per sound. However, the result cannon be associated with a sound, so for each release, all the emitter sources will have to be included. Later analysis can be used to determine the best fit. Note also that the number of attempts may be greater or lesser than the number of emitters.
  • Need to use the XML to write out and read in just the configuration values
  • Need to save multiple source positions in TestResult. Added bad code at the point to continue.

Enhancements

  • Meeting with Dr. Kuber.
    • Add a “distance” component to the test and a multiple emitter test
    • Got a bunch of items to add actuators to: Hardhat, noise-blocking headphones, and a push-to-talk mic.
  • Added name and gender fields to the GUI and cleaned up the menus
  • Working on adding multiple sounds
    • Added a ‘next’ button. Once pushed, the sources can show until the center is clicked again.
    • I think the test should have options for how the sounds are added
      • Permutations (A, then B, then C, then AB, AC, BC, ABC)
      • All (Going to start with this)
      • Random?
  • Added variable distance

Version 1!

  • Writing out files – done with CSV, not sure if we need the xml yet. Here’s what a session result looks like:
    Data!
    Data!
  • Trying to copy the executable over to another machine. First, the app failed to launch until I installed the end-user directX package. Now, it fails to start the XAudio2 engine. Trying the full install.
  • Built a release version. That may be better?
  • Well, it was either the full SDK install or the release build, but it works. I’m betting that it was the release build, since the debug dlls aren’t included in the DirectX end user package and I may have been referencing those.
  • Everything is now on the laptop for tomorrow’s meeting 🙂
  • Oh yeah, and I need to change the versionversion1