0.2.0-dev Download ZIP
33 lines ·1.4 KB Raw
| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="AudioStreamPlaybackResampled" inherits="AudioStreamPlayback" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> |
| 3 | <brief_description> |
| 4 | Playback class used for resampled [AudioStream]s. |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | Playback class used to mix an [AudioStream]'s audio samples to [method AudioServer.get_mix_rate] using cubic interpolation. |
| 8 | </description> |
| 9 | <tutorials> |
| 10 | </tutorials> |
| 11 | <methods> |
| 12 | <method name="_get_stream_sampling_rate" qualifiers="virtual required const"> |
| 13 | <return type="float" /> |
| 14 | <description> |
| 15 | Returns an [AudioStream]'s sample rate, in Hz. Used to perform resampling. |
| 16 | </description> |
| 17 | </method> |
| 18 | <method name="_mix_resampled" qualifiers="virtual required"> |
| 19 | <return type="int" /> |
| 20 | <param index="0" name="dst_buffer" type="AudioFrame*" /> |
| 21 | <param index="1" name="frame_count" type="int" /> |
| 22 | <description> |
| 23 | Called by [method begin_resample] to mix an [AudioStream] to [method AudioServer.get_mix_rate]. Uses [method _get_stream_sampling_rate] as the source sample rate. Returns the number of mixed frames. |
| 24 | </description> |
| 25 | </method> |
| 26 | <method name="begin_resample"> |
| 27 | <return type="void" /> |
| 28 | <description> |
| 29 | Called when an [AudioStream] is played. Clears the cubic interpolation history and starts mixing by calling [method _mix_resampled]. |
| 30 | </description> |
| 31 | </method> |
| 32 | </methods> |
| 33 | </class> |