OSDN Git Service

resolve merge conflicts of 1922726 to master
authorDan Willemsen <dwillemsen@google.com>
Tue, 13 Sep 2016 04:34:12 +0000 (21:34 -0700)
committerDan Willemsen <dwillemsen@google.com>
Tue, 13 Sep 2016 04:34:12 +0000 (21:34 -0700)
Change-Id: Ic5c6dd33569fbdae9e236fe2bf5bd30bea038cbf

1  2 
audio_utils/Android.bp
audio_utils/tests/Android.bp

index 0000000,c198d7a..6c19504
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,102 +1,102 @@@
 -        "fifo.c",
+ subdirs = ["tests"]
+ cc_defaults {
+     name: "audio_utils_defaults",
+     local_include_dirs: ["include"],
+     export_include_dirs: ["include"],
+     cflags: [
+         "-Werror",
+         "-Wall",
+     ],
+ }
+ cc_library {
+     name: "libaudioutils",
+     host_supported: true,
+     defaults: ["audio_utils_defaults"],
+     srcs: [
+         "channels.c",
 -        "fifo.c",
++        "fifo.cpp",
+         "format.c",
+         "limiter.c",
+         "minifloat.c",
+         "primitives.c",
+         "roundup.c",
+     ],
+     shared_libs: [
+         "libcutils",
+         "liblog",
+     ],
+     target: {
+         android: {
+             srcs: [
+                 "conversion.cpp",
+                 "resampler.c",
+                 "echo_reference.c",
+             ],
+             whole_static_libs: ["libaudioutils_fixedfft"],
+             shared_libs: [
+                 "libspeexresampler",
+             ],
+         },
+         host: {
+             cflags: ["-D__unused='__attribute__((unused))'"],
+         },
+     },
+ }
+ cc_library_static {
+     name: "libaudioutils_fixedfft",
+     defaults: ["audio_utils_defaults"],
+     arch: {
+         arm: {
+             instruction_set: "arm",
+         },
+     },
+     srcs: ["fixedfft.cpp"],
+ }
+ cc_library_static {
+     name: "libsndfile",
+     defaults: ["audio_utils_defaults"],
+     host_supported: true,
+     srcs: ["tinysndfile.c"],
+     cflags: [
+         "-UHAVE_STDERR",
+     ],
+ }
+ cc_library_static {
+     name: "libfifo",
+     defaults: ["audio_utils_defaults"],
+     srcs: [
++        "fifo.cpp",
+         "primitives.c",
+         "roundup.c",
+     ],
+ }
+ cc_library_shared {
+     name: "libaudiospdif",
+     defaults: ["audio_utils_defaults"],
+     srcs: [
+         "spdif/BitFieldParser.cpp",
+         "spdif/FrameScanner.cpp",
+         "spdif/AC3FrameScanner.cpp",
+         "spdif/DTSFrameScanner.cpp",
+         "spdif/SPDIFEncoder.cpp",
+     ],
+     shared_libs: [
+         "libcutils",
+         "liblog",
+     ],
+ }
index 0000000,2d5f1a4..1bda5b8
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,46 +1,64 @@@
+ // Build the unit tests for audio_utils
+ cc_test {
+     name: "primitives_tests",
+     host_supported: true,
+     shared_libs: [
+         "liblog",
+         "libcutils",
+     ],
+     srcs: ["primitives_tests.cpp"],
+     cflags: [
+         "-Werror",
+         "-Wall",
+     ],
+     target: {
+         android: {
+             shared_libs: ["libaudioutils"],
+         },
+         host: {
+             static_libs: ["libaudioutils"],
+         },
+     }
+ }
+ cc_binary {
+     name: "fifo_tests",
+     host_supported: true,
+     srcs: ["fifo_tests.cpp"],
+     shared_libs: ["libaudioutils"],
+     static_libs: ["libsndfile"],
+     cflags: [
+         "-Werror",
+         "-Wall",
+     ],
+ }
+ cc_binary_host {
++    name: "fifo_threads",
++    // TODO move getch.c and .h to a utility library
++    srcs: [
++        "fifo_threads.cpp",
++        "getch.c",
++    ],
++    static_libs: [
++        "libaudioutils",
++        "liblog",
++    ],
++    cflags: [
++        "-Werror",
++        "-Wall",
++    ],
++}
++
++cc_binary_host {
+     name: "limiter_tests",
+     srcs: ["limiter_tests.c"],
+     static_libs: ["libaudioutils"],
+     cflags: [
+         "-Werror",
+         "-Wall",
++        "-UNDEBUG",
+     ],
+ }