Statistics
| Branch: | Revision:

chunker-player / capture / audio.h @ 1e69ae95

History | View | Annotate | Download (620 Bytes)

1
/* 
2
 * File:   audio.h
3
 * Author: carmelo
4
 *
5
 * Created on December 17, 2009, 12:32 PM
6
 */
7

    
8
#ifndef _AUDIO_H
9
#define        _AUDIO_H
10

    
11
#ifdef        __cplusplus
12
extern "C" {
13
#endif
14

    
15
#include <alsa/asoundlib.h>
16
#include <stdlib.h>
17

    
18
#define AUDIO_PERIOD 32
19

    
20
static int err;
21
static short buf[128];
22
static snd_pcm_t* capture_handle;
23
static snd_pcm_hw_params_t* hw_params;
24
static char* audio_buffer;
25
static int buffer_size;
26
static int frames;
27
int audio_s_bit;
28

    
29
void process_sample(unsigned char* buffer, int buffer_size);
30
int init_audio(char* audio_dev_name);
31
void close_audio_device();
32

    
33
#ifdef        __cplusplus
34
}
35
#endif
36

    
37
#endif        /* _AUDIO_H */
38