examples: i2sloop: nxstyle fixes

nxstyle fixes for i2sloop exaple

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
Alin Jerpelea 2020-04-21 17:37:52 +02:00 committed by patacongo
parent 3cdb81077b
commit c9eaf0beaa

View File

@ -88,7 +88,7 @@ int main(int argc, FAR char *argv[])
freq = 16000; freq = 16000;
while ((opt = getopt(argc, argv, "c:f:")) != -1) while ((opt = getopt(argc, argv, "c:f:")) != -1)
{ {
switch (opt) switch (opt)
{ {
case 'c': case 'c':
@ -99,7 +99,7 @@ int main(int argc, FAR char *argv[])
freq = atoi(optarg); freq = atoi(optarg);
break; break;
} }
} }
/* Open the I2S character device */ /* Open the I2S character device */
@ -120,7 +120,7 @@ int main(int argc, FAR char *argv[])
/* Allocate an audio buffer */ /* Allocate an audio buffer */
desc.numbytes = 1024; desc.numbytes = 1024;
desc.u.ppBuffer = &apb; desc.u.pbuffer = &apb;
ret = apb_alloc(&desc); ret = apb_alloc(&desc);
DEBUGASSERT(ret == sizeof(desc)); DEBUGASSERT(ret == sizeof(desc));
@ -139,7 +139,6 @@ int main(int argc, FAR char *argv[])
bufsize = sizeof(struct ap_buffer_s) + apb->nbytes; bufsize = sizeof(struct ap_buffer_s) + apb->nbytes;
ret = write(fd, apb, bufsize); ret = write(fd, apb, bufsize);
} }
} }
apb_free(apb); apb_free(apb);