۱۳-دى-۱۳۸۴, ۰۹:۳۲:۴۷
کد:
WAVRECORD Record sound using Windows audio input device.
WAVRECORD(N,FS,CH) records N audio samples at FS Hertz from
CH number of input channels from the Windows WAVE audio device.
Standard audio rates are 8000, 11025, 22050, and 44100 Hz. CH
can be 1 or 2 (mono or stereo). Samples are returned in a matrix
of size N x CH. If not specified, FS=11025 Hz, and CH=1.
WAVRECORD(..., DTYPE) records and returns data using the data type
specified by DTYPE. Supported data types and the corresponding
number of bits per sample recorded in each format are as follows:
DTYPE bits/sample
'double' 16
'single' 16
'int16' 16
'uint8' 8
This function is only for use with 32-bit Windows machines.
Example: Record and play back 5 seconds of 16-bit audio
sampled at 11.025 kHz.
Fs = 11025;
y = wavrecord(5*Fs, Fs, 'int16');
wavplay(y, Fs);
See also WAVPLAY, WAVREAD, WAVWRITE.
خروجي اين تابع دامنه صداست واحد هم زمان مقدارش هم 1/f باشه f تو مخرجه :wink: