# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NLSOUND::IBuffer Class Reference

Sound buffer interface (implemented in sound driver dynamic library). More...

#include <buffer.h>

Inheritance diagram for NLSOUND::IBuffer:

NLSOUND::CBufferAL NLSOUND::CBufferDSound List of all members.

Public Methods

virtual void presetName (const std::string &bufferName)=0
 Preset the name of the buffer. More...

virtual void setFormat (TSampleFormat format, uint freq)=0
 Set the sample format. Example: freq=44100. More...

virtual bool fillBuffer (void *src, uint32 bufsize)=0
 Set the buffer size and fill the buffer. Return true if ok. Call setFormat() first. More...

virtual uint32 getSize () const=0
 Return the size of the buffer, in bytes. More...

virtual float getDuration () const=0
 Return the duration (in ms) of the sample in the buffer. More...

virtual bool isStereo () const=0
 Return true if the buffer is stereo, false if mono. More...

virtual void getFormat (TSampleFormat &format, uint &freq) const=0
 Return the format and frequency. More...

virtual bool isFillMoreSupported () const=0
 Return true if the buffer is able to be fill part by part, false if it must be filled in one call OpenAL 1.0 -> false. More...

virtual void setSize (uint32 size)
 Force the buffer size without filling data (if isFillMoreSupported() only). More...

virtual bool fillMore (void *src, uint32 srcsize)
 Fill the buffer partially (if isFillMoreSupported() only), beginning at the pos changed by a previous call to fillMore(). More...

virtual const std::string & getName ()=0
 Return the name of this buffer. More...

virtual bool isBufferLoaded ()=0
 Return true if the buffer is loaded. Used for async load/unload. More...

virtual ~IBuffer ()
 Destructor. More...


Protected Methods

 IBuffer ()
 Constructor. More...


Detailed Description

Sound buffer interface (implemented in sound driver dynamic library).

Author:
Olivier Cado , Nevrax France
Date:
2001

Definition at line 48 of file buffer.h.


Constructor & Destructor Documentation

NLSOUND::IBuffer::IBuffer   [inline, protected]
 

Constructor.

Definition at line 94 of file buffer.h.

virtual NLSOUND::IBuffer::~IBuffer   [inline, virtual]
 

Destructor.

Definition at line 99 of file buffer.h.


Member Function Documentation

virtual bool NLSOUND::IBuffer::fillBuffer void *    src,
uint32    bufsize
[pure virtual]
 

Set the buffer size and fill the buffer. Return true if ok. Call setFormat() first.

Implemented in NLSOUND::CBufferDSound.

virtual bool NLSOUND::IBuffer::fillMore void *    src,
uint32    srcsize
[inline, virtual]
 

Fill the buffer partially (if isFillMoreSupported() only), beginning at the pos changed by a previous call to fillMore().

If the pos+srcsize exceeds the buffer size, the exceeding data is put at the beginning of the buffer. srcsize must be smaller than the buffer size.

Reimplemented in NLSOUND::CBufferAL.

Definition at line 83 of file buffer.h.

References src.

virtual float NLSOUND::IBuffer::getDuration   const [pure virtual]
 

Return the duration (in ms) of the sample in the buffer.

Implemented in NLSOUND::CBufferDSound.

virtual void NLSOUND::IBuffer::getFormat TSampleFormat   format,
uint   freq
const [pure virtual]
 

Return the format and frequency.

Implemented in NLSOUND::CBufferDSound.

virtual const std::string& NLSOUND::IBuffer::getName   [pure virtual]
 

Return the name of this buffer.

Implemented in NLSOUND::CBufferDSound.

virtual uint32 NLSOUND::IBuffer::getSize   const [pure virtual]
 

Return the size of the buffer, in bytes.

Implemented in NLSOUND::CBufferDSound.

virtual bool NLSOUND::IBuffer::isBufferLoaded   [pure virtual]
 

Return true if the buffer is loaded. Used for async load/unload.

Implemented in NLSOUND::CBufferDSound.

virtual bool NLSOUND::IBuffer::isFillMoreSupported   const [pure virtual]
 

Return true if the buffer is able to be fill part by part, false if it must be filled in one call OpenAL 1.0 -> false.

Implemented in NLSOUND::CBufferDSound.

virtual bool NLSOUND::IBuffer::isStereo   const [pure virtual]
 

Return true if the buffer is stereo, false if mono.

Implemented in NLSOUND::CBufferDSound.

virtual void NLSOUND::IBuffer::presetName const std::string &    bufferName [pure virtual]
 

Preset the name of the buffer.

Used for async loading to give a name before the buffer is effectivly loaded. If the name after loading of the buffer doesn't match the preset name, the load will assert.

Implemented in NLSOUND::CBufferDSound.

virtual void NLSOUND::IBuffer::setFormat TSampleFormat    format,
uint    freq
[pure virtual]
 

Set the sample format. Example: freq=44100.

Implemented in NLSOUND::CBufferDSound.

virtual void NLSOUND::IBuffer::setSize uint32    size [inline, virtual]
 

Force the buffer size without filling data (if isFillMoreSupported() only).

Reimplemented in NLSOUND::CBufferAL.

Definition at line 77 of file buffer.h.


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