mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
186 lines
7.2 KiB
ReStructuredText
186 lines
7.2 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_AudioStreamPlaylist:
|
||
|
||
AudioStreamPlaylist
|
||
===================
|
||
|
||
**繼承:** :ref:`AudioStream<class_AudioStream>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||
|
||
包含子串流並以播放清單方式播放的 :ref:`AudioStream<class_AudioStream>`\ 。
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
屬性
|
||
----
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+---------------------------+----------------------------------------------------------------------+-----------+
|
||
| :ref:`float<class_float>` | :ref:`fade_time<class_AudioStreamPlaylist_property_fade_time>` | ``0.3`` |
|
||
+---------------------------+----------------------------------------------------------------------+-----------+
|
||
| :ref:`bool<class_bool>` | :ref:`loop<class_AudioStreamPlaylist_property_loop>` | ``true`` |
|
||
+---------------------------+----------------------------------------------------------------------+-----------+
|
||
| :ref:`bool<class_bool>` | :ref:`shuffle<class_AudioStreamPlaylist_property_shuffle>` | ``false`` |
|
||
+---------------------------+----------------------------------------------------------------------+-----------+
|
||
| :ref:`int<class_int>` | :ref:`stream_count<class_AudioStreamPlaylist_property_stream_count>` | ``0`` |
|
||
+---------------------------+----------------------------------------------------------------------+-----------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
方法
|
||
----
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`get_bpm<class_AudioStreamPlaylist_method_get_bpm>`\ (\ ) |const| |
|
||
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`AudioStream<class_AudioStream>` | :ref:`get_list_stream<class_AudioStreamPlaylist_method_get_list_stream>`\ (\ stream_index\: :ref:`int<class_int>`\ ) |const| |
|
||
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_list_stream<class_AudioStreamPlaylist_method_set_list_stream>`\ (\ stream_index\: :ref:`int<class_int>`, audio_stream\: :ref:`AudioStream<class_AudioStream>`\ ) |
|
||
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
常數
|
||
----
|
||
|
||
.. _class_AudioStreamPlaylist_constant_MAX_STREAMS:
|
||
|
||
.. rst-class:: classref-constant
|
||
|
||
**MAX_STREAMS** = ``64`` :ref:`🔗<class_AudioStreamPlaylist_constant_MAX_STREAMS>`
|
||
|
||
播放清單可支援的最大串流數量。
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
屬性說明
|
||
--------
|
||
|
||
.. _class_AudioStreamPlaylist_property_fade_time:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **fade_time** = ``0.3`` :ref:`🔗<class_AudioStreamPlaylist_property_fade_time>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_fade_time**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_fade_time**\ (\ )
|
||
|
||
當一個串流結束並轉到下一個時所使用的淡出時間。建議各串流在結尾保留些許額外音訊以利淡出。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_AudioStreamPlaylist_property_loop:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **loop** = ``true`` :ref:`🔗<class_AudioStreamPlaylist_property_loop>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_loop**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **has_loop**\ (\ )
|
||
|
||
若為 ``true``\ ,播放清單將循環播放;否則在最後一個串流播放完畢後停止。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_AudioStreamPlaylist_property_shuffle:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **shuffle** = ``false`` :ref:`🔗<class_AudioStreamPlaylist_property_shuffle>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_shuffle**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **get_shuffle**\ (\ )
|
||
|
||
若為 ``true``\ ,每次開始播放或重新循環時播放清單將重新隨機排序。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_AudioStreamPlaylist_property_stream_count:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **stream_count** = ``0`` :ref:`🔗<class_AudioStreamPlaylist_property_stream_count>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_stream_count**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_stream_count**\ (\ )
|
||
|
||
播放清單中的串流數量。
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
方法說明
|
||
--------
|
||
|
||
.. _class_AudioStreamPlaylist_method_get_bpm:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **get_bpm**\ (\ ) |const| :ref:`🔗<class_AudioStreamPlaylist_method_get_bpm>`
|
||
|
||
返回播放清單的 BPM,可能隨目前播放的片段而異。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_AudioStreamPlaylist_method_get_list_stream:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`AudioStream<class_AudioStream>` **get_list_stream**\ (\ stream_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_AudioStreamPlaylist_method_get_list_stream>`
|
||
|
||
返回指定播放位置索引處的串流。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_AudioStreamPlaylist_method_set_list_stream:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_list_stream**\ (\ stream_index\: :ref:`int<class_int>`, audio_stream\: :ref:`AudioStream<class_AudioStream>`\ ) :ref:`🔗<class_AudioStreamPlaylist_method_set_list_stream>`
|
||
|
||
設定指定播放位置索引處的串流。
|
||
|
||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要使用者覆寫才能生效。)`
|
||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||
.. |const| replace:: :abbr:`const (本方法沒有副作用。不會修改該實例的任何成員變數。)`
|
||
.. |vararg| replace:: :abbr:`vararg (本方法除了這裡描述的參數外,還可以接受任意數量的參數。)`
|
||
.. |constructor| replace:: :abbr:`constructor (本方法用於建構一個型別。)`
|
||
.. |static| replace:: :abbr:`static (本方法無需實例即可呼叫,因此可以直接使用類別名稱呼叫。)`
|
||
.. |operator| replace:: :abbr:`operator (本方法描述將本型別作為左運算元時可用的有效運算子。)`
|
||
.. |bitfield| replace:: :abbr:`BitField (此值是由下列旗標組成的位元遮罩整數。)`
|
||
.. |void| replace:: :abbr:`void (無回傳值。)`
|