mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
Merge branch 'main' into lua_audio
This commit is contained in:
commit
7057ea554d
3 changed files with 4 additions and 4 deletions
|
|
@ -72,7 +72,7 @@ Speaker* ALStream::createSpeaker(bool loop, int channel) {
|
|||
|
||||
|
||||
void ALStream::bindSpeaker(speakerid_t speaker) {
|
||||
auto sp = audio::get(this->speaker);
|
||||
auto sp = audio::get_speaker(this->speaker);
|
||||
if (sp) {
|
||||
sp->stop();
|
||||
}
|
||||
|
|
@ -87,7 +87,7 @@ void ALStream::update(double delta) {
|
|||
if (this->speaker == 0) {
|
||||
return;
|
||||
}
|
||||
Speaker* speaker = audio::get(this->speaker);
|
||||
auto speaker = audio::get_speaker(this->speaker);
|
||||
if (speaker == nullptr) {
|
||||
speaker = 0;
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -312,7 +312,7 @@ speakerid_t audio::play_stream(
|
|||
return play(stream, position, relative, volume, pitch, loop, channel);
|
||||
}
|
||||
|
||||
Speaker* audio::get(speakerid_t id) {
|
||||
Speaker* audio::get_speaker(speakerid_t id) {
|
||||
auto found = speakers.find(id);
|
||||
if (found == speakers.end()) {
|
||||
return nullptr;
|
||||
|
|
|
|||
|
|
@ -452,7 +452,7 @@ namespace audio {
|
|||
/// @brief Get speaker by id
|
||||
/// @param id speaker id
|
||||
/// @return speaker or nullptr
|
||||
extern Speaker* get(speakerid_t id);
|
||||
extern Speaker* get_speaker(speakerid_t id);
|
||||
|
||||
/// @brief Create new channel.
|
||||
/// All non-builtin channels will be destroyed on audio::reset() call
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue