libguac  0.9.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
audio.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 Glyptodon LLC
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to deal
6  * in the Software without restriction, including without limitation the rights
7  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8  * copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20  * THE SOFTWARE.
21  */
22 
23 
24 #ifndef __GUAC_AUDIO_H
25 #define __GUAC_AUDIO_H
26 
33 #include "audio-fntypes.h"
34 #include "audio-types.h"
35 #include "client-types.h"
36 #include "stream-types.h"
37 
39 
44  const char* mimetype;
45 
50 
55 
60 
61 };
62 
64 
68  unsigned char* pcm_data;
69 
73  int used;
74 
78  int length;
79 
83  unsigned char* encoded_data;
84 
89 
94 
100 
105 
110 
114  int rate;
115 
120  int channels;
121 
126  int bps;
127 
132 
136  void* data;
137 
138 };
139 
155  guac_audio_encoder* encoder);
156 
163 
174 void guac_audio_stream_begin(guac_audio_stream* stream, int rate, int channels, int bps);
175 
184 
196  const unsigned char* data, int length);
197 
204 
216  const unsigned char* data, int length);
217 
218 #endif
219