Add compilation options to use the Pi's FPU and vector unit. This lessens CPU usage greatly

This commit is contained in:
Christophe Jacquet 2014-04-19 23:25:13 +02:00
parent aa9d43f4ae
commit d199a74b2a
2 changed files with 4 additions and 4 deletions

View File

@ -99,8 +99,8 @@ Reception works perfectly with all the devices above. RDS Surveyor reports no gr
CPU usage is as follows:
* without audio: 9%
* with mono audio: 42%
* with stereo audio: 54%
* with mono audio: 33%
* with stereo audio: 40%
CPU usage increases dramatically when adding audio because the program has to upsample the (unspecified) sample rate of the input audio file to 228 kHz, its internal operating sample rate. Doing so, it has to apply an FIR filter, which is costly.

View File

@ -1,5 +1,5 @@
CC = gcc
CFLAGS = -Wall -std=gnu99 -c -g -O2
CFLAGS = -Wall -std=gnu99 -c -g -O3 -march=armv6 -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp -ffast-math
app: rds.o waveforms.o pi_fm_rds.o fm_mpx.o
$(CC) -o pi_fm_rds rds.o waveforms.o pi_fm_rds.o fm_mpx.o -lm -lsndfile