Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
ResourceImporterMP3
繼承: ResourceImporter < RefCounted < Object
匯入 MP3 音訊檔案以供播放。
說明
MP3 是一種有損音訊格式,在相同位元率下音質不如 ResourceImporterOggVorbis。
大多數情況下建議使用 Ogg Vorbis;不過若只有 MP3 音源且沒有更高品質版本,直接使用該 MP3 可避免兩次有損壓縮。
解碼 MP3 所需的 CPU 時間比 ResourceImporterWAV 多。若需同時播放大量音效,特別是在低階裝置上,建議改用 WAV。
教學
屬性
|
||
|
||
|
||
|
||
|
屬性說明
The number of beats within a single bar in the audio track. This is only relevant for music that wishes to make use of interactive music functionality, not sound effects.
A more convenient editor for bar_beats is provided in the Advanced Import Settings dialog, as it lets you preview your changes without having to reimport the audio.
The length of the audio track, in beats. The actual duration of the audio file might be longer than what is indicated by this property. This is only relevant for music that wishes to make use of interactive music functionality, not sound effects.
A more convenient editor for beat_count is provided in the Advanced Import Settings dialog, as it lets you preview your changes without having to reimport the audio.
The tempo of the audio track, measured in beats per minute. This should match the BPM measure that was used to compose the track. This is only relevant for music that wishes to make use of interactive music functionality, not sound effects.
A more convenient editor for bpm is provided in the Advanced Import Settings dialog, as it lets you preview your changes without having to reimport the audio.
If enabled, the audio will begin playing either from the beginning or from loop_offset, after playback ends by either reaching the end of the audio or reaching the end of the last beat according to the amount specified in beat_count.
Note: In AudioStreamPlayer, the AudioStreamPlayer.finished signal won't be emitted for looping audio when it reaches the end of the audio file, as the audio will keep playing indefinitely.
決定當播放到結尾後,音訊從何處開始迴圈。可僅重複音訊檔案的某一段,對部分環境音效或音樂十分實用。此值以秒為單位,從音訊開頭算起;0.0 代表整個檔案皆迴圈。
僅當 loop 為 true 時生效。
進階匯入設定 對話方塊提供了更方便的 loop_offset 編輯器,可讓你在不重新匯入音訊的情況下預覽變更。