Usage:
device /dev/audio/compress0p
play /data/test.sbc
This function requires the platform to support compress decoding and playback
Signed-off-by: shipei <shipei@xiaomi.com>
Previously, if the read bytes were less than the requested, the
file was closed immediately. This behavior, however, does not
consider the fact that the read operation may be blocking when
no bytes are available at the moment. That is true for a named pipe
(FIFO), for instance. Thus, reading it again lets to the underlying
file system the decision of 1) blocking until bytes become
available or 2) return 0 immediately (the case for actual files) or
3) read available bytes.
nxplayer_main.c:
code checker warning:
level_percent = (uint8_t) atoi(parg);
'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead.
nxlooper_main.c:
code checker warning:
percent = (uint16_t)(atof(parg) * 10.0);
'atof' used to convert a string to a floating-point value, but function will not report conversion errors; consider using 'strtod' instead
Signed-off-by: liubojun1 <liubojun1@xiaomi.com>
nxplayer.c: In function 'nxplayer_playinternal':
Error: nxplayer.c:209:36: error: '%s' directive output may be truncated writing up to 99 bytes into a region of size 59 [-Werror=format-truncation=]
209 | snprintf(buf, sizeof(buf), "GET /%s HTTP/1.0\r\n\r\n", relurl);
| ^~ ~~~~~~
nxplayer.c:209:3: note: 'snprintf' output between 19 and 118 bytes into a destination of size 64
209 | snprintf(buf, sizeof(buf), "GET /%s HTTP/1.0\r\n\r\n", relurl);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: nxplayer.c:1809:42: error: 'snprintf' output may be truncated before the last format character [-Werror=format-truncation=]
1809 | snprintf(path, sizeof(path), "%s/%s", pplayer->mediadir, pfilename);
| ^
nxplayer.c:1809:7: note: 'snprintf' output 2 or more bytes (assuming 129) into a destination of size 128
1809 | snprintf(path, sizeof(path), "%s/%s", pplayer->mediadir, pfilename);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: nxplayer.c:359:53: error: '%s' directive output may be truncated writing up to 128 bytes into a region of size 53 [-Werror=format-truncation=]
359 | snprintf(path, sizeof(path), "/dev/audio/%s", pdevice->d_name);
| ^~
nxplayer.c:359:11: note: 'snprintf' output between 12 and 140 bytes into a destination of size 64
359 | snprintf(path, sizeof(path), "/dev/audio/%s", pdevice->d_name);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Gregory Nutt is has submitted the SGA
Ken Pettit has submitted the ICLA
David S. Alessio has submitted the ICLA
as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Gregory Nutt is has submitted the SGA
Ken Pettit has submitted the ICLA
as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
N/A
to avoid multiple open operations of audio_open
Change-Id: Id283def4811c71f3c0bd38dc1a480afce303c4c3
Signed-off-by: danguanghua <danguanghua@xiaomi.com>
the audio driver may config a very large buffer count,
so let's adjust the message queue length dynamically.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit changes only ones with the default 2048 and
leaves the others.
E.g. this leaves SYSTEM_RAMTEST_STACKSIZE, whose default is 1024.
I guess those need to be inspected one-by-one.