pub struct AudioFrameCapture { /* private fields */ }Expand description
Manages the Kinect sensor and provides access to audio frame data.
This struct is responsible for initializing and holding the necessary Kinect resources to capture audio frames from audio beams.
Implementations§
Source§impl AudioFrameCapture
impl AudioFrameCapture
Sourcepub fn new() -> Result<Self, Error>
pub fn new() -> Result<Self, Error>
Creates a new AudioFrameCapture instance.
This function initializes the default Kinect sensor, opens it, and sets up the audio source and audio beam frame reader.
§Errors
Returns an error if the Kinect sensor cannot be initialized, opened, or if the audio source is not active.
Sourcepub fn iter(&self) -> Result<AudioFrameCaptureIter, Error>
pub fn iter(&self) -> Result<AudioFrameCaptureIter, Error>
Returns an iterator over audio frames.
The iterator will block waiting for new frames. Each item yielded by
the iterator is a Result<AudioFrameData, Error>, allowing for error
handling during frame acquisition.
§Errors
Returns an error if it fails to subscribe to the frame arrived event, which is necessary for the iterator to function.