zenilib: Zeni::Sound_Buffer Class Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Friends | List of all members
Zeni::Sound_Buffer Class Reference
Zenilib

Stores Sound Data. More...

`#include <Sound_Buffer.h>`

## Public Member Functions

const float & | get_duration () const
| Get the duration of the Sound_Buffer in seconds. More...
const ALuint & | get_id () const
| Get the OpenAL id of the Sound_Buffer. More...

## Static Public Member Functions

static std::pair< ALuint, float > | load_ogg_vorbis (const String &filename)
| Ogg Vorbis Loader. More...

## Friends

class | Database< Sound_Buffer >
class | Sound
class | Sounds

## Detailed Description

Stores Sound Data.

A Sound_Buffer stores sound data to be played from Sound_Sources.

Note
  Mono sounds work best.

Warning
  Stereo sounds will not be affected by the positional audio system. Furthermore, in a surround sound speaker setup, they may play only through the left and right channels.

Author
  bazald

Contact: bazal.nosp@m.d@ze.nosp@m.nipex.nosp@m..com

Definition at line 83 of file Sound_Buffer.h.

## Member Function Documentation

const float& Zeni::Sound_Buffer::get_duration | ( |  | ) | const

inline

Get the duration of the Sound_Buffer in seconds.

Definition at line 102 of file Sound_Buffer.h.

Referenced by Zeni::Sound_Source_HW::get_duration().

const ALuint& Zeni::Sound_Buffer::get_id | ( |  | ) | const

inline

Get the OpenAL id of the Sound_Buffer.

Definition at line 97 of file Sound_Buffer.h.

std::pair< ALuint, float > Zeni::Sound_Buffer::load_ogg_vorbis | ( | const String & | filename | ) |

static

Ogg Vorbis Loader.

Definition at line 113 of file Sound_Buffer.cpp.

References AL_FORMAT_MONO16, AL_FORMAT_STEREO16, AL_NONE, Zeni::Sound_Renderer_AL::alBufferData(), Zeni::Sound_Renderer_AL::alGenBuffers(), vorbis_info::channels, int, ov_clear(), ov_fopen(), ov_info(), ov_pcm_total(), ov_read(), and vorbis_info::rate.

## Friends And Related Function Documentation

friend class Database< Sound_Buffer >

friend

Definition at line 85 of file Sound_Buffer.h.

friend class Sound

friend

Definition at line 84 of file Sound_Buffer.h.

friend class Sounds

friend

Definition at line 86 of file Sound_Buffer.h.

The documentation for this class was generated from the following files:

- zenilib/jni/external/zenilib/zeni_audio/Zeni/Sound_Buffer.h
- zenilib/jni/external/zenilib/zeni_audio/Sound_Buffer.cpp