Re: Direct Soundcard Control
Thanks Gremmy, but.... even though the timer is set to 1ms, you only have accuracy to 10ms. but.... here is what I did to fix it.......
I still use DSB(0).Play DSBPLAY_DEFAULT so it plays once. But I go ahead and just program a 1sec. modulated sinewave as follows:
Instead of changing the volume, I just change the amplitude of the sinewave in my array. a 0-255 value produces a large amplitude, and the (1/3rd amplitude change) 85-172 value produces a lower amplitude, with the same volume setting of the computer.
Here is how IRIG works (doesn't matter if its "B" "A" "G" "H" etc.... just the sinewave frequency changes. (for modulated code)
P-marker --- 8-large sines with 2-small sines
Binary "0" -- 2-large sines with 8-small sines
Binary "1" -- 5-large sines with 5-small sines
notice how everything is in factors of 10? hense, when converted to DC code, you have accurate resolution to .01 seconds. I am not worried about accuaracy with this code. I am just trying to drive a large IRIG-B compatible display, that will give us a warm fuzzy during missions.
Since IRIG-B has a complete time frame of 1 sec. I will fill the array with the appropriate code, and then start it playing on each second.
Thanks,
Keith