Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

openalpp::Source Class Reference

#include <source.h>

Inheritance diagram for openalpp::Source:

openalpp::SourceBase openalpp::PositionedObject openalpp::AudioBase openalpp::Referenced List of all members.

Public Member Functions

 Source (float x=0.0, float y=0.0, float z=0.0)
 Source (const std::string &filename, float x=0.0, float y=0.0, float z=0.0)
 Source (const Sample &buffer, float x=0.0, float y=0.0, float z=0.0)
 Source (const Stream &stream, float x=0.0, float y=0.0, float z=0.0)
 Source (const Source &source)
void setSound (const std::string &filename)
void setSound (const Sample *buffer)
void setSound (const Stream *stream)
const SoundData * getSound () const
void play (const std::string &filename)
void play (const Sample *buffer)
void play (const Stream *stream)
void play ()
void stop ()
void pause ()
bool isStreaming ()
Source & operator= (const Source &source)

Protected Member Functions

virtual ~Source ()

Detailed Description

Class for "normal" sources. This is used for standard OpenAL sources, whether streaming or not.


Constructor & Destructor Documentation

openalpp::Source::Source (  float  x = 0.0,
float  y = 0.0,
float  z = 0.0
) 
 

Constructor. Creates the source with the specified position.

Parameters:
x x coordinate.
y y coordinate.
z z coordinate.

openalpp::Source::Source (  const std::string &  filename,
float  x = 0.0,
float  y = 0.0,
float  z = 0.0
) 
 

Constructor. Creates the source and a buffer with the specified file.

Parameters:
filename is the name of the file.

openalpp::Source::Source (  const Sample &  buffer,
float  x = 0.0,
float  y = 0.0,
float  z = 0.0
) 
 

Constructor. Creates the source with the specified buffer.

Parameters:
buffer is the buffer to use.

openalpp::Source::Source (  const Stream &  stream,
float  x = 0.0,
float  y = 0.0,
float  z = 0.0
) 
 

Constructor. Creates the source with the specified stream.

Parameters:
stream is the stream to use.

openalpp::Source::Source (  const Source &  source  ) 
 

Copy constructor.

virtual openalpp::Source::~Source (   )  [protected, virtual]
 

Destructor.


Member Function Documentation

const SoundData* openalpp::Source::getSound (   )  const
 

Gets the buffer associated with the source.

Returns:
the buffer.

bool openalpp::Source::isStreaming (   ) 
 

Check if the source is streaming.

Returns:
true if the source is streaming, false otherwise.

Source& openalpp::Source::operator= (  const Source &  source  ) 
 

Assignment operator.

void openalpp::Source::pause (   ) 
 

Pause this source. This is needed here for streaming sources...

Reimplemented from openalpp::SourceBase.

void openalpp::Source::play (   ) 
 

Play this source. This is only here, because the above Play(...) hides SourceBase::Play()

Reimplemented from openalpp::SourceBase.

void openalpp::Source::play (  const Stream *  stream  ) 
 

Play a stream on the source. This will change the source's buffer.

Parameters:
stream is the stream to play.

void openalpp::Source::play (  const Sample *  buffer  ) 
 

Play a buffer on the source. This will change the source's buffer.

Parameters:
buffer is the buffer to play.

void openalpp::Source::play (  const std::string &  filename  ) 
 

Play a file on the source. This will change the source's buffer.

Parameters:
filename is the name of the file to play.

void openalpp::Source::setSound (  const Stream *  stream  ) 
 

Sets a new (streamed) buffer for the source. The source should _not_ be playing when doing this.

Parameters:
stream is the new buffer.

void openalpp::Source::setSound (  const Sample *  buffer  ) 
 

Sets a new buffer for the source. The source should _not_ be playing when doing this.

Parameters:
buffer is the new buffer.

void openalpp::Source::setSound (  const std::string &  filename  ) 
 

Create a buffer for the source and load a file into it. The source should _not_ be playing when doing this.

Parameters:
filename is the name of the file.

void openalpp::Source::stop (   ) 
 

Stop this source. This is needed here for streaming sources...

Reimplemented from openalpp::SourceBase.


The documentation for this class was generated from the following file:
Generated on Thu Dec 9 14:08:13 2004 for openalpp by  doxygen 1.3.9.1