I am working on a personal project. I want to transmit some data over the air using an old ham radio.
My first draft application works like this:
I will build one byte with 4 "signals":
then I will combine these 4 pairs of bits together and start again with the following.
Demodulation works fine and should be fast enough, but I had a problem with sound generation ... it's slow ...
Here is my debug code:
#include <iostream> #include <windows.h> using namespace std; int main() { Beep( 5000, 100 ); Beep( 6000, 100 ); Beep( 7000, 100 ); Beep( 8000, 100 ); Beep( 9000, 100 ); return 0; }
I expect 5 beeps, close to each other, 100 ms each, but here's what I get (on top, five "100 ms sounds" (), and below - five "20 ms pins" (): 
As you can see, what I get is 50 ms, after a pause of 75 ms, when I want a sound signal of 100 ms, and 10 ms, after which a pause of 100 ms when I want to receive a signal for 20 ms.
Is there anything faster and more accurate than Beep () for Windows? (something that works with linux would be even better, because the last application should work on raspberry pi)
I would get a higher used bandwidth with 3 ms sounds (.... 41 bytes / sec .... which is more than enough for my application)
Compiler: g ++ (mingw)
Os: seven 64 bits
srsbsns
source share