removed extra white space

master
Ahmet Inan 2012-09-30 18:53:37 +02:00
rodzic 16760754ae
commit 2c00f21ae3
8 zmienionych plików z 16 dodań i 16 usunięć

Wyświetl plik

@ -1,5 +1,5 @@
CFLAGS = -g -DUP=0 -DDN=1 -D_GNU_SOURCE=1 -W -Wall -O3 -std=c99 -ffast-math -fsingle-precision-constant $(shell sdl-config --cflags)
CFLAGS = -g -DUP=1 -DDN=1 -D_GNU_SOURCE=1 -W -Wall -O3 -std=c99 -ffast-math -fsingle-precision-constant $(shell sdl-config --cflags)
LDFLAGS = -lm -lasound $(shell sdl-config --libs)
all: encode decode debug

2
README
Wyświetl plik

@ -26,7 +26,7 @@ You can find a lot more about DDC's and FM demodulation on the Internet.
I Suggest finding and reading the enlightening "Virtual Radios" Paper of Vanu Bose, Michael Ismert, Matt Welborn, and John Guttag.
You should also look at GNU Radio: http://gnuradio.org/ and at the invaluable information at dspGuru: http://www.dspguru.com/
smpte.ppm is converted from http://en.wikipedia.org/wiki/File:SMPTE_Color_Bars.svg
smpte.ppm is converted from http://en.wikipedia.org/wiki/File:SMPTE_Color_Bars.svg
compile everything:
# make

10
alsa.c
Wyświetl plik

@ -8,7 +8,7 @@ You should have received a copy of the CC0 Public Domain Dedication along with t
#include <stdio.h>
#include <stdlib.h>
#include <alsa/asoundlib.h>
#include <alsa/asoundlib.h>
#include "alsa.h"
struct alsa {
@ -96,14 +96,14 @@ int open_alsa_read(struct pcm **p, char *name)
free(alsa);
return 0;
}
if (snd_pcm_hw_params_any(pcm, params) < 0) {
fprintf(stderr, "Can not configure this PCM device.\n");
snd_pcm_close(alsa->pcm);
free(alsa);
return 0;
}
if (snd_pcm_hw_params_set_access(pcm, params, SND_PCM_ACCESS_RW_INTERLEAVED) < 0) {
fprintf(stderr, "Error setting access.\n");
snd_pcm_close(alsa->pcm);
@ -172,14 +172,14 @@ int open_alsa_write(struct pcm **p, char *name, int rate, int channels, float se
free(alsa);
return 0;
}
if (snd_pcm_hw_params_any(pcm, params) < 0) {
fprintf(stderr, "Can not configure this PCM device.\n");
snd_pcm_close(alsa->pcm);
free(alsa);
return 0;
}
if (snd_pcm_hw_params_set_access(pcm, params, SND_PCM_ACCESS_RW_INTERLEAVED) < 0) {
fprintf(stderr, "Error setting access.\n");
snd_pcm_close(alsa->pcm);

2
ddc.c
Wyświetl plik

@ -5,7 +5,7 @@ To the extent possible under law, the author(s) have dedicated all copyright and
You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
*/
#include <complex.h>
#include <complex.h>
#include <math.h>
#include <stdlib.h>
#include "window.h"

Wyświetl plik

@ -10,7 +10,7 @@ You should have received a copy of the CC0 Public Domain Dedication along with t
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <complex.h>
#include <complex.h>
#include <time.h>
#include "mmap_file.h"
#include "pcm.h"

Wyświetl plik

@ -10,7 +10,7 @@ You should have received a copy of the CC0 Public Domain Dedication along with t
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <complex.h>
#include <complex.h>
#include <time.h>
#include "pcm.h"
#include "ddc.h"

Wyświetl plik

@ -10,7 +10,7 @@ You should have received a copy of the CC0 Public Domain Dedication along with t
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <complex.h>
#include <complex.h>
#include <limits.h>
#include "yuv.h"
#include "utils.h"
@ -195,7 +195,7 @@ int main(int argc, char **argv)
}
while (add_sample(0.0));
close_pcm(pcm);
close_img(img);
return 0;

Wyświetl plik

@ -39,12 +39,12 @@ int mmap_file_ro(void **p, char *name, size_t *size)
if (*p == MAP_FAILED) {
perror("mmap");
close(fd);
return 0;
return 0;
}
if (close(fd) == -1) {
perror ("close");
return 0;
return 0;
}
*size = sb.st_size;
return 1;
@ -87,12 +87,12 @@ int mmap_file_rw(void **p, char *name, size_t size)
if (*p == MAP_FAILED) {
perror("mmap");
close(fd);
return 0;
return 0;
}
if (close(fd) == -1) {
perror ("close");
return 0;
return 0;
}
return 1;
}