Thread (17 messages) 17 messages, 2 authors, 2014-02-05

[RFC 06/15] android/client-audio: Add get_buffer_size for output

flat view
STALE4644d

From: Jakub Tyszkowski <hidden>
Date: 2014-01-30 11:23:12
Subsystem: the rest · Maintainer: Linus Torvalds

Get buffer size for output stream.

---
 android/client/if-audio.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff --git a/android/client/if-audio.c b/android/client/if-audio.c
index 1ca84f5..2b158a5 100644
--- a/android/client/if-audio.c
+++ b/android/client/if-audio.c
@@ -295,6 +295,15 @@ static void get_latency_p(int argc, const char **argv)
 					stream_out->get_latency(stream_out));
 }
 
+static void get_buffer_size_p(int argc, const char **argv)
+{
+	RETURN_IF_NULL(if_audio);
+	RETURN_IF_NULL(stream_out);
+
+	haltest_info("Current output buffer size: %d\n",
+		stream_out->common.get_buffer_size(&stream_out->common));
+}
+
 static struct method methods[] = {
 	STD_METHOD(init),
 	STD_METHOD(cleanup),
@@ -305,6 +314,7 @@ static struct method methods[] = {
 	STD_METHOD(suspend),
 	STD_METHOD(resume),
 	STD_METHOD(get_latency),
+	STD_METHOD(get_buffer_size),
 	END_METHOD
 };
 
-- 
1.8.5.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help