anchor.diff:        ppFormat.value,
         nullptr));
   
  -  // Tell the audio source which format to use.
  -  final pWaveFormatExtensible = convertFormat(pWaveFormat);
  -  printFormat(pWaveFormatExtensible);
  -
     // Activate an IAudioRenderClient interface.
     final iidAudioRenderClient = convertToIID(IID_IAudioRenderClient);
     final ppAudioRenderClient = calloc<Pointer<COMObject>>();
     check(pAudioClient.GetService(iidAudioRenderClient, ppAudioRenderClient));
     free(iidAudioRenderClient);
  -  final pRenderClient = IAudioRenderClient(ppAudioRenderClient.cast());
  +  final pAudioRenderClient = IAudioRenderClient(ppAudioRenderClient.cast());
   
     // Grab the entire buffer for the initial fill operation.
     final bufferFrameCount = getBufferFrameCount(pAudioClient);
     print("Buffer Size = $bufferFrameCount frames");
     final pData = calloc<Pointer<BYTE>>();
  -  check(pRenderClient.GetBuffer(bufferFrameCount, pData));
  +  check(pAudioRenderClient.GetBuffer(bufferFrameCount, pData));
   
     // Load the initial data into the shared buffer.
  -  initData(pWaveFormatExtensible.ref, bufferFrameCount);
  -  var dataLoaded = fillMemoryBuffer(
  -      bufferFrameCount, pData.value, pWaveFormatExtensible.ref);
  -  check(pRenderClient.ReleaseBuffer(bufferFrameCount,
  +  initData(pWaveFormat.ref, bufferFrameCount);
  +  var dataLoaded =
  +      fillMemoryBuffer(bufferFrameCount, pData.value, pWaveFormat.ref);
  +  check(pAudioRenderClient.ReleaseBuffer(bufferFrameCount,
         dataLoaded ? 0 : AUDCLNT_BUFFERFLAGS.AUDCLNT_BUFFERFLAGS_SILENT));
   
     // Calculate the actual duration of the allocated buffer.
  -  final hnsActualDuration = REFTIMES_PER_SEC * bufferFrameCount / sampleRate;
  +  final hnsActualDuration = refTimesPerSecond * bufferFrameCount / sampleRate;
   
     check(pAudioClient.Start()); // Start playing.
   
     final pNumFramesPadding = calloc<UINT32>();
     while (dataLoaded) {
       // Sleep for half the buffer duration.
  -    Sleep(hnsActualDuration / REFTIMES_PER_MILLISEC ~/ 2);
  +    Sleep(hnsActualDuration / refTimesPerMillisecond ~/ 2);
       // See how much buffer space is available.
       check(pAudioClient.GetCurrentPadding(pNumFramesPadding));
       final numFramesAvailable = bufferFrameCount - pNumFramesPadding.value;
       // Grab all the available space in the shared buffer.
  -    check(pRenderClient.GetBuffer(numFramesAvailable, pData));
  +    check(pAudioRenderClient.GetBuffer(numFramesAvailable, pData));
       // Get next half second of data from the audio source.
  -    dataLoaded = fillMemoryBuffer(
  -        numFramesAvailable, pData.value, pWaveFormatExtensible.ref);
  -    check(pRenderClient.ReleaseBuffer(numFramesAvailable,
  +    dataLoaded =
  +        fillMemoryBuffer(numFramesAvailable, pData.value, pWaveFormat.ref);
  +    check(pAudioRenderClient.ReleaseBuffer(numFramesAvailable,
           dataLoaded ? 0 : AUDCLNT_BUFFERFLAGS.AUDCLNT_BUFFERFLAGS_SILENT));
     }
     free(pNumFramesPadding);
   
     // Wait for last data in buffer to play before stopping.
  -  Sleep(hnsActualDuration / REFTIMES_PER_MILLISEC ~/ 2);
  +  Sleep(hnsActualDuration / refTimesPerMillisecond ~/ 2);
     check(pAudioClient.Stop()); // Stop playing.
   
     // Clear up
  +  free(pData);
  +
     pDevice.Release();
  -  free(ppEndpoint);
  +  free(ppDevice);
   
     pAudioClient.Release();
     free(ppAudioClient);
   
  -  pRenderClient.Release();
  +  pAudioRenderClient.Release();
  +  free(ppAudioRenderClient);
  +
     free(ppFormat);
  -
  -  free(ppAudioRenderClient);
  -  free(pData);
   
     // Uninitialize COM now that we're done with it.
     CoUninitialize();
  
positive.code: 
    // Retrieve the default audio output device.
    final pDeviceEnumerator = MMDeviceEnumerator.createInstance();
    final ppEndpoint = calloc<Pointer<COMObject>>();
    check(pDeviceEnumerator.GetDefaultAudioEndpoint(
        0, // dataflow: rendering device
        0, // role: system notification sound
        ppEndpoint));
    pDeviceEnumerator.Release();
    free(pDeviceEnumerator.ptr);
  
    // Activate an IAudioClient interface for the output device.
    final pDevice = IMMDevice(ppEndpoint.cast());
    final iidAudioClient = convertToIID(IID_IAudioClient);
    final ppAudioClient = calloc<Pointer<COMObject>>();
    check(pDevice.Activate(iidAudioClient, CLSCTX_ALL, nullptr, ppAudioClient));
  
negative.code: import 'package:ffi/ffi.dart';
  import 'package:win32/win32.dart';
  
  const refTimesPerSecond = 5000000;
  const refTimesPerMillisecond = refTimesPerSecond / 1000;
  const frequency = 440; // 440Hz (concert pitch)
  const sampleCount = 96000 * 2;
  
  late Float32List pcmAudio;
  