summaryrefslogtreecommitdiff
path: root/src/tangara/lua/property.cpp
diff options
context:
space:
mode:
authorcooljqln <cooljqln@noreply.codeberg.org>2025-01-02 22:57:51 +0000
committercooljqln <cooljqln@noreply.codeberg.org>2025-01-02 22:57:51 +0000
commit3ad2fb61dcfcaa0fb1cd316ed8b88d2866d98372 (patch)
treec360b7f22f45c4eca357cbebc6339b82d7ee751b /src/tangara/lua/property.cpp
parent0ca7328d0abd108e0fa28c4784c0d8e7aad7c033 (diff)
parent0975c2cdbdaf252eb6765b32d4c880911abfcc9f (diff)
downloadtangara-fw-3ad2fb61dcfcaa0fb1cd316ed8b88d2866d98372.tar.gz
Merge pull request 'Add track info screen' (#168) from tjk/tangara-fw:track-info-screen into main
Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/168 Reviewed-by: cooljqln <cooljqln@noreply.codeberg.org>
Diffstat (limited to 'src/tangara/lua/property.cpp')
-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,