feat: allow specifying direct file path in audio.play_stream
This commit is contained in:
@@ -66,9 +66,15 @@ inline audio::speakerid_t play_stream(
|
|||||||
if (channel == -1) {
|
if (channel == -1) {
|
||||||
return 0;
|
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(
|
return audio::play_stream(
|
||||||
paths->find(filename),
|
file,
|
||||||
glm::vec3(
|
glm::vec3(
|
||||||
static_cast<float>(x), static_cast<float>(y), static_cast<float>(z)
|
static_cast<float>(x), static_cast<float>(y), static_cast<float>(z)
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user