Skip to content

Latest commit

 

History

History
216 lines (129 loc) · 9.33 KB

class_audiostreamoggvorbis.rst

File metadata and controls

216 lines (129 loc) · 9.33 KB
github_url:hide

AudioStreamOggVorbis

Inherits: :ref:`AudioStream<class_AudioStream>` < :ref:`Resource<class_Resource>` < :ref:`RefCounted<class_RefCounted>` < :ref:`Object<class_Object>`

A class representing an Ogg Vorbis audio stream.

.. rst-class:: classref-introduction-group

Description

The AudioStreamOggVorbis class is a specialized :ref:`AudioStream<class_AudioStream>` for handling Ogg Vorbis file formats. It offers functionality for loading and playing back Ogg Vorbis files, as well as managing looping and other playback properties. This class is part of the audio stream system, which also supports WAV files through the :ref:`AudioStreamWAV<class_AudioStreamWAV>` class.

.. rst-class:: classref-introduction-group

Tutorials

.. rst-class:: classref-reftable-group

Properties

:ref:`int<class_int>` :ref:`bar_beats<class_AudioStreamOggVorbis_property_bar_beats>` 4
:ref:`int<class_int>` :ref:`beat_count<class_AudioStreamOggVorbis_property_beat_count>` 0
:ref:`float<class_float>` :ref:`bpm<class_AudioStreamOggVorbis_property_bpm>` 0.0
:ref:`bool<class_bool>` :ref:`loop<class_AudioStreamOggVorbis_property_loop>` false
:ref:`float<class_float>` :ref:`loop_offset<class_AudioStreamOggVorbis_property_loop_offset>` 0.0
:ref:`OggPacketSequence<class_OggPacketSequence>` :ref:`packet_sequence<class_AudioStreamOggVorbis_property_packet_sequence>`  
.. rst-class:: classref-reftable-group

Methods

:ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>` :ref:`load_from_buffer<class_AudioStreamOggVorbis_method_load_from_buffer>`(buffer: :ref:`PackedByteArray<class_PackedByteArray>`) |static|
:ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>` :ref:`load_from_file<class_AudioStreamOggVorbis_method_load_from_file>`(path: :ref:`String<class_String>`) |static|
.. rst-class:: classref-section-separator


.. rst-class:: classref-descriptions-group

Property Descriptions

.. rst-class:: classref-property

:ref:`int<class_int>` bar_beats = 4 :ref:`🔗<class_AudioStreamOggVorbis_property_bar_beats>`

.. rst-class:: classref-property-setget

There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
.. rst-class:: classref-item-separator


.. rst-class:: classref-property

:ref:`int<class_int>` beat_count = 0 :ref:`🔗<class_AudioStreamOggVorbis_property_beat_count>`

.. rst-class:: classref-property-setget

There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
.. rst-class:: classref-item-separator


.. rst-class:: classref-property

:ref:`float<class_float>` bpm = 0.0 :ref:`🔗<class_AudioStreamOggVorbis_property_bpm>`

.. rst-class:: classref-property-setget

There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
.. rst-class:: classref-item-separator


.. rst-class:: classref-property

:ref:`bool<class_bool>` loop = false :ref:`🔗<class_AudioStreamOggVorbis_property_loop>`

.. rst-class:: classref-property-setget

If true, the audio will play again from the specified :ref:`loop_offset<class_AudioStreamOggVorbis_property_loop_offset>` once it is done playing. Useful for ambient sounds and background music.

.. rst-class:: classref-item-separator


.. rst-class:: classref-property

:ref:`float<class_float>` loop_offset = 0.0 :ref:`🔗<class_AudioStreamOggVorbis_property_loop_offset>`

.. rst-class:: classref-property-setget

Time in seconds at which the stream starts after being looped.

.. rst-class:: classref-item-separator


.. rst-class:: classref-property

:ref:`OggPacketSequence<class_OggPacketSequence>` packet_sequence :ref:`🔗<class_AudioStreamOggVorbis_property_packet_sequence>`

.. rst-class:: classref-property-setget

Contains the raw Ogg data for this stream.

.. rst-class:: classref-section-separator


.. rst-class:: classref-descriptions-group

Method Descriptions

.. rst-class:: classref-method

:ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>` load_from_buffer(buffer: :ref:`PackedByteArray<class_PackedByteArray>`) |static| :ref:`🔗<class_AudioStreamOggVorbis_method_load_from_buffer>`

Creates a new AudioStreamOggVorbis instance from the given buffer. The buffer must contain Ogg Vorbis data.

.. rst-class:: classref-item-separator


.. rst-class:: classref-method

:ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>` load_from_file(path: :ref:`String<class_String>`) |static| :ref:`🔗<class_AudioStreamOggVorbis_method_load_from_file>`

Creates a new AudioStreamOggVorbis instance from the given file path. The file must be in Ogg Vorbis format.