aboutsummaryrefslogtreecommitdiff
path: root/sam.c
diff options
context:
space:
mode:
Diffstat (limited to 'sam.c')
-rw-r--r--sam.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/sam.c b/sam.c
index c921c48..ec02fda 100644
--- a/sam.c
+++ b/sam.c
@@ -37,11 +37,11 @@ void sam_init(void)
run_to(0xe5cd, 0xe5d5);
feed("LOAD\"SAM.PRG\",1,1\r RUN\rH");
run_to(0xe5cd, 0xe5d5);
- feed("]RE\r");
- run_to(0xe5cd, 0xe5d5);
+ //feed("]RE\r");
+ //run_to(0xe5cd, 0xe5d5);
}
-void sam_say(const char *text, unsigned int frequency, unsigned char *wave_buf, unsigned int *wave_len_ref)
+static void sam_say(const char *text, unsigned int frequency, unsigned char *wave_buf, unsigned int *wave_len_ref)
{
feed("SAY\"");
feed(text);
@@ -51,3 +51,17 @@ void sam_say(const char *text, unsigned int frequency, unsigned char *wave_buf,
*wave_len_ref = stop_record();
}
+void sam_recite(const char *text, unsigned int frequency, unsigned char *wave_buf, unsigned int *wave_len_ref)
+{
+ feed("]RECITER\r");
+ run_to(0xe5cd, 0xe5d5);
+ sam_say(text, frequency, wave_buf, wave_len_ref);
+}
+
+void sam_phonetic(const char *text, unsigned int frequency, unsigned char *wave_buf, unsigned int *wave_len_ref)
+{
+ feed("]SAM\r");
+ run_to(0xe5cd, 0xe5d5);
+ sam_say(text, frequency, wave_buf, wave_len_ref);
+}
+