AudioBufferEvents.cs 858 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (c) Meta Platforms, Inc. and affiliates.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the license found in the
  6. * LICENSE file in the root directory of this source tree.
  7. */
  8. using System;
  9. using Meta.WitAi.Data;
  10. using UnityEngine;
  11. namespace Meta.WitAi.Events
  12. {
  13. [Serializable]
  14. public class AudioBufferEvents
  15. {
  16. public delegate void OnSampleReadyEvent(RingBuffer<byte>.Marker marker, float levelMax);
  17. public OnSampleReadyEvent OnSampleReady;
  18. [Tooltip("Called when the volume level of the mic input has changed")]
  19. public WitMicLevelChangedEvent OnMicLevelChanged = new WitMicLevelChangedEvent();
  20. [Header("Data")]
  21. public WitByteDataEvent OnByteDataReady = new WitByteDataEvent();
  22. public WitByteDataEvent OnByteDataSent = new WitByteDataEvent();
  23. }
  24. }