feat: allow specifying direct file path in audio.play_stream
This commit is contained in:
parent
a0b0c0a9f0
commit
b009826d33
@ -66,9 +66,15 @@ inline audio::speakerid_t play_stream(
|
||||
if (channel == -1) {
|
||||
return 0;
|
||||
}
|
||||
auto paths = scripting::engine->getResPaths();
|
||||
io::path file;
|
||||
if (std::strchr(filename, ':')) {
|
||||
file = std::string(filename);
|
||||
} else {
|
||||
auto paths = scripting::engine->getResPaths();
|
||||
file = paths->find(filename);
|
||||
}
|
||||
return audio::play_stream(
|
||||
paths->find(filename),
|
||||
file,
|
||||
glm::vec3(
|
||||
static_cast<float>(x), static_cast<float>(y), static_cast<float>(z)
|
||||
),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user