Line 21... |
Line 21... |
21 |
#define SOUND_SPEED 340.0 // sound speed in air in metrs per second
|
21 |
#define SOUND_SPEED 340.0 // sound speed in air in metrs per second
|
22 |
#define MAX_RANGE 10.0 // maximal working radius in meters
|
22 |
#define MAX_RANGE 10.0 // maximal working radius in meters
|
23 |
#define APERTURE 0.2 // distance between microphones
|
23 |
#define APERTURE 0.2 // distance between microphones
|
24 |
#define MAP_SIZE 100
|
24 |
#define MAP_SIZE 100
|
25 |
|
25 |
|
26 |
#define RESOLUTION 1/100 // resolution in metres per map pixel
|
26 |
#define RESOLUTION 100 // resolution per map pixel
|
27 |
|
27 |
|
28 |
static char *device = "plughw:0,0"; /* playback device */
|
28 |
static char *device = "plughw:0,0"; /* playback device */
|
29 |
static snd_pcm_format_t format = SND_PCM_FORMAT_S16; /* sample format */
|
29 |
static snd_pcm_format_t format = SND_PCM_FORMAT_S16; /* sample format */
|
30 |
static unsigned int rate = 96000; /* stream rate */
|
30 |
static unsigned int rate = 96000; /* stream rate */
|
31 |
static unsigned int buffer_time = 2 * (MAX_RANGE / SOUND_SPEED * 1e6); /* ring buffer length in us */
|
31 |
static unsigned int buffer_time = 2 * (MAX_RANGE / SOUND_SPEED * 1e6); /* ring buffer length in us */
|