(Not recommended) Prepare session for operation
prepare( configures and allocates
hardware resources for the session
s and reduces the latency of
startForeground functions. There must be at least one channel in the
session before you can call this function. Use of this function is optional; it is
automatically called as needed.
Create a session with one channel, and prepare it for operation.
s = daq.createSession('directsound'); ch = addAudioInputChannel(s,'Audio1',1); prepare(s)
s— Data acquisition session
Data acquisition session, specified as a session object. Create the
session object using
daq.createSession. Use the data
acquisition session for acquisition and generation operations. Create one
session per vendor and use that vendor session to perform all data
sessionobject interface is not recommended
Not recommended starting in R2019b
Use of this function with a
session object is not recommended. To
access a data acquisition device, use a
with its functions and properties instead.
For more information about using the recommended functionality, see Transition Your Code from Session to DataAcquisition Interface.