.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. .. _class_SampleLibrary: SampleLibrary ============= **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` **Category:** Core Brief Description ----------------- Library that contains a collection of samples. Member Functions ---------------- +------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_sample` **(** :ref:`String` name, :ref:`Sample` sample **)** | +------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Sample` | :ref:`get_sample` **(** :ref:`String` name **)** const | +------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_sample` **(** :ref:`String` name **)** const | +------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_sample` **(** :ref:`String` name **)** | +------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`sample_set_volume_db` **(** :ref:`String` name, :ref:`float` db **)** | +------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`sample_get_volume_db` **(** :ref:`String` name **)** const | +------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`sample_set_pitch_scale` **(** :ref:`String` name, :ref:`float` pitch **)** | +------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`sample_get_pitch_scale` **(** :ref:`String` name **)** const | +------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ Description ----------- Library that contains a collection of :ref:`Sample`, each identified by a text ID. This is used as a data container for the majority of the SamplePlayer classes and derivatives. Member Function Description --------------------------- .. _class_SampleLibrary_add_sample: - void **add_sample** **(** :ref:`String` name, :ref:`Sample` sample **)** Add a sample to the library, with a given text ID. .. _class_SampleLibrary_get_sample: - :ref:`Sample` **get_sample** **(** :ref:`String` name **)** const Return the sample from the library matching the given text ID. Return null if the sample is not found. .. _class_SampleLibrary_has_sample: - :ref:`bool` **has_sample** **(** :ref:`String` name **)** const Return true if the sample text ID exists in the library. .. _class_SampleLibrary_remove_sample: - void **remove_sample** **(** :ref:`String` name **)** Remove the sample matching the given text ID. .. _class_SampleLibrary_sample_set_volume_db: - void **sample_set_volume_db** **(** :ref:`String` name, :ref:`float` db **)** Set the volume (in dB) for the given sample. .. _class_SampleLibrary_sample_get_volume_db: - :ref:`float` **sample_get_volume_db** **(** :ref:`String` name **)** const Return the volume (in dB) for the given sample. .. _class_SampleLibrary_sample_set_pitch_scale: - void **sample_set_pitch_scale** **(** :ref:`String` name, :ref:`float` pitch **)** Set the pitch scale for the given sample. .. _class_SampleLibrary_sample_get_pitch_scale: - :ref:`float` **sample_get_pitch_scale** **(** :ref:`String` name **)** const Return the pitch scale for the given sample.