summaryrefslogtreecommitdiff
path: root/src/tangara
diff options
context:
space:
mode:
authorTom Kirchner <git@halffull.org>2024-12-31 17:02:40 -0800
committerTom <tjk@noreply.codeberg.org>2025-01-02 16:36:40 +0000
commit02954cd40bf36082a63b56eb5211bd27f5f0b4c4 (patch)
tree322f1dfed781a6390cfddf774de8a2ded6d9a014 /src/tangara
parent0ca7328d0abd108e0fa28c4784c0d8e7aad7c033 (diff)
downloadtangara-fw-02954cd40bf36082a63b56eb5211bd27f5f0b4c4.tar.gz
Expose more properties to Lua for UI
Diffstat (limited to 'src/tangara')
-rw-r--r--src/tangara/lua/property.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/tangara/lua/property.cpp b/src/tangara/lua/property.cpp
index 847bbe15..3302172f 100644
--- a/src/tangara/lua/property.cpp
+++ b/src/tangara/lua/property.cpp
@@ -265,6 +265,22 @@ static void pushTrack(lua_State* L, const audio::TrackInfo& track) {
lua_pushliteral(L, "encoding");
lua_pushstring(L, codecs::StreamTypeToString(track.encoding).c_str());
lua_settable(L, -3);
+
+ lua_pushliteral(L, "uri");
+ lua_pushstring(L, track.uri.c_str());
+ lua_settable(L, -3);
+
+ lua_pushliteral(L, "sample_rate");
+ lua_pushinteger(L, track.format.sample_rate);
+ lua_settable(L, -3);
+
+ lua_pushliteral(L, "num_channels");
+ lua_pushinteger(L, track.format.num_channels);
+ lua_settable(L, -3);
+
+ lua_pushliteral(L, "bits_per_sample");
+ lua_pushinteger(L, track.format.bits_per_sample);
+ lua_settable(L, -3);
}
static void pushDevice(lua_State* L,