Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

StandardSampleRates

Display standard rates of sampling

Description

This property displays the standard sample rates supported by your audio device. You can choose to use the standard rates or use values within the given range. See UseStandardSampleRate for more information.

Standard sample rates for DirectSound audio devices are:

  • 8000

  • 8192

  • 11025

  • 16000

  • 22050

  • 32000

  • 44100

  • 47250

  • 48000

  • 50000

  • 88200

  • 96000

  • 176400

  • 192000

  • 352800

Example

Set Rate of an Audio Session

Specify a non standard sample rate for a session with multichannel audio devices.

Create a session and add an audio channel.

s = daq.createSession('directsound')
ch = addAudioInputChannel(s,'Audio1',1);

Specify the session to use nonstandard sample rates.

s.UseStandardSampleRates = false
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

Change the session rate to 85000.

s.Rate = 85000
s = 

Data acquisition session using DirectSound hardware:
   Will run for 1 second (85000 scans) at 85000 scans/second.
   Number of channels: 1
      index Type Device Channel MeasurementType     Range     Name
      ----- ---- ------ ------- --------------- ------------- ----
      1     audi Audio1 1       Audio           -1.0 to +1.0
Was this topic helpful?