Loading media/libaaudio/include/aaudio/AAudioTesting.h +6 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,12 @@ enum { }; typedef int32_t aaudio_policy_t; // Internal error codes. Only used by the framework. enum { AAUDIO_INTERNAL_ERROR_BASE = -1000, AAUDIO_ERROR_STANDBY, }; /** * Control whether AAudioStreamBuilder_openStream() will use the new MMAP data path * or the older "Legacy" data path. Loading media/libaaudio/src/binding/AAudioBinderAdapter.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -124,4 +124,16 @@ aaudio_result_t AAudioBinderAdapter::unregisterAudioThread(aaudio_handle_t strea return result; } aaudio_result_t AAudioBinderAdapter::exitStandby(aaudio_handle_t streamHandle, AudioEndpointParcelable &endpointOut) { aaudio_result_t result; Endpoint endpoint; Status status = mDelegate->exitStandby(streamHandle, &endpoint, &result); if (!status.isOk()) { result = AAudioConvert_androidToAAudioResult(statusTFromBinderStatus(status)); } endpointOut = std::move(endpoint); return result; } } // namespace aaudio media/libaaudio/src/binding/AAudioBinderAdapter.h +3 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,9 @@ public: aaudio_result_t unregisterAudioThread(aaudio_handle_t streamHandle, pid_t clientThreadId) override; aaudio_result_t exitStandby(aaudio_handle_t streamHandle, AudioEndpointParcelable &parcelable) override; private: IAAudioService* const mDelegate; }; Loading media/libaaudio/src/binding/AAudioBinderClient.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -201,3 +201,11 @@ aaudio_result_t AAudioBinderClient::unregisterAudioThread(aaudio_handle_t stream return service->unregisterAudioThread(streamHandle, clientThreadId); } aaudio_result_t AAudioBinderClient::exitStandby(aaudio_handle_t streamHandle, AudioEndpointParcelable &endpointOut) { std::shared_ptr<AAudioServiceInterface> service = getAAudioService(); if (service.get() == nullptr) return AAUDIO_ERROR_NO_SERVICE; return service->exitStandby(streamHandle, endpointOut); } media/libaaudio/src/binding/AAudioBinderClient.h +3 −0 Original line number Diff line number Diff line Loading @@ -108,6 +108,9 @@ public: return AAUDIO_ERROR_UNAVAILABLE; } aaudio_result_t exitStandby(aaudio_handle_t streamHandle, AudioEndpointParcelable &endpointOut) override; void onStreamChange(aaudio_handle_t /*handle*/, int32_t /*opcode*/, int32_t /*value*/) { // TODO This is just a stub so we can have a client Binder to pass to the service. // TODO Implemented in a later CL. Loading Loading
media/libaaudio/include/aaudio/AAudioTesting.h +6 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,12 @@ enum { }; typedef int32_t aaudio_policy_t; // Internal error codes. Only used by the framework. enum { AAUDIO_INTERNAL_ERROR_BASE = -1000, AAUDIO_ERROR_STANDBY, }; /** * Control whether AAudioStreamBuilder_openStream() will use the new MMAP data path * or the older "Legacy" data path. Loading
media/libaaudio/src/binding/AAudioBinderAdapter.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -124,4 +124,16 @@ aaudio_result_t AAudioBinderAdapter::unregisterAudioThread(aaudio_handle_t strea return result; } aaudio_result_t AAudioBinderAdapter::exitStandby(aaudio_handle_t streamHandle, AudioEndpointParcelable &endpointOut) { aaudio_result_t result; Endpoint endpoint; Status status = mDelegate->exitStandby(streamHandle, &endpoint, &result); if (!status.isOk()) { result = AAudioConvert_androidToAAudioResult(statusTFromBinderStatus(status)); } endpointOut = std::move(endpoint); return result; } } // namespace aaudio
media/libaaudio/src/binding/AAudioBinderAdapter.h +3 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,9 @@ public: aaudio_result_t unregisterAudioThread(aaudio_handle_t streamHandle, pid_t clientThreadId) override; aaudio_result_t exitStandby(aaudio_handle_t streamHandle, AudioEndpointParcelable &parcelable) override; private: IAAudioService* const mDelegate; }; Loading
media/libaaudio/src/binding/AAudioBinderClient.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -201,3 +201,11 @@ aaudio_result_t AAudioBinderClient::unregisterAudioThread(aaudio_handle_t stream return service->unregisterAudioThread(streamHandle, clientThreadId); } aaudio_result_t AAudioBinderClient::exitStandby(aaudio_handle_t streamHandle, AudioEndpointParcelable &endpointOut) { std::shared_ptr<AAudioServiceInterface> service = getAAudioService(); if (service.get() == nullptr) return AAUDIO_ERROR_NO_SERVICE; return service->exitStandby(streamHandle, endpointOut); }
media/libaaudio/src/binding/AAudioBinderClient.h +3 −0 Original line number Diff line number Diff line Loading @@ -108,6 +108,9 @@ public: return AAUDIO_ERROR_UNAVAILABLE; } aaudio_result_t exitStandby(aaudio_handle_t streamHandle, AudioEndpointParcelable &endpointOut) override; void onStreamChange(aaudio_handle_t /*handle*/, int32_t /*opcode*/, int32_t /*value*/) { // TODO This is just a stub so we can have a client Binder to pass to the service. // TODO Implemented in a later CL. Loading