📄 acquire.m
字号:
% ACQUIRE Acquires the voice signal via microphone.
% Handles the recording 3SA's input signal.
% Completeed: July 24, 2005
% Terrence Irving
% 2005 NSF REU in SDR
% Stevens Institute of Technology
% Hoboken, NJ USA
% Globalize the appropriate data created by this component.
global voice_data mic_hear mic_continue input_player
% Globalize object handles that this component must access.
global about adc_pb bpsk_pb dac_pb debpsk_pb despread_pb demo
global explore_mode file full_mode help img instructions_txt
global mic_image mic_pb mode new quit save save_as speakers_pb
global spkrs_image spread_pb sssa_base ss_help srrc_1_pb srrc_2_pb
global title_txt
% Record.
voice_data = wavrecord(8000, 8000); % take 8000 samples at a samp. freq. of 8 kHz from the microphone
% Arbitrarily trash the right channel, keeping only the left.
voice_data = voice_data(:, 1);
% Enable the Hear and Continue buttons.
set(mic_hear, 'enable', 'on');
set(mic_continue, 'enable', 'on');
% Create audioplayer object.
input_player = audioplayer(voice_data, 8000); % player for input signal
disp('Input signal acquired');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -