waveOutGetDevCaps function Null safety winmm

int waveOutGetDevCaps(
  1. int uDeviceID,
  2. Pointer<WAVEOUTCAPS> pwoc,
  3. int cbwoc
)

The waveOutGetDevCaps function retrieves the capabilities of a given waveform-audio output device.

MMRESULT waveOutGetDevCapsW(
  UINT          uDeviceID,
  LPWAVEOUTCAPS pwoc,
  UINT          cbwoc
);

Implementation

int waveOutGetDevCaps(int uDeviceID, Pointer<WAVEOUTCAPS> pwoc, int cbwoc) {
  final _waveOutGetDevCaps = _winmm.lookupFunction<
      Uint32 Function(
          IntPtr uDeviceID, Pointer<WAVEOUTCAPS> pwoc, Uint32 cbwoc),
      int Function(int uDeviceID, Pointer<WAVEOUTCAPS> pwoc,
          int cbwoc)>('waveOutGetDevCapsW');
  return _waveOutGetDevCaps(uDeviceID, pwoc, cbwoc);
}