Author Topic: Days after SELEM  (Read 50903 times)

0 Members and 1 Guest are viewing this topic.

Offline Fanny Pack

  • Hero Member
  • *****
  • Posts: 645
  • Milliwatts: -20
  • Gender: Male
    • View Profile
Re: Days after SELEM
« Reply #15 on: August 21, 2009, 07:34:18 pm »
Since you understand WAV you should feel comfortable with the WIN32 functions since they deal directly with WAV structures.  The basic idea to send out sound with WIN32 is to create a WAV chunk, of how ever many channels you desire, then send it.  If you want to send a big file you can do it all in one chunk.  But, to stream you have to constantly build and send small chunks.  I don't have a good memory of how I did it but I think I set up some type of circular 3 chunk buffer and just keep writing to it and the Win APIs were smart enough to handle the data and send me notifications when it was ready for more... or something like that.  But, regardless you don't need any understanding of Windows to use them.  I'll look for the old code and post some of the functions you will need and you can read about them online through the MSDN site.  Other than using Win32 functions I wasn't doing any Windows programming at all... just normal C++.  Or C, actually.
« Last Edit: August 21, 2009, 07:35:49 pm by Hyena »

Offline Fanny Pack

  • Hero Member
  • *****
  • Posts: 645
  • Milliwatts: -20
  • Gender: Male
    • View Profile
Re: Days after SELEM
« Reply #16 on: August 21, 2009, 07:45:56 pm »
Bummer.  I looked for my old code and can't find it.  I think I must have thrown it out awhile back.  Anyway, just start with this link and you should find all you need to write to a soundcard with win32 api calls.  Concentrate on the methods that start with "wave", of course.  All of the documentation is online.

http://msdn.microsoft.com/en-us/library/ms713764(VS.85).aspx

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2132
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Days after SELEM
« Reply #17 on: August 21, 2009, 08:04:21 pm »
It "sounds" like it works in a similar way in Linux. More or less.

In Linux it is totally abstraced to being a file (as is everything else).

You can make ioctl() calls to the file descriptor to communicate with the device driver, to set and get device parameters.

Then you just wite to it in raw binary form.

Thanks for the link!  ;D

James.  :)
« Last Edit: August 21, 2009, 10:27:54 pm by James »
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2132
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Days after SELEM
« Reply #18 on: August 21, 2009, 11:02:55 pm »
Well I'm back in the code and finding all sorts of OLD bugs!

How did this crap ever work at all?  ??? :P %)

I downloaded a hex editor (Notepad++ with the HEX plugin). This is what it took to figure out that I have been reading headers correctly... when they are really there to read... The bug was returning junk as information when it should have just plain failed.

I'm also rearraging the basement setup. I've got the projector in a much more accessable place and the image is now being projected into the space between the big line source array speakers!

I plan on firing it up a lot more often than I ever did before.

I have just gotten through a whole, huge pile of nonsence. I "get" so much more of it than ever before! Holy crap! I think my evil plan to rule The Universe is starting to work!  ;D

James.  :)
« Last Edit: August 22, 2009, 01:30:08 am by James »
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2132
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Days after SELEM
« Reply #19 on: August 22, 2009, 04:56:02 pm »
NEW RELEASE !!!

http://akrobiz.com/laserboy/code/LaserBoy_2009_08_22.zip

There are a lot of bug fixes and some more common sense added to the wave joining functions.

Now, when you join waves together to make a LaserBoy wave, your current, system channel offsets are written into the header and you are asked up front if the whole wave should be considered negative signals.

James.  :)
« Last Edit: August 22, 2009, 05:03:25 pm by James »
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

 

SMF spam blocked by CleanTalk
SimplePortal 2.3.7 © 2008-2024, SimplePortal