summaryrefslogtreecommitdiffstats
path: root/msf.c
diff options
context:
space:
mode:
authorYour Name <you@example.com>2019-02-26 13:21:29 +0000
committerYour Name <you@example.com>2019-02-26 13:21:29 +0000
commit89aa56f25116fc642928f352c14fe2d485532749 (patch)
treef3e74785601c2d9daca159e049cdd3be4089aec1 /msf.c
parent9b0002fc40f4d8b97cf2064910a9ded467f29276 (diff)
downloadgen_msf-89aa56f25116fc642928f352c14fe2d485532749.tar.gz
gen_msf-89aa56f25116fc642928f352c14fe2d485532749.tar.bz2
gen_msf-89aa56f25116fc642928f352c14fe2d485532749.zip
working sync and audio
Diffstat (limited to 'msf.c')
-rw-r--r--msf.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/msf.c b/msf.c
index 47e5188..411b601 100644
--- a/msf.c
+++ b/msf.c
@@ -19,7 +19,7 @@ static void msf_set_ident (uint8_t *i)
-void msf_make_bits (UTC u, uint8_t *a, uint8_t *b)
+static void msf_make_bits (UTC u, uint8_t *a, uint8_t *b)
{
bzero (a, 60);
@@ -53,20 +53,25 @@ void msf_make_bits (UTC u, uint8_t *a, uint8_t *b)
-void msf_make_stream (uint8_t *v, uint8_t *a, uint8_t *b)
+void msf_make_stream (uint8_t *v, UTC u)
{
unsigned s;
+ uint8_t a[60], b[60];
+ uint8_t *pa, *pb;
+
+ msf_make_bits (u, a, b);
+
bzero (v, 600);
- for (s = 0; s < 60; ++s, v += 10, ++a, ++b) {
+ for (s = 0, pa = a, pb = b; s < 60; ++s, v += 10, ++pa, ++pb) {
if (!s)
memset (v, 1, 5);
-
v[0] = 1;
- v[1] = *a;
- v[2] = *b;
+ v[1] = *pa;
+ v[2] = *pb;
}
}
+