List of all members.
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 |
( |
Stream * |
stream |
) |
|
Constructor. Sets a new (streamed) buffer for the source. The source should _not_ be playing when doing this.
- Parameters:
-
| stream | is the new buffer. |
openalpp::Source::Source |
( |
const std::string & |
filename |
) |
|
Constructor. Creates the source and a buffer with the specified file.
- Parameters:
-
| filename | is the name of the file. |
openalpp::Source::Source |
( |
Sample * |
buffer |
) |
|
Constructor. Creates the source with the specified buffer.
- Parameters:
-
| buffer | is the buffer to use. |
openalpp::Source::Source |
( |
const Source & |
source |
) |
|
virtual openalpp::Source::~Source |
( |
|
) |
[protected, virtual] |
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 |
) |
|
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 |
( |
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 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::play |
( |
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::seek |
( |
float |
time_s |
) |
|
Seek this source to specified time (streaming sources)
virtual void openalpp::Source::setLooping |
( |
bool |
loop = true |
) |
[virtual] |
Turn on/off looping.
- Parameters:
-
| loop | is true if the source should loop, false otherwise. |
Reimplemented from openalpp::SourceBase.
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::setSound |
( |
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 |
( |
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::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: