Home | Develop | Download | Contact
pdsrecord.h
1 /*
2  * pdsrecord.h
3  *
4  * Copyright 2011 Fernando Pujaico Rivera <fernando.pujaico.rivera@gmail.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19  * MA 02110-1301, USA.
20  *
21  */
22 
29 #ifndef __PDSRECORD_H__
30 #define __PDSRECORD_H__
31 
32 #include <stdio.h>
33 #include <stdlib.h>
34 #include <pds/pdsra.h>
35 #include <pds/pdsdaglobal.h>
36 #include <pds/pdsdautils.h>
37 #include <alsa/asoundlib.h>
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
47 #ifndef TRUE
48 
52  #define TRUE 1
53 #endif
54 
55 #ifndef FALSE
56 
60  #define FALSE 0
61 #endif
62 
71 typedef struct
72 {
73  char *buffer1B;
74  short *buffer2B;
75  int *buffer4B;
76 
78 
81 
83 
84  snd_pcm_t *capture_handle;
85 }PdsRecord;
86 
87 
100 
101 
110 
111 
121 int pds_record_read(PdsRecord *A,PdsVector *X);
122 
123 
129 void pds_record_free(PdsRecord *A);
130 
131 
138 void pds_record_destroy(PdsRecord **A);
139 
144 #ifdef __cplusplus
145 }
146 #endif
147 
148 
149 #endif /* __PDSRECORD_H__ */
PdsDaNatural freq
Definition: pdsrecord.h:82
PdsDaNatural bytes
Definition: pdsrecord.h:80
int pds_record_read(PdsRecord *A, PdsVector *X)
Lee los datos en el buffer de lectura. Los datos estarán comprendidos entre [-1.0,1.0>.
char * buffer1B
Definition: pdsrecord.h:73
La estructura tipo PdsRecord . Esta estructura genera una metodo para grabar audio por la entrada de ...
Definition: pdsrecord.h:71
int pds_record_set_samples_buffer(PdsRecord *A, PdsDaNatural samples)
Establece la cantidad de muestras en el buffer de lectura.
short * buffer2B
Definition: pdsrecord.h:74
void pds_record_free(PdsRecord *A)
Libera la estructura para la grabación de audio digital.
PdsRecord * pds_record_new(PdsDaNatural *freq, PdsDaNatural *bits)
Crea una estructura para la grabación de audio digital.
PdsDaNatural bits
Definition: pdsrecord.h:79
int * buffer4B
Definition: pdsrecord.h:75
PdsDaNatural samples
Definition: pdsrecord.h:77
unsigned int PdsDaNatural
Definition: pdsdaglobal.h:46
void pds_record_destroy(PdsRecord **A)
Libera la estructura para la grabación de audio digital, y carga con NULL la estructura.
snd_pcm_t * capture_handle
Definition: pdsrecord.h:84

Enlaces de interés

HomePage Bazaar Download Bug report Ayuda Developer Feed