Results 1 to 10 of 10

Thread: LaserBoy_06_11_2008

  1. #1
    Join Date
    Jan 2006
    Location
    Akron, Ohio USA
    Posts
    1,754

    Default LaserBoy_06_11_2008

    It's still not right, but it will shift your samples!

    http://hacylon.case.edu/laser/LaserB...06_11_2008.zip

    Go into 'y' LaserBoy wave utilities. Select option '4'. This is where you set the offests you want to impose on your wave. Your wave must already exist. LaserBoy waves are made with no offsets; not even an offset structure. The idea here is to set a difference between the channels of the wave. It shouldn't matter which way you shift. If you want a difference of 7 samples between the scanners and the colors, then set it like this:

    7
    7
    0
    0
    0
    0

    You could also set it like this

    0
    0
    -7
    -7
    -7
    -7

    It's the same thing.

    One you have your offsets in place, you can impose them on a LaserBoy wave with option '5'.

    Note: If you want to restore your wave to no offsets, then you set your desired offsets to all zeros.

    0
    0
    0
    0
    0
    0

    and the samples should be realigned in time.

    James.

  2. #2
    Join Date
    Jan 2006
    Location
    Akron, Ohio USA
    Posts
    1,754

    Default Even Better ... V2


  3. #3
    Join Date
    Jan 2006
    Location
    Akron, Ohio USA
    Posts
    1,754

    Default

    Please test the crap out of this and let me know what you find! It is very large and complex and hard for me to see every aspect of it.

    Thanks!

    James.

  4. #4
    Join Date
    Jan 2006
    Location
    Akron, Ohio USA
    Posts
    1,754

    Default

    I think I found out why LaserBoy doesn't terminate cleanly in Mac OSX.

    I also fixed a few more menu display things and I changed the key for LaserBoy wave utilities from 'y' to 'b' because I kept hitting 'y' thinking I was answering yes!

    I will package it up and get it out there some time tomorrow!

    I still need to work on the LaserBoy on screen wave display stuff.

    James.

  5. #5
    Join Date
    May 2008
    Location
    nerdtown, USA
    Posts
    1,165

    Default

    Quote Originally Posted by James Lehman View Post
    I think I found out why LaserBoy doesn't terminate cleanly in Mac OSX.

    I also fixed a few more menu display things and I changed the key for LaserBoy wave utilities from 'y' to 'b' because I kept hitting 'y' thinking I was answering yes!

    I will package it up and get it out there some time tomorrow!

    I still need to work on the LaserBoy on screen wave display stuff.

    James.
    Cool!

    Working on an EasyLase driver for it now.

  6. #6
    Join Date
    Jan 2006
    Location
    Akron, Ohio USA
    Posts
    1,754

    Talking

    Hello!

    Here's what I found...

    The dtor of the ez_ilda class...

    Code:
    //############################################################################
    ez_ilda::~ez_ilda()
    {
        delete          wave_offsets;
        bmp_free        (&bmp);
        bmp_free        (&background);
        ez_ilda_pointer = NULL;
        SDL_FreeSurface (screen); // <--- this right here!
        SDL_Quit        ();
    }
    Also, I am still having weird problems with crashing durring wave file input. It says:

    The instruction at 0xblahblahblah referenced memory at "0x00000002". The memory could not be written.

    "0x00000002" is stdout, is it not?

    Other than that, I think I got the sample shifting stuff working!!!!

    James.

  7. #7
    Join Date
    May 2008
    Location
    nerdtown, USA
    Posts
    1,165

    Default

    Quote Originally Posted by James Lehman View Post
    Hello!

    Here's what I found...

    The dtor of the ez_ilda class...

    Code:
    //############################################################################
    ez_ilda::~ez_ilda()
    {
        delete          wave_offsets;
        bmp_free        (&bmp);
        bmp_free        (&background);
        ez_ilda_pointer = NULL;
        SDL_FreeSurface (screen); // <--- this right here!
        SDL_Quit        ();
    }
    Also, I am still having weird problems with crashing durring wave file input. It says:

    The instruction at 0xblahblahblah referenced memory at "0x00000002". The memory could not be written.

    "0x00000002" is stdout, is it not?

    Other than that, I think I got the sample shifting stuff working!!!!

    James.
    0x00000002 would be stdout if it were a file descriptor, but this is talking about an address in memory... which is definitely not something it should be doing. Looks like you have an uninitialized pointer being dereferenced, James :-)

    If you compile with debug symbols you can use gdb (or, even better, one of its frontends like ddd) to find out which line of code that address corresponds to.

  8. #8
    Join Date
    Jan 2006
    Location
    Akron, Ohio USA
    Posts
    1,754

    Default

    Yeah, there's probably something weird about the int* offset in ez_wave_header or the sample shifting pointers to pointers or something.

    It happens the second time I open a wave!

    Did that dtor fix allow LaserBoy to terminate cleanly in MacOSX?

    James.

  9. #9
    Join Date
    May 2008
    Location
    nerdtown, USA
    Posts
    1,165

    Default

    Quote Originally Posted by James Lehman View Post
    Yeah, there's probably something weird about the int* offset in ez_wave_header or the sample shifting pointers to pointers or something.

    It happens the second time I open a wave!

    Did that dtor fix allow LaserBoy to terminate cleanly in MacOSX?

    James.
    I haven't tried it yet. But seriously, get ddd- you can inspect variables in a running program! Would solve this in a snap.

  10. #10
    Join Date
    Jan 2006
    Location
    Akron, Ohio USA
    Posts
    1,754

    Default

    Debuggers are for girls!

    Just kidding. I can't figure out how to get into the debugger in Dev-C++.

    I just might have to put this together in an X based IDE in Linux so I can see what's going on!

    I'll tell you one thing... I've scrubbed this code pretty good! Even if I haven't found THE bug yet, I've cleaned up a lot of other stuff.

    James.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •