AUD_Source.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*******************************************************************************
  2. * Copyright 2009-2015 Juan Francisco Crespo Galán
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. ******************************************************************************/
  16. #pragma once
  17. #include "AUD_Types.h"
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. /**
  22. * Creates a new Source object.
  23. * \param azimuth The azimuth angle.
  24. * \param elevation The elevation angle.
  25. * \param elevation The distance value. [0,1]
  26. * \return The new Source object.
  27. */
  28. extern AUD_API AUD_Source* AUD_Source_create(float azimuth, float elevation, float distance);
  29. /**
  30. * Deletes a Source object.
  31. * \param source The Source object to be deleted.
  32. */
  33. extern AUD_API void AUD_Source_free(AUD_Source* source);
  34. /**
  35. * Retrieves the azimuth angle of a Source object.
  36. * \param source The Source object.
  37. * \return The azimuth angle.
  38. */
  39. extern AUD_API float AUD_Source_getAzimuth(AUD_Source* source);
  40. /**
  41. * Retrieves the elevation angle oa a Source object.
  42. * \param source The Source object.
  43. * \return The elevation angle.
  44. */
  45. extern AUD_API float AUD_Source_getElevation(AUD_Source* source);
  46. /**
  47. * Retrieves the distance of a Source object. [0,1]
  48. * \param source The Source object.
  49. * \return The distance.
  50. */
  51. extern AUD_API float AUD_Source_getDistance(AUD_Source* distance);
  52. /**
  53. * Changes the azimuth angle of a Source object.
  54. * \param source The Source object.
  55. * \param azimuth The azimuth angle.
  56. */
  57. extern AUD_API void AUD_Source_setAzimuth(AUD_Source* source, float azimuth);
  58. /**
  59. * Changes the elevation angle of a Source object.
  60. * \param source The Source object.
  61. * \param elevation The elevation angle.
  62. */
  63. extern AUD_API void AUD_Source_setElevation(AUD_Source* source, float elevation);
  64. /**
  65. * Changes the distance of a Source object. [0,1]
  66. * \param source The Source object.
  67. * \param distance The distance.
  68. */
  69. extern AUD_API void AUD_Source_setDistance(AUD_Source* source, float distance);
  70. #ifdef __cplusplus
  71. }
  72. #endif