mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 15:01:49 +00:00
AL streaming test
This commit is contained in:
parent
8bd43098d5
commit
cc9a3e3ec8
6 changed files with 127 additions and 17 deletions
|
|
@ -118,8 +118,9 @@ namespace audio {
|
|||
|
||||
/// @brief Create new speaker bound to the Stream
|
||||
/// and having high priority
|
||||
/// @param loop is stream looped (required for correct buffers preload)
|
||||
/// @return speaker id or 0
|
||||
virtual Speaker* createSpeaker() = 0;
|
||||
virtual Speaker* createSpeaker(bool loop) = 0;
|
||||
|
||||
/// @brief Unbind previous speaker and bind new speaker to the stream
|
||||
/// @param speaker speaker id or 0 if all you need is unbind speaker
|
||||
|
|
@ -331,6 +332,21 @@ namespace audio {
|
|||
int priority
|
||||
);
|
||||
|
||||
/// @brief Play stream in the world
|
||||
/// @param stream target stream
|
||||
/// @param position stream world position
|
||||
/// @param volume stream volume [0.0-1.0]
|
||||
/// @param pitch stream pitch multiplier [0.0-...]
|
||||
/// @param loop loop stream
|
||||
/// @return speaker id or 0
|
||||
extern speakerid_t play(
|
||||
std::shared_ptr<Stream> stream,
|
||||
glm::vec3 position,
|
||||
float volume,
|
||||
float pitch,
|
||||
bool loop
|
||||
);
|
||||
|
||||
/// @brief Get speaker by id
|
||||
/// @param id speaker id
|
||||
/// @return speaker or nullptr
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue