libguac  0.9.0
 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 <guacamole/client.h>
34 #include <guacamole/stream.h>
35 
37 
42 
47 
52  const unsigned char* pcm_data, int length);
53 
57 typedef struct guac_audio_encoder {
58 
63  const char* mimetype;
64 
69 
74 
79 
81 
88 
92  unsigned char* pcm_data;
93 
97  int used;
98 
102  int length;
103 
107  unsigned char* encoded_data;
108 
113 
118 
124 
129 
134 
138  int rate;
139 
144  int channels;
145 
150  int bps;
151 
156 
160  void* data;
161 
162 };
163 
179  guac_audio_encoder* encoder);
180 
187 
198 void guac_audio_stream_begin(guac_audio_stream* stream, int rate, int channels, int bps);
199 
208 
220  const unsigned char* data, int length);
221 
228 
240  const unsigned char* data, int length);
241 
242 #endif
243