kopia lustrzana https://github.com/markondej/fm_transmitter
Stdin read ready
rodzic
c694485a9c
commit
3efe490c54
|
@ -13,17 +13,16 @@ Then you can use it by typing:
|
|||
sudo ./fm_transmitter [filename] [frequency]
|
||||
```
|
||||
|
||||
Like:
|
||||
You can open WAVE files or read audio data from stdin, i.e.:
|
||||
```
|
||||
sudo ./fm_transmitter star_wars.wav 100.0
|
||||
sox star_wars.wav -r 8000 -c 1 -b 8 -t wav - | sudo ./fm_transmitter - 100.0
|
||||
```
|
||||
|
||||
You can open WAVE files.
|
||||
|
||||
Please keep in mind that transmitting on certain frequencies without special permissions may be illegal in your country.
|
||||
|
||||
## New features
|
||||
|
||||
* works both on RPi 1 and RPi 2
|
||||
* reads mono and stereo files
|
||||
* reads data from stdin
|
||||
* based on threads
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
"transmitter.h"
|
||||
<cstdlib>
|
||||
|
||||
1438126479 /home/pi/Projects/fm_transmitter/transmitter.h
|
||||
1438126951 /home/pi/Projects/fm_transmitter/transmitter.h
|
||||
"wave_reader.h"
|
||||
"stdin_reader.h"
|
||||
"error_reporter.h"
|
||||
|
||||
1437599898 source:/home/pi/Projects/fm_transmitter/transmitter.cpp
|
||||
1438244712 source:/home/pi/Projects/fm_transmitter/transmitter.cpp
|
||||
"transmitter.h"
|
||||
<exception>
|
||||
<sstream>
|
||||
|
@ -256,13 +256,13 @@
|
|||
<sstream>
|
||||
<unistd.h>
|
||||
|
||||
1438122736 /home/pi/Projects/fm_transmitter/stdin_reader.h
|
||||
1438246503 /home/pi/Projects/fm_transmitter/stdin_reader.h
|
||||
<vector>
|
||||
<fcntl.h>
|
||||
"audio_format.h"
|
||||
"error_reporter.h"
|
||||
|
||||
1438122736 source:/home/pi/Projects/fm_transmitter/stdin_reader.cpp
|
||||
1438245689 source:/home/pi/Projects/fm_transmitter/stdin_reader.cpp
|
||||
"stdin_reader.h"
|
||||
<exception>
|
||||
<sstream>
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
<File name="stdin_reader.cpp" open="1" top="0" tabpos="2">
|
||||
<Cursor position="1771" topLine="33" />
|
||||
</File>
|
||||
<File name="stdin_reader.h" open="1" top="0" tabpos="3">
|
||||
<Cursor position="1902" topLine="35" />
|
||||
<File name="stdin_reader.h" open="1" top="1" tabpos="3">
|
||||
<Cursor position="1902" topLine="31" />
|
||||
</File>
|
||||
<File name="transmitter.cpp" open="1" top="1" tabpos="4">
|
||||
<File name="transmitter.cpp" open="1" top="0" tabpos="4">
|
||||
<Cursor position="4471" topLine="23" />
|
||||
</File>
|
||||
<File name="transmitter.h" open="0" top="0" tabpos="3">
|
||||
|
|
|
@ -36,8 +36,6 @@
|
|||
#include <sstream>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
using std::exception;
|
||||
using std::ostringstream;
|
||||
|
||||
|
|
|
@ -39,9 +39,9 @@
|
|||
#include "audio_format.h"
|
||||
#include "error_reporter.h"
|
||||
|
||||
#define BUFFER_SIZE 128
|
||||
#define SAMPLE_RATE 22050
|
||||
#define BITS_PER_SAMPLE 16
|
||||
#define BUFFER_SIZE 1024
|
||||
#define SAMPLE_RATE 8000
|
||||
#define BITS_PER_SAMPLE 8
|
||||
#define CHANNELS 1
|
||||
|
||||
using std::vector;
|
||||
|
|
Ładowanie…
Reference in New Issue