chromium/third_party/blink/renderer/modules/webaudio/BUILD.gn

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

import("//third_party/blink/renderer/modules/modules.gni")

blink_modules_sources("webaudio") {
  sources = [
    "analyser_handler.cc",
    "analyser_handler.h",
    "analyser_node.cc",
    "analyser_node.h",
    "async_audio_decoder.cc",
    "async_audio_decoder.h",
    "audio_basic_processor_handler.cc",
    "audio_basic_processor_handler.h",
    "audio_buffer.cc",
    "audio_buffer.h",
    "audio_buffer_source_handler.cc",
    "audio_buffer_source_handler.h",
    "audio_buffer_source_node.cc",
    "audio_buffer_source_node.h",
    "audio_context.cc",
    "audio_context.h",
    "audio_destination_handler.cc",
    "audio_destination_handler.h",
    "audio_destination_node.cc",
    "audio_destination_node.h",
    "audio_graph_tracer.cc",
    "audio_graph_tracer.h",
    "audio_handler.cc",
    "audio_handler.h",
    "audio_listener.cc",
    "audio_listener.h",
    "audio_listener_handler.cc",
    "audio_listener_handler.h",
    "audio_node.cc",
    "audio_node.h",
    "audio_node_input.cc",
    "audio_node_input.h",
    "audio_node_output.cc",
    "audio_node_output.h",
    "audio_node_wiring.cc",
    "audio_node_wiring.h",
    "audio_param.cc",
    "audio_param.h",
    "audio_param_handler.cc",
    "audio_param_handler.h",
    "audio_param_map.cc",
    "audio_param_map.h",
    "audio_param_timeline.cc",
    "audio_param_timeline.h",
    "audio_playout_stats.cc",
    "audio_playout_stats.h",
    "audio_processing_event.cc",
    "audio_processing_event.h",
    "audio_scheduled_source_handler.cc",
    "audio_scheduled_source_handler.h",
    "audio_scheduled_source_node.cc",
    "audio_scheduled_source_node.h",
    "audio_sink_info.cc",
    "audio_sink_info.h",
    "audio_summing_junction.cc",
    "audio_summing_junction.h",
    "audio_worklet.cc",
    "audio_worklet.h",
    "audio_worklet_global_scope.cc",
    "audio_worklet_global_scope.h",
    "audio_worklet_handler.cc",
    "audio_worklet_handler.h",
    "audio_worklet_messaging_proxy.cc",
    "audio_worklet_messaging_proxy.h",
    "audio_worklet_node.cc",
    "audio_worklet_node.h",
    "audio_worklet_object_proxy.cc",
    "audio_worklet_object_proxy.h",
    "audio_worklet_processor.cc",
    "audio_worklet_processor.h",
    "audio_worklet_processor_definition.cc",
    "audio_worklet_processor_definition.h",
    "audio_worklet_processor_error_state.h",
    "base_audio_context.cc",
    "base_audio_context.h",
    "biquad_dsp_kernel.cc",
    "biquad_dsp_kernel.h",
    "biquad_filter_handler.cc",
    "biquad_filter_handler.h",
    "biquad_filter_node.cc",
    "biquad_filter_node.h",
    "biquad_processor.cc",
    "biquad_processor.h",
    "channel_merger_handler.cc",
    "channel_merger_handler.h",
    "channel_merger_node.cc",
    "channel_merger_node.h",
    "channel_splitter_handler.cc",
    "channel_splitter_handler.h",
    "channel_splitter_node.cc",
    "channel_splitter_node.h",
    "constant_source_handler.cc",
    "constant_source_handler.h",
    "constant_source_node.cc",
    "constant_source_node.h",
    "convolver_handler.cc",
    "convolver_handler.h",
    "convolver_node.cc",
    "convolver_node.h",
    "cross_thread_audio_worklet_processor_info.h",
    "deferred_task_handler.cc",
    "deferred_task_handler.h",
    "delay_handler.cc",
    "delay_handler.h",
    "delay_node.cc",
    "delay_node.h",
    "dynamics_compressor_handler.cc",
    "dynamics_compressor_handler.h",
    "dynamics_compressor_node.cc",
    "dynamics_compressor_node.h",
    "gain_handler.cc",
    "gain_handler.h",
    "gain_node.cc",
    "gain_node.h",
    "iir_dsp_kernel.cc",
    "iir_dsp_kernel.h",
    "iir_filter_handler.cc",
    "iir_filter_handler.h",
    "iir_filter_node.cc",
    "iir_filter_node.h",
    "iir_processor.cc",
    "iir_processor.h",
    "inspector_helper_mixin.cc",
    "inspector_helper_mixin.h",
    "inspector_web_audio_agent.cc",
    "inspector_web_audio_agent.h",
    "media_element_audio_source_handler.cc",
    "media_element_audio_source_handler.h",
    "media_element_audio_source_node.cc",
    "media_element_audio_source_node.h",
    "media_stream_audio_destination_handler.cc",
    "media_stream_audio_destination_handler.h",
    "media_stream_audio_destination_node.cc",
    "media_stream_audio_destination_node.h",
    "media_stream_audio_source_handler.cc",
    "media_stream_audio_source_handler.h",
    "media_stream_audio_source_node.cc",
    "media_stream_audio_source_node.h",
    "offline_audio_completion_event.cc",
    "offline_audio_completion_event.h",
    "offline_audio_context.cc",
    "offline_audio_context.h",
    "offline_audio_destination_handler.cc",
    "offline_audio_destination_handler.h",
    "offline_audio_destination_node.cc",
    "offline_audio_destination_node.h",
    "offline_audio_worklet_thread.cc",
    "offline_audio_worklet_thread.h",
    "oscillator_handler.cc",
    "oscillator_handler.h",
    "oscillator_node.cc",
    "oscillator_node.h",
    "panner_handler.cc",
    "panner_handler.h",
    "panner_node.cc",
    "panner_node.h",
    "periodic_wave.cc",
    "periodic_wave.h",
    "realtime_analyser.cc",
    "realtime_analyser.h",
    "realtime_audio_destination_handler.cc",
    "realtime_audio_destination_handler.h",
    "realtime_audio_destination_node.cc",
    "realtime_audio_destination_node.h",
    "realtime_audio_worklet_thread.cc",
    "realtime_audio_worklet_thread.h",
    "script_processor_handler.cc",
    "script_processor_handler.h",
    "script_processor_node.cc",
    "script_processor_node.h",
    "semi_realtime_audio_worklet_thread.cc",
    "semi_realtime_audio_worklet_thread.h",
    "setsinkid_resolver.cc",
    "setsinkid_resolver.h",
    "stereo_panner_handler.cc",
    "stereo_panner_handler.h",
    "stereo_panner_node.cc",
    "stereo_panner_node.h",
    "wave_shaper_dsp_kernel.cc",
    "wave_shaper_dsp_kernel.h",
    "wave_shaper_handler.cc",
    "wave_shaper_handler.h",
    "wave_shaper_node.cc",
    "wave_shaper_node.h",
    "wave_shaper_processor.cc",
    "wave_shaper_processor.h",
  ]

  if (is_win) {
    # Result of 32-bit shift implicitly converted to 64 bits.
    cflags = [ "/wd4334" ]
  }

  if (current_cpu == "x86" || current_cpu == "x64") {
    sources += [ "cpu/x86/oscillator_kernel_sse2.cc" ]
  }

  if (current_cpu == "arm64" || (current_cpu == "arm" && arm_use_neon)) {
    sources += [ "cpu/arm/oscillator_kernel_neon.cc" ]
  }
  deps = [
    "//services/metrics/public/cpp:ukm_builders",
    "//third_party/blink/renderer/modules/mediastream",
    "//third_party/blink/renderer/modules/peerconnection",
    "//third_party/blink/renderer/modules/permissions",
    "//third_party/blink/renderer/modules/webrtc",
    "//third_party/fdlibm",
  ]
}