diff src/aci2/aci/ati_audio.c @ 287:d85305a74518

aci2 AT@SPKR command: added query operation
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 27 Aug 2017 03:27:45 +0000
parents 3edeadec6804
children dd3374eac8a3
line wrap: on
line diff
--- a/src/aci2/aci/ati_audio.c	Tue Aug 08 02:50:13 2017 +0000
+++ b/src/aci2/aci/ati_audio.c	Sun Aug 27 03:27:45 2017 +0000
@@ -75,6 +75,8 @@
 {
 	int state;
 
+	TRACE_FUNCTION("atAtSPKR()");
+
 	cl = parse(cl, "D", &state);
 	if (!cl)
 		return (ATI_FAIL);
@@ -84,6 +86,21 @@
 		AI_ResetBit(1);
 	return (ATI_CMPL);
 }
+
+GLOBAL T_ATI_RSLT queatAtSPKR (char *cl, UBYTE srcId)
+{
+	char *me="@SPKR: ";
+	int state;
+
+	TRACE_FUNCTION("queatAtSPKR()");
+
+	state = AI_ReadBit(1);
+	sprintf(g_sa, "%s%d", me, state);
+
+	io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
+
+	return (ATI_CMPL);
+}
 #endif
 
 /* AT@SND - emit sound through Condat API */