ResourceImporterOggVorbis

Hérite de : ResourceImporter < RefCounted < Object

Importe un fichier audio Ogg Vorbis pour la lecture.

Description

Ogg Vorbis est un format audio avec pertes, d'une meilleure qualité audio que ResourceImporterMP3 à un bitrate donné.

Dans la plupart des cas, il est recommandé d'utiliser Ogg Vorbis au lieu de MP3. Cependant, si vous utilisez une source de son MP3 sans source de qualité supérieure disponible, il est recommandé d'utiliser le fichier MP3 directement pour éviter une compression avec double perte.

Ogg Vorbis nécessite plus de CPU pour décoder que ResourceImporterWAV. Si vous avez besoin de jouer beaucoup de sons simultanés, il est recommandé d'utiliser WAV pour ces sons plutôt, surtout si vous ciblez des appareils bas de gamme.

Tutoriels

Propriétés

int

bar_beats

4

int

beat_count

0

float

bpm

0

bool

loop

false

float

loop_offset

0

Méthodes

AudioStreamOggVorbis

load_from_buffer(stream_data: PackedByteArray) static

AudioStreamOggVorbis

load_from_file(path: String) static


Descriptions des propriétés

int bar_beats = 4 🔗

Le nombre de mesures dans un seul battement de la piste audio. Ceci n'est pertinent que pour la musique qui souhaite utiliser la fonctionnalité de musique interactive, pas les effets sonores.

Un éditeur plus pratique pour bar_beats est fourni dans la boîte de dialogue Paramètres d'import avancés, car il vous permet de prévisualiser vos changements sans avoir à réimporter l'audio.


int beat_count = 0 🔗

The beat count of 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 beat_count is provided in the Advanced Import Settings dialog, as it lets you preview your changes without having to reimport the audio.


float bpm = 0 🔗

The beats per minute of the audio track. 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.


bool loop = false 🔗

If enabled, the audio will begin playing at the beginning after playback ends by reaching the end of the audio.

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.


float loop_offset = 0 🔗

Determines where audio will start to loop after playback reaches the end of the audio. This can be used to only loop a part of the audio file, which is useful for some ambient sounds or music. The value is determined in seconds relative to the beginning of the audio. A value of 0.0 will loop the entire audio file.

Only has an effect if loop is true.

A more convenient editor for loop_offset is provided in the Advanced Import Settings dialog, as it lets you preview your changes without having to reimport the audio.


Descriptions des méthodes

AudioStreamOggVorbis load_from_buffer(stream_data: PackedByteArray) static 🔗

Obsolète : Use AudioStreamOggVorbis.load_from_buffer() instead.

Crée une nouvelle instance AudioStreamOggVorbis depuis le tampon donné. Le tampon doit contenir des données Ogg Vorbis.


AudioStreamOggVorbis load_from_file(path: String) static 🔗

Obsolète : Use AudioStreamOggVorbis.load_from_file() instead.

Crée une nouvelle instance AudioStreamOggVorbis depuis le chemin de fichier donné. Le fichier doit être au format Ogg Vorbis.