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.

ResourceImporterMP3

Hereda: ResourceImporter < RefCounted < Object

Importa un archivo de audio MP3 para reproducción.

Descripción

MP3 es un formato de audio con pérdida, con peor calidad de audio en comparación con ResourceImporterOggVorbis a una tasa de bits dada.

En la mayoría de los casos, se recomienda usar Ogg Vorbis sobre MP3. Sin embargo, si estás utilizando una fuente de sonido MP3 sin una fuente de mayor calidad disponible, entonces se recomienda usar el archivo MP3 directamente para evitar la doble compresión con pérdida.

MP3 requiere más CPU para decodificar que ResourceImporterWAV. Si necesitas reproducir muchos sonidos simultáneos, se recomienda usar WAV para esos sonidos en su lugar, especialmente si se apunta a dispositivos de gama baja.

Tutoriales

Propiedades

int

bar_beats

4

int

beat_count

0

float

bpm

0

bool

loop

false

float

loop_offset

0


Descripciones de Propiedades

int bar_beats = 4 🔗

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.


int beat_count = 0 🔗

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.


float bpm = 0 🔗

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.


bool loop = false 🔗

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.


float loop_offset = 0 🔗

Determina dónde comenzará a repetirse el audio después de que la reproducción llegue al final del audio. Esto se puede usar para solo repetir una parte del archivo de audio, lo cual es útil para algunos sonidos o música ambientales. El valor se determina en segundos en relación con el principio del audio. Un valor de 0.0 repetirá todo el archivo de audio.

Solo tiene efecto si loop es true.

Un editor más conveniente para loop_offset se proporciona en el diálogo Configuración avanzada de importación, ya que te permite previsualizar tus cambios sin tener que volver a importar el audio.