PixelLightAPI  .
Public Member Functions | Protected Member Functions
PLSound::Buffer Class Reference

Abstract sound buffer resource. More...

#include <Buffer.h>

Inheritance diagram for PLSound::Buffer:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual PLSOUND_API ~Buffer ()
 Destructor.
PLSOUND_API PLCore::uint32 GetNumOfSources () const
 Returns the number of sources.
PLSOUND_API const SourceGetSource (PLCore::uint32 nIndex=0) const
 Returns a sound source.
PLSOUND_API SourceGetSource (PLCore::uint32 nIndex=0)
 Returns a sound source.
virtual bool LoadBuffer (const PLCore::String &sFilename, bool bStream)=0
 Loads the sound buffer with the given data from a file.
virtual bool LoadBuffer (const PLCore::uint8 nData[], PLCore::uint32 nSize, bool bStream=false)=0
 Loads the sound buffer with the given data from memory.
virtual bool IsLoaded () const =0
 Returns whether the buffer is loaded or not.
virtual bool IsStreamed () const =0
 Returns whether the buffer is streamed or not.

Protected Member Functions

PLSOUND_API Buffer (SoundManager &cSoundManager, const PLCore::String &sName="")
 Constructor.

Detailed Description

Abstract sound buffer resource.


Constructor & Destructor Documentation

virtual PLSOUND_API PLSound::Buffer::~Buffer ( ) [virtual]

Destructor.

PLSOUND_API PLSound::Buffer::Buffer ( SoundManager cSoundManager,
const PLCore::String sName = "" 
) [protected]

Constructor.

Parameters:
[in]cSoundManagerOwner sound manager
[in]sNameResource name to set

Member Function Documentation

PLSOUND_API PLCore::uint32 PLSound::Buffer::GetNumOfSources ( ) const

Returns the number of sources.

Returns:
Number of sources
PLSOUND_API const Source* PLSound::Buffer::GetSource ( PLCore::uint32  nIndex = 0) const

Returns a sound source.

Parameters:
[in]nIndexIndex of the resource to return
Returns:
The source at the given index, a null pointer on error
PLSOUND_API Source* PLSound::Buffer::GetSource ( PLCore::uint32  nIndex = 0)

Returns a sound source.

Parameters:
[in]nIndexIndex of the resource to return
Returns:
The source at the given index, a null pointer on error
virtual bool PLSound::Buffer::LoadBuffer ( const PLCore::String sFilename,
bool  bStream 
) [pure virtual]

Loads the sound buffer with the given data from a file.

Parameters:
[in]sFilenameSound filename (full path, supported file formats are API dependent)
[in]bStreamStream the file?
Returns:
'true' if all went fine, else 'false'
Note:
  • Not each sound buffer can be streamed, use IsStreamed() to check whether streaming is used
virtual bool PLSound::Buffer::LoadBuffer ( const PLCore::uint8  nData[],
PLCore::uint32  nSize,
bool  bStream = false 
) [pure virtual]

Loads the sound buffer with the given data from memory.

Parameters:
[in]nDataSound data
[in]nSizeNumber of data bytes (MUST be valid!)
[in]bStreamStream the data?
Returns:
'true' if all went fine, else 'false'
Note:
  • If bStream is 'true' nData MUST stay valid!
  • Not each sound buffer can be streamed, use IsStreamed() to check whether streaming is used
virtual bool PLSound::Buffer::IsLoaded ( ) const [pure virtual]

Returns whether the buffer is loaded or not.

Returns:
'true' if the buffer is loaded, else 'false'
virtual bool PLSound::Buffer::IsStreamed ( ) const [pure virtual]

Returns whether the buffer is streamed or not.

Returns:
'true' if the buffer is streamed, else 'false'

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


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:26
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported