AudioStreamPlayer3D.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="AudioStreamPlayer3D" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
  3. <brief_description>
  4. Plays 3D sound in 3D space
  5. </brief_description>
  6. <description>
  7. Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space.
  8. </description>
  9. <tutorials>
  10. http://docs.godotengine.org/en/latest/learning/features/audio/index.html
  11. </tutorials>
  12. <demos>
  13. </demos>
  14. <methods>
  15. <method name="get_area_mask" qualifiers="const">
  16. <return type="int">
  17. </return>
  18. <description>
  19. </description>
  20. </method>
  21. <method name="get_attenuation_filter_cutoff_hz" qualifiers="const">
  22. <return type="float">
  23. </return>
  24. <description>
  25. </description>
  26. </method>
  27. <method name="get_attenuation_filter_db" qualifiers="const">
  28. <return type="float">
  29. </return>
  30. <description>
  31. </description>
  32. </method>
  33. <method name="get_attenuation_model" qualifiers="const">
  34. <return type="int" enum="AudioStreamPlayer3D.AttenuationModel">
  35. </return>
  36. <description>
  37. </description>
  38. </method>
  39. <method name="get_bus" qualifiers="const">
  40. <return type="String">
  41. </return>
  42. <description>
  43. </description>
  44. </method>
  45. <method name="get_doppler_tracking" qualifiers="const">
  46. <return type="int" enum="AudioStreamPlayer3D.DopplerTracking">
  47. </return>
  48. <description>
  49. </description>
  50. </method>
  51. <method name="get_emission_angle" qualifiers="const">
  52. <return type="float">
  53. </return>
  54. <description>
  55. </description>
  56. </method>
  57. <method name="get_emission_angle_filter_attenuation_db" qualifiers="const">
  58. <return type="float">
  59. </return>
  60. <description>
  61. </description>
  62. </method>
  63. <method name="get_max_db" qualifiers="const">
  64. <return type="float">
  65. </return>
  66. <description>
  67. </description>
  68. </method>
  69. <method name="get_max_distance" qualifiers="const">
  70. <return type="float">
  71. </return>
  72. <description>
  73. </description>
  74. </method>
  75. <method name="get_out_of_range_mode" qualifiers="const">
  76. <return type="int" enum="AudioStreamPlayer3D.OutOfRangeMode">
  77. </return>
  78. <description>
  79. </description>
  80. </method>
  81. <method name="get_playback_position">
  82. <return type="float">
  83. </return>
  84. <description>
  85. Returns the position in the [AudioStream].
  86. </description>
  87. </method>
  88. <method name="get_stream" qualifiers="const">
  89. <return type="AudioStream">
  90. </return>
  91. <description>
  92. </description>
  93. </method>
  94. <method name="get_unit_db" qualifiers="const">
  95. <return type="float">
  96. </return>
  97. <description>
  98. </description>
  99. </method>
  100. <method name="get_unit_size" qualifiers="const">
  101. <return type="float">
  102. </return>
  103. <description>
  104. </description>
  105. </method>
  106. <method name="is_autoplay_enabled">
  107. <return type="bool">
  108. </return>
  109. <description>
  110. </description>
  111. </method>
  112. <method name="is_emission_angle_enabled" qualifiers="const">
  113. <return type="bool">
  114. </return>
  115. <description>
  116. </description>
  117. </method>
  118. <method name="is_playing" qualifiers="const">
  119. <return type="bool">
  120. </return>
  121. <description>
  122. </description>
  123. </method>
  124. <method name="play">
  125. <return type="void">
  126. </return>
  127. <argument index="0" name="from_position" type="float" default="0.0">
  128. </argument>
  129. <description>
  130. Plays the audio from the given position 'from_position', in seconds.
  131. </description>
  132. </method>
  133. <method name="seek">
  134. <return type="void">
  135. </return>
  136. <argument index="0" name="to_position" type="float">
  137. </argument>
  138. <description>
  139. Sets the position from which audio will be played, in seconds.
  140. </description>
  141. </method>
  142. <method name="set_area_mask">
  143. <return type="void">
  144. </return>
  145. <argument index="0" name="mask" type="int">
  146. </argument>
  147. <description>
  148. </description>
  149. </method>
  150. <method name="set_attenuation_filter_cutoff_hz">
  151. <return type="void">
  152. </return>
  153. <argument index="0" name="degrees" type="float">
  154. </argument>
  155. <description>
  156. </description>
  157. </method>
  158. <method name="set_attenuation_filter_db">
  159. <return type="void">
  160. </return>
  161. <argument index="0" name="db" type="float">
  162. </argument>
  163. <description>
  164. </description>
  165. </method>
  166. <method name="set_attenuation_model">
  167. <return type="void">
  168. </return>
  169. <argument index="0" name="model" type="int" enum="AudioStreamPlayer3D.AttenuationModel">
  170. </argument>
  171. <description>
  172. </description>
  173. </method>
  174. <method name="set_autoplay">
  175. <return type="void">
  176. </return>
  177. <argument index="0" name="enable" type="bool">
  178. </argument>
  179. <description>
  180. </description>
  181. </method>
  182. <method name="set_bus">
  183. <return type="void">
  184. </return>
  185. <argument index="0" name="bus" type="String">
  186. </argument>
  187. <description>
  188. </description>
  189. </method>
  190. <method name="set_doppler_tracking">
  191. <return type="void">
  192. </return>
  193. <argument index="0" name="mode" type="int" enum="AudioStreamPlayer3D.DopplerTracking">
  194. </argument>
  195. <description>
  196. </description>
  197. </method>
  198. <method name="set_emission_angle">
  199. <return type="void">
  200. </return>
  201. <argument index="0" name="degrees" type="float">
  202. </argument>
  203. <description>
  204. </description>
  205. </method>
  206. <method name="set_emission_angle_enabled">
  207. <return type="void">
  208. </return>
  209. <argument index="0" name="enabled" type="bool">
  210. </argument>
  211. <description>
  212. </description>
  213. </method>
  214. <method name="set_emission_angle_filter_attenuation_db">
  215. <return type="void">
  216. </return>
  217. <argument index="0" name="db" type="float">
  218. </argument>
  219. <description>
  220. </description>
  221. </method>
  222. <method name="set_max_db">
  223. <return type="void">
  224. </return>
  225. <argument index="0" name="max_db" type="float">
  226. </argument>
  227. <description>
  228. </description>
  229. </method>
  230. <method name="set_max_distance">
  231. <return type="void">
  232. </return>
  233. <argument index="0" name="metres" type="float">
  234. </argument>
  235. <description>
  236. </description>
  237. </method>
  238. <method name="set_out_of_range_mode">
  239. <return type="void">
  240. </return>
  241. <argument index="0" name="mode" type="int" enum="AudioStreamPlayer3D.OutOfRangeMode">
  242. </argument>
  243. <description>
  244. </description>
  245. </method>
  246. <method name="set_stream">
  247. <return type="void">
  248. </return>
  249. <argument index="0" name="stream" type="AudioStream">
  250. </argument>
  251. <description>
  252. </description>
  253. </method>
  254. <method name="set_unit_db">
  255. <return type="void">
  256. </return>
  257. <argument index="0" name="unit_db" type="float">
  258. </argument>
  259. <description>
  260. </description>
  261. </method>
  262. <method name="set_unit_size">
  263. <return type="void">
  264. </return>
  265. <argument index="0" name="unit_size" type="float">
  266. </argument>
  267. <description>
  268. </description>
  269. </method>
  270. <method name="stop">
  271. <return type="void">
  272. </return>
  273. <description>
  274. Stops the audio.
  275. </description>
  276. </method>
  277. </methods>
  278. <members>
  279. <member name="area_mask" type="int" setter="set_area_mask" getter="get_area_mask">
  280. Areas in which this sound plays.
  281. </member>
  282. <member name="attenuation_filter_cutoff_hz" type="float" setter="set_attenuation_filter_cutoff_hz" getter="get_attenuation_filter_cutoff_hz">
  283. Dampens audio above this frequency, in Hz.
  284. </member>
  285. <member name="attenuation_filter_db" type="float" setter="set_attenuation_filter_db" getter="get_attenuation_filter_db">
  286. Amount how much the filter affects the loudness, in dB.
  287. </member>
  288. <member name="attenuation_model" type="int" setter="set_attenuation_model" getter="get_attenuation_model" enum="AudioStreamPlayer3D.AttenuationModel">
  289. Decides if audio should get quieter with distance linearly, quadratically or logarithmically.
  290. </member>
  291. <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled">
  292. If [code]true[/code] audio plays when added to scene tree. Default value: [code]false[/code].
  293. </member>
  294. <member name="bus" type="String" setter="set_bus" getter="get_bus">
  295. Bus on which this audio is playing.
  296. </member>
  297. <member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="AudioStreamPlayer3D.DopplerTracking">
  298. Decides in which step the Doppler effect should be calculated.
  299. </member>
  300. <member name="emission_angle_degrees" type="float" setter="set_emission_angle" getter="get_emission_angle">
  301. The angle in which the audio reaches cameras undampened.
  302. </member>
  303. <member name="emission_angle_enabled" type="bool" setter="set_emission_angle_enabled" getter="is_emission_angle_enabled">
  304. If [code]true[/code] the audio should be dampened according to the direction of the sound.
  305. </member>
  306. <member name="emission_angle_filter_attenuation_db" type="float" setter="set_emission_angle_filter_attenuation_db" getter="get_emission_angle_filter_attenuation_db">
  307. dampens audio if camera is outside of 'emission_angle_degrees' and 'emission_angle_enabled' is set by this factor, in dB.
  308. </member>
  309. <member name="max_db" type="float" setter="set_max_db" getter="get_max_db">
  310. Sets the absolute maximum of the soundlevel, in dB.
  311. </member>
  312. <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance">
  313. Sets the distance from which the 'out_of_range_mode' takes effect. Has no effect if set to 0.
  314. </member>
  315. <member name="out_of_range_mode" type="int" setter="set_out_of_range_mode" getter="get_out_of_range_mode" enum="AudioStreamPlayer3D.OutOfRangeMode">
  316. Decides if audio should pause when source is outside of 'max_distance' range.
  317. </member>
  318. <member name="playing" type="bool" setter="_set_playing" getter="is_playing">
  319. If [code]true[/code], audio is playing.
  320. </member>
  321. <member name="stream" type="AudioStream" setter="set_stream" getter="get_stream">
  322. The [AudioStream] object to be played.
  323. </member>
  324. <member name="unit_db" type="float" setter="set_unit_db" getter="get_unit_db">
  325. Base sound level unaffected by dampening, in dB.
  326. </member>
  327. <member name="unit_size" type="float" setter="set_unit_size" getter="get_unit_size">
  328. Factor for the attenuation effect.
  329. </member>
  330. </members>
  331. <signals>
  332. <signal name="finished">
  333. <description>
  334. Fires when the audio stops playing.
  335. </description>
  336. </signal>
  337. </signals>
  338. <constants>
  339. <constant name="ATTENUATION_INVERSE_DISTANCE" value="0">
  340. Linear dampening of loudness according to distance.
  341. </constant>
  342. <constant name="ATTENUATION_INVERSE_SQUARE_DISTANCE" value="1">
  343. Squared dampening of loudness according to distance.
  344. </constant>
  345. <constant name="ATTENUATION_LOGARITHMIC" value="2">
  346. Logarithmic dampening of loudness according to distance.
  347. </constant>
  348. <constant name="OUT_OF_RANGE_MIX" value="0">
  349. Mix this audio in, even when it's out of range.
  350. </constant>
  351. <constant name="OUT_OF_RANGE_PAUSE" value="1">
  352. Pause this audio when it gets out of range.
  353. </constant>
  354. <constant name="DOPPLER_TRACKING_DISABLED" value="0">
  355. Disables doppler tracking.
  356. </constant>
  357. <constant name="DOPPLER_TRACKING_IDLE_STEP" value="1">
  358. Executes doppler tracking in idle step.
  359. </constant>
  360. <constant name="DOPPLER_TRACKING_PHYSICS_STEP" value="2">
  361. Executes doppler tracking in physics step.
  362. </constant>
  363. </constants>
  364. </class>