UseStandardSampleRates
Configure session to use standard sample rates
Description
Use this property to specify if your audio channel uses standard
sample rates supported by your device or a user-specified value. To
use non-standard sample rates, set the value to false
and
set the sessions’s Rate
to
the desired value.
Example
Change Acquisition Rate
Add an audio channel to a session and change
the UseStandardSampleRates
property.
s = daq.createSession('directsound');
addAudioInputChannel(s,Audio1,1);
s.UseStandardSampleRates = false
s = Data acquisition session using DirectSound hardware: Will run for 1 second (44100 scans) at 44100 scans/second. Number of channels: 1 index Type Device Channel MeasurementType Range Name ----- ---- ------ ------- --------------- ------------- ---- 1 audi Audio1 1 Audio -1.0 to +1.0
Specify a different scan rate.
s.Rate = 8500
s = Data acquisition session using DirectSound hardware: Will run for 1 second (8500 scans) at 8500 scans/second. Number of channels: 1 index Type Device Channel MeasurementType Range Name ----- ---- ------ ------- --------------- ------------- ---- 1 audi Audio3 1 Audio -1.0 to +1.0