AudioCapture
Supported Hardware Devices: Pro Capture cards
Contents Demonstrated in the Sample:
- Capturing audio data from input signals
- Saving LPCM format audio signals as WAV files
- Channel selection via command parameters when multiple devices are available
Call Logic:
- Obtain version information, initialize, and enumerate devices: MWGetVersion, MWCaptureInitInstance, MWRefreshDevice, MWGetChannelCount
- Filter supported devices based on device information: MWGetChannelInfoByIndex
- Open the device:
- Open the device specified by command parameters: MWOpenChannel
- When no device is specified in command parameters, open the first available channel by default: MWGetDevicePath, MWOpenChannelByPath
- Retrieve audio source count and status: MWGetAudioInputSourceArray, MWGetAudioSignalStatus
- Start audio capture: MWStartAudioCapture
- Create event: MWCreateEvent
- Register for message notifications: MWRegisterNotify
- Wait for event: MWTryWaitEvent, MWWaitEvent
- Capture one frame of audio data: MWCaptureAudioFrame
- Write audio data to WAV file
- Repeat steps 8, 9, and 10 until capture is stopped
- Stop audio capture and release resources: MWUnregisterNotify, MWCloseEvent, MWCloseChannel, MWCaptureExitInstance
Result:

Flowchart:
