audio_opensles.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* Copyright (C) 2012 Doubango Telecom <http://www.doubango.org>
  2. *
  3. * This file is part of Open Source Doubango Framework.
  4. *
  5. * DOUBANGO is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * DOUBANGO is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with DOUBANGO.
  17. */
  18. #ifndef _DOUBANGO_AUDIO_OPENSLES_H
  19. #define _DOUBANGO_AUDIO_OPENSLES_H
  20. #include "audio_opensles_config.h"
  21. #include "tsk_plugin.h"
  22. AUDIO_OPENSLES_BEGIN_DECLS
  23. typedef void audio_opensles_instance_handle_t;
  24. AUDIO_OPENSLES_API int __plugin_get_def_count();
  25. AUDIO_OPENSLES_API tsk_plugin_def_type_t __plugin_get_def_type_at(int index);
  26. AUDIO_OPENSLES_API tsk_plugin_def_media_type_t __plugin_get_def_media_type_at(int index);
  27. AUDIO_OPENSLES_API tsk_plugin_def_ptr_const_t __plugin_get_def_at(int index);
  28. audio_opensles_instance_handle_t* audio_opensles_instance_create(uint64_t session_id);
  29. int audio_opensles_instance_prepare_consumer(audio_opensles_instance_handle_t* self, struct tmedia_consumer_s** consumer);
  30. int audio_opensles_instance_prepare_producer(audio_opensles_instance_handle_t* _self, struct tmedia_producer_s** producer);
  31. int audio_opensles_instance_start_consumer(audio_opensles_instance_handle_t* self);
  32. int audio_opensles_instance_start_producer(audio_opensles_instance_handle_t* self);
  33. int audio_opensles_instance_stop_consumer(audio_opensles_instance_handle_t* self);
  34. int audio_opensles_instance_stop_producer(audio_opensles_instance_handle_t* self);
  35. int audio_opensles_instance_set_speakerOn(audio_opensles_instance_handle_t* self, bool speakerOn);
  36. int audio_opensles_instance_set_microphone_volume(audio_opensles_instance_handle_t* self, int32_t volume);
  37. int audio_opensles_instance_destroy(audio_opensles_instance_handle_t** self);
  38. AUDIO_OPENSLES_END_DECLS
  39. #endif /* _DOUBANGO_AUDIO_OPENSLES_H */