ppb_audio_output_api.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright (c) 2017 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef PPAPI_THUNK_PPB_AUDIO_OUTPUT_API_H_
  5. #define PPAPI_THUNK_PPB_AUDIO_OUTPUT_API_H_
  6. #include <stdint.h>
  7. #include "base/memory/ref_counted.h"
  8. #include "ppapi/c/dev/ppb_audio_output_dev.h"
  9. namespace ppapi {
  10. class TrackedCallback;
  11. namespace thunk {
  12. class PPB_AudioOutput_API {
  13. public:
  14. virtual ~PPB_AudioOutput_API() {}
  15. virtual int32_t EnumerateDevices(const PP_ArrayOutput& output,
  16. scoped_refptr<TrackedCallback> callback) = 0;
  17. virtual int32_t MonitorDeviceChange(PP_MonitorDeviceChangeCallback callback,
  18. void* user_data) = 0;
  19. virtual int32_t Open(PP_Resource device_ref,
  20. PP_Resource config,
  21. PPB_AudioOutput_Callback audio_output_callback,
  22. void* user_data,
  23. scoped_refptr<TrackedCallback> callback) = 0;
  24. virtual PP_Resource GetCurrentConfig() = 0;
  25. virtual PP_Bool StartPlayback() = 0;
  26. virtual PP_Bool StopPlayback() = 0;
  27. virtual void Close() = 0;
  28. };
  29. } // namespace thunk
  30. } // namespace ppapi
  31. #endif // PPAPI_THUNK_PPB_AUDIO_OUTPUT_API_H_