Componentize SkAudioPlayer

Relocate under modules/audioplayer and package as a standalone
component.

Change-Id: If9dc72bb0abe170049a514c9931186703a3c138a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310058
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Reed <reed@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index 12feeff..2b2e47a 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -459,7 +459,6 @@
       # AppKit symbols NSFontWeightXXX may be dlsym'ed.
       "AppKit.framework",
       "ApplicationServices.framework",
-      "AVFoundation.framework",
     ]
   }
 
@@ -2505,7 +2504,6 @@
     test_app("viewer") {
       is_shared_library = is_android
       sources = [
-        "src/ports/SkAudioPlayer.cpp",
         "tools/viewer/AnimTimer.h",
         "tools/viewer/BisectSlide.cpp",
         "tools/viewer/GMSlide.cpp",
@@ -2539,6 +2537,7 @@
         ":tool_utils",
         ":trace",
         "experimental/skrive",
+        "modules/audioplayer",
         "modules/particles",
         "modules/skottie",
         "modules/skottie:utils",
@@ -2558,11 +2557,6 @@
           "//third_party/spirv-tools:spvtools_val",
         ]
       }
-      if (is_mac) {
-        sources += [ "src/ports/SkAudioPlayer_mac.mm" ]
-      } else {
-        sources += [ "src/ports/SkAudioPlayer_none.cpp" ]
-      }
     }
   }