Native interface to AudioService
Implement a native interface to communicate with
AudioService implemented in Java
Define transaction IDs for all methods, but comment
out the ones for the methods that are not implemented.
Implement the methods for PlayerBase tracking.
Test: make, related SL ES test coming
Bug: 30955183
Change-Id: I9f9bbad7c07743cdd8957cf5b8b151a8aead53b3
diff --git a/include/audiomanager/AudioManager.h b/include/audiomanager/AudioManager.h
new file mode 100644
index 0000000..d561594
--- /dev/null
+++ b/include/audiomanager/AudioManager.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_AUDIOMANAGER_H
+#define ANDROID_AUDIOMANAGER_H
+
+namespace android {
+
+// must be kept in sync with definitions in AudioPlaybackConfiguration.java
+
+#define PLAYER_PIID_INVALID -1
+
+enum {
+ PLAYER_TYPE_SLES_AUDIOPLAYER_BUFFERQUEUE = 11,
+ PLAYER_TYPE_SLES_AUDIOPLAYER_URI_FD = 12,
+};
+
+enum {
+ PLAYER_STATE_UNKNOWN = -1,
+ PLAYER_STATE_RELEASED = 0,
+ PLAYER_STATE_IDLE = 1,
+ PLAYER_STATE_STARTED = 2,
+ PLAYER_STATE_PAUSED = 3,
+ PLAYER_STATE_STOPPED = 4,
+};
+
+}; // namespace android
+
+#endif // ANDROID_AUDIOMANAGER_H