aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--examples/pcm-readi.c10
-rw-r--r--src/Makefile1
-rw-r--r--utils/tinyplay.c4
4 files changed, 7 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 9c3dcb1..ab36222 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,5 @@
export DESTDIR ?=
export PREFIX ?= /usr/local
-export CROSS_COMPILE =
export INCDIR ?= $(PREFIX)/include/tinyalsa
export LIBDIR ?= $(PREFIX)/lib
diff --git a/examples/pcm-readi.c b/examples/pcm-readi.c
index 5b85ca6..8722b41 100644
--- a/examples/pcm-readi.c
+++ b/examples/pcm-readi.c
@@ -23,11 +23,11 @@ static size_t read_frames(void **frames)
struct pcm *pcm = pcm_open(card, device, flags, &config);
if (pcm == NULL) {
fprintf(stderr, "failed to allocate memory for PCM\n");
- return EXIT_FAILURE;
+ return 0;
} else if (!pcm_is_ready(pcm)){
pcm_close(pcm);
fprintf(stderr, "failed to open PCM\n");
- return EXIT_FAILURE;
+ return 0;
}
unsigned int frame_size = pcm_frames_to_bytes(pcm, 1);
@@ -37,7 +37,7 @@ static size_t read_frames(void **frames)
if (*frames == NULL) {
fprintf(stderr, "failed to allocate frames\n");
pcm_close(pcm);
- return EXIT_FAILURE;
+ return 0;
}
int read_count = pcm_readi(pcm, *frames, frames_per_sec);
@@ -63,8 +63,8 @@ static int write_file(const void *frames, size_t size)
int main(void)
{
- void *frames;
- size_t size;
+ void *frames = NULL;
+ size_t size = 0;
size = read_frames(&frames);
if (size == 0) {
diff --git a/src/Makefile b/src/Makefile
index fde31e4..aa00484 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -6,7 +6,6 @@ ifdef DEB_HOST_MULTIARCH
LIBDIR := $(LIBDIR)/$(DEB_HOST_MULTIARCH)
endif
-CROSS_COMPILE =
CC = $(CROSS_COMPILE)gcc
AR = $(CROSS_COMPILE)ar
LD = $(CROSS_COMPILE)gcc
diff --git a/utils/tinyplay.c b/utils/tinyplay.c
index 2e5f627..e3c7b0d 100644
--- a/utils/tinyplay.c
+++ b/utils/tinyplay.c
@@ -301,8 +301,8 @@ void print_usage(const char *argv0)
{
fprintf(stderr, "usage: %s file.wav [options]\n", argv0);
fprintf(stderr, "options:\n");
- fprintf(stderr, "-D | --card <card number> The device to receive the audio\n");
- fprintf(stderr, "-d | --device <device number> The card to receive the audio\n");
+ fprintf(stderr, "-D | --card <card number> The card to receive the audio\n");
+ fprintf(stderr, "-d | --device <device number> The device to receive the audio\n");
fprintf(stderr, "-p | --period-size <size> The size of the PCM's period\n");
fprintf(stderr, "-n | --period-count <count> The number of PCM periods\n");
fprintf(stderr, "-i | --file-type <file-type > The type of file to read (raw or wav)\n");