chromium/remoting/client/audio/BUILD.gn

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

source_set("audio") {
  sources = [
    "async_audio_data_supplier.cc",
    "async_audio_data_supplier.h",
    "audio_jitter_buffer.cc",
    "audio_jitter_buffer.h",
    "audio_playback_sink.h",
    "audio_playback_stream.cc",
    "audio_playback_stream.h",
    "audio_player.cc",
    "audio_player.h",
    "audio_stream_format.cc",
    "audio_stream_format.h",
  ]

  configs += [ "//remoting/build/config:version" ]

  deps = [
    "//base",
    "//remoting/base",
    "//remoting/protocol",
  ]

  libs = []

  if (is_android) {
    sources += [
      "audio_player_android.cc",
      "audio_player_android.h",
    ]
    libs += [
      "android",
      "OpenSLES",
    ]
  }
}

source_set("test_support") {
  testonly = true

  sources = [
    "fake_async_audio_data_supplier.cc",
    "fake_async_audio_data_supplier.h",
  ]

  deps = [
    "//base",
    "//remoting/client/audio",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "audio_jitter_buffer_unittest.cc",
    "audio_player_unittest.cc",
  ]

  configs += [ "//remoting/build/config:version" ]

  deps = [
    ":audio",
    "//base",
    "//remoting/proto",
    "//testing/gmock",
    "//testing/gtest",
  ]
}