Page 3 of 3 FirstFirst 123
Results 21 to 27 of 27

Thread: Sound Card DAC Tutorial

  1. #21
    Join Date
    Jul 2012
    Posts
    2

    Default

    Brilliant thanks. James; is it a matter of using an API as suggested by JohnVayas to communicate to the driver address? I guess I need to read up on APIs anyways...

  2. #22
    Join Date
    Mar 2010
    Location
    Raleigh, NC
    Posts
    2,293

    Default

    Quote Originally Posted by james View Post
    No matter what you will be communicating with some kind of Windows abstract sound device and that will communicate with the specific driver for the actual hardware you have. As far as I know they all work about the same. There will be some address you send a big chunk of data to. If you want it to hold a state, you need an execution thread to keep filling up the buffer and dumping it to the device address over and over. You can't just set it and forget it, unless you want to set it to silence or digital zero.
    Actually, you can set it and forget it depending on what you are doing. If you have a circular buffer you can load an entire frame and tell it to repeat and it will keep sending out the frame over and over. Not all that useful, though. But, if you have a big wave file you can load the entire wav file into a buffer and set it and forget it. But, for useful laser display you need the ability to adjust parameters in real time, which means changing the frame data as it is being sent. You can't send it after it is in the buffer but you can before it reaches the buffer. That's why you need streaming data and why you need to keep feeding the sound card in this case. There really is not sound card address that you send the data to other than the buffer that you define. What you actually do is full the buffer you create and notify windows that your buffer is ready and Windows will read it.

    DirectX is the easiest API that is built into your computer. Look into what a primary and secondary buffer are and learn to use them. There are some 3rd Party libraries for dealing with audio a little simpler but they come with the overhead of license agreements and additional DLLs to install.

  3. #23
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    2,197

    Default

    Yes. You fill a buffer that you have defined in user memory space (inside your own application) and tell Windows where it is. Then Windows takes care of moving that data (from an an address aka pointer) to stream it into the clocked DAC channels.

    You can fill a buffer and tell it to repeat without having to maintain a running thread of execution? Really?

    James.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOS and Linux (including Raspberry Pi!).
    Download LaserBoy!
    YouTube Tutorials
    Ask me about my LaserBoy Correction Amp Kit for sale!
    All software has a learning curve usually proportional to its capabilities and unique features. Pointing with a mouse is in no way easier than tapping a key.

  4. #24
    Join Date
    Mar 2016
    Location
    Portland, OR
    Posts
    47

    Default

    I think this is a good place to plop this info that anyone following this tutorial will eventually benefit from.

    I have some details regarding how to get your sound card driver working in windows 7 for the c-media chips that many folks use when making these. Windows will likely mix all of your audio channels together and by doing so send garbled signals to your sound card DAC. Having the correct driver has fixed this for me, this is what I did:

    It seems that all devices with the cm6206 are compatible with the same drivers. It doesn't matter if it's a 5.1 card, 7.1 card or even if it's not even a sound card at all!! They put this chip in a LOT of different products and they all seem to be compatible with eachothers drivers.

    None of the windows drivers properly separate the audio tracks. I have tried them all. At least all that I can find. The drivers that come with these USB sound cards also don't work. I have tried 2 different OEM disks and downloaded a few others that also don't work. If the driver installs 2 different devices in your windows audio control panel, it's the wrong one.

    This is the only driver I have found to work:

    http://www.rosewill.com/media/Downlo...207%20v1.0.zip

    This is a zip file, so you have to download an unzipping program. Winzip or winRAR will both work. It might say it's the evaluation version, but I've had it for months now and it still works.

    It's for a set of gaming headphones, but don't let that bother you. It comes with an applet for the audio driver that gives you access to more controls that just the standard windows control panel. When you install it, it should replace any other c-media, or windows universal USB sound device drivers (it did for me anyway). I just went into the folder where I unzipped the driver and navigated to /fscommand/W7 and double click on "setup". This automatically replaced the other driver.

    If it doesn't work for you, go into your control panel and select the audio device that was first installed (I have done it for both devices when it has installed 2 and it doesn't seem to matter which one you choose).

    Go to the properties window and again click properties.
    Then click "change settings" and go to the "driver" tab and click "update driver".
    Click "browse my computer for software" and click browse.
    Navigate to the folder where you unzipped the driver that you downloaded and make sure that the "include subfolders" box is checked. and then click next. It should find the driver and update it.

    Once you have the driver installed you have to go back into the control panel and select the new device that it added. It should be called "Speakers - USB Multi-Channel Audio Device".

    Click configure and select either 5.1 or 7.1 depending on the actual sound card that you have.
    Click next and make sure all of the boxes in that screen are checked.
    Click next and again check all of the boxes for full range speakers.
    Click finish

    Now with the same device selected in the control panel view, click properties.
    Go to the advanced tab and make sure that the default format is set to 16 bit, 48000 Hz (DVD Quality). Mine was set to 44000 Hz by default and this will make the laser images distorted.
    Do not set this device as default!!! Leave your internal sound card as default. I also turned off system sounds to be on the safe side.

    I have also seen a lot of people say that you need to go into your internal sound card device and go to the "Enhancements" tab and click the box for "disable all enhancements". I'm not actually sure if this is necessary since it should only affect system sounds but I did it anyway.

    If the driver installed properly, you should also have a new item in your control panel main view in addition to "Sound".
    You should see "USB Multi-Channel Audio Device" double click it.
    This is where you will see at the top left under "System Input" a drop down box where you can select the number of channels. Select 8 even if you only have a 6 channel card.
    Next, look down at "Output Mode" and the drop down should list the max number of speakers that are specific to your particular sound card.
    I left all other settings as default.

    OK! That's it. With this setup I am able to get Laserboy to output correctly to all channels without mixing things together.

  5. #25
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    2,197

    Default

    I just got a copy of this a put it here:

    http://laserboy.org/driver_for_rhts-...sta_7_v1.0.zip

    James.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOS and Linux (including Raspberry Pi!).
    Download LaserBoy!
    YouTube Tutorials
    Ask me about my LaserBoy Correction Amp Kit for sale!
    All software has a learning curve usually proportional to its capabilities and unique features. Pointing with a mouse is in no way easier than tapping a key.

  6. #26
    Join Date
    Nov 2014
    Location
    mid michigan
    Posts
    814

    Default

    James, is that the driver as well for this type of external sound card?
    Daderaide, thanks for that info.

    I ran into a problem with my sound device that caused me to set it aside for some time but i found a work around for the fault i was having, mine was distorting one of the main stereo channels and i traced it to the final stage of the audio amp that would be used for a set of headphones, i switched the point where i take the audio and feed it to the correction amp and that solved that problem at-lest for now, i have since updated that computer to win10 but the sound card dac seems unaffected, now i just need to learn how to use laserboy, it seems to work just fine under winblows 10 but i need to play with it more
    Remember Remember The 8th of November, When No One Stood, but Kneel, In Surrender
    In a popular government when the laws have ceased to be executed, as this can come only from the corruption of the republic, the state is already lost. Montesquieu

  7. #27
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    2,197

    Default

    It's a copy of the driver daderaide just posted. It will be there as long as The LaserBoy Forum is there!

    Much like, if you ask me, there is a copy of Spider Player install.

    As far as LaserBoy goes, feel free to ask questions... probably best in The LaserBoy Thread.

    James.
    Last edited by james; 04-12-2016 at 16:31.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOS and Linux (including Raspberry Pi!).
    Download LaserBoy!
    YouTube Tutorials
    Ask me about my LaserBoy Correction Amp Kit for sale!
    All software has a learning curve usually proportional to its capabilities and unique features. Pointing with a mouse is in no way easier than tapping a key.

Posting Permissions

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