1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24

media / mojo / mojom / audio_data.mojom [blame]

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module media.mojom;

// This defines a mojo transport format for an interleaved, signed
// 16-bit audio buffer.
// Marked [Stable], enabling its use across the LaCrOS/Ash boundary as part of
// the speech recognition API.
[Stable]
struct AudioDataS16 {
  // Number of channels.
  int32 channel_count;

  // Sample rate of the buffer.
  int32 sample_rate;

  // Number of frames in the buffer.
  int32 frame_count;

  // Channel data.
  array<int16> data;
};