Escolar Documentos
Profissional Documentos
Cultura Documentos
2 3
2.1 FSK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 FSK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3 6
3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4 9
5 10
2
1
-
( line in line out ).
. -
( ) ,
.
.
(binary frequency-shift keying BFSK) -
0 1.2KHz 1 2.2KHz.
1
. o -
bits (bit-rate) .
. FSK.
(
line out )
recording device line in wave
stream loopback.
-
.
FSK PCM buffer
BFSK . BFSK ,
,
. , -
1
FSK
3
m (t )
x
2 +
y1 ( t ) cos( 2 f 1 t )
Binary Tb FSK
PCM input + output
data data
+
m (t )
inverter x
2
y 2 (t ) cos( 2 f 2 t )
Tb
1: FSK.
. BFSK
() BFSK ().
2.1 FSK
BFSK 1. -
1 volt
0 0 volt. (inverter)
1 ,
f1 , f2 -
f1 . 0
, -
f2 . f1 f2
1
bit Tb .
y1 (t) y2 (t). -
.
. ,
, bit. -
(continuous-phase frequency-shift keying, CPFSK).
4
cos( 2 pif 1t )
I channel Ts
x ( )2
0
sin( 2 pif 1 t ) +
+
Q channel Ts
x ( )2
0
Decision
+ Data
threshold
cos( 2 pif 2 t ) -
I channel Ts
x ( )2
0
+
sin( 2 pif 2 t ) +
+
Q channel Ts
2
x ()
0
2: FSK I Q
.
BFSK .
2.2 FSK
,
1 0 (high - low tones).
, ,
FSK . FSK
:
q
U (t) = 2Eb
Tb cos (2fc + 2f ) t, 0 t Tb (binary 1)
H
SF SK (t) = (1)
q
UL (t) = 2Eb cos (2fc 2f ) t,
T b
0 t Tb (binary 0)
2f .
5
FSK
.
Ts ,
1
(f )min = Ts .
FSK ,
. 2 FSK
Q (2)
2 .
, ,
in-phase quadrature .
. l, T . l > T
1 .
f1 f2 y1 (t) y2 (t)
, f1
f2 .
, .
,
SDL v1.2.6 Windows 2000. SDL (Simple Directmedia
Layer) -
, , 3D Hardaware OpenGL. -
MPEG,
. SDL C, C++.
MS Visual Studio 6.0.
2
6
:
1. 8-bit 16-bit , , -
format
Hardware.
2. thread, callback
.
3. ,
, .
3.1
playtone.cpp. -
:
1. .
3. 11025 -
FM . -
16-bit signed integers .
buffer (4096)
buffers -
.
4. callback buffer
bytes buffer.
audio stream.
5. ( soundcard) x samples/second.
r bits/second, bit 1/r seconds
7
x/r samples. 1.2 2.2 kHz x samples/second
1/r seconds buffer. bits
.
6. T, PCM buffer
SDL PauseAudio(0)
callback .
, SDL CloseAudio(.)
3.2
recording device PC
line in, - loopback -,
recording device wave stream PC.
. FSK
.
fsk dg.c. fsk dg.h fsk dg.c.
,
,
fsk dg.c.
:
PrintWaveErrorMsg(.):
Wave In .
setmute(.): mute .
mute control. control ID
.
check decode(.): .
.
decode corr(.):
2.
. 0 1 .
error(.): . -
, EXIT
FAILURE.
8
main(): .
, recording device
.
bit.
playtone.exe
,
bits. :
string bits :
.. cmdline\decoder\decoder.exe 100
9
. interface mute, .
, enter. decode
recording device realtime.
encoder decoder. ,
. attached
NOS,
,
.
10