Home | Develop | Download | Contact
pdsplayback.h
1 /*
2  * pdsplayback.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 __PDSPLAYBACK_H__
30 #define __PDSPLAYBACK_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 *playback_handle;
86 
87 
100 
101 
110 
111 
121 int pds_playback_write(PdsPlayback *A,PdsVector *X);
122 
123 
130 
131 
139 
144 #ifdef __cplusplus
145 }
146 #endif
147 
148 
149 #endif /* __PDSPLAYBACK_H__ */
PdsDaNatural bytes
Definition: pdsplayback.h:80
PdsPlayback * pds_playback_new(PdsDaNatural *freq, PdsDaNatural *bits)
Crea una estructura para la reproducción de audio digital.
PdsDaNatural bits
Definition: pdsplayback.h:79
snd_pcm_t * playback_handle
Definition: pdsplayback.h:84
PdsDaNatural samples
Definition: pdsplayback.h:77
PdsDaNatural freq
Definition: pdsplayback.h:82
char * buffer1B
Definition: pdsplayback.h:73
void pds_playback_destroy(PdsPlayback **A)
Libera la estructura para la reproducción de audio digital, y carga con NULL la estructura.
short * buffer2B
Definition: pdsplayback.h:74
unsigned int PdsDaNatural
Definition: pdsdaglobal.h:46
int pds_playback_write(PdsPlayback *A, PdsVector *X)
Escribe los datos de X en el buffer de salida. Los datos estarán comprendidos entre [-1...
void pds_playback_free(PdsPlayback *A)
Libera la estructura para la reproducción de audio digital.
int * buffer4B
Definition: pdsplayback.h:75
int pds_playback_set_samples_buffer(PdsPlayback *A, PdsDaNatural samples)
Establece la cantidad de muestras en el buffer de salida.
La estructura tipo PdsPlayback . Esta estructura genera una metodo para reproducir audio por la salid...
Definition: pdsplayback.h:71

Enlaces de interés

HomePage Bazaar Download Bug report Ayuda Developer Feed