libfreenect  0.1-beta
libfreenect_audio.h
Go to the documentation of this file.
1 /*
2  * This file is part of the OpenKinect Project. http://www.openkinect.org
3  *
4  * Copyright (c) 2011 individual OpenKinect contributors. See the CONTRIB file
5  * for details.
6  *
7  * This code is licensed to you under the terms of the Apache License, version
8  * 2.0, or, at your option, the terms of the GNU General Public License,
9  * version 2.0. See the APACHE20 and GPL2 files for the text of the licenses,
10  * or the following URLs:
11  * http://www.apache.org/licenses/LICENSE-2.0
12  * http://www.gnu.org/licenses/gpl-2.0.txt
13  *
14  * If you redistribute this file in source form, modified or unmodified, you
15  * may:
16  * 1) Leave this header intact and distribute it under the same terms,
17  * accompanying it with the APACHE20 and GPL20 files, or
18  * 2) Delete the Apache 2.0 clause and accompany it with the GPL2 file, or
19  * 3) Delete the GPL v2 clause and accompany it with the APACHE20 file
20  * In all cases you must keep the copyright notice intact and include a copy
21  * of the CONTRIB file.
22  *
23  * Binary distributions must follow the binary distribution requirements of
24  * either License.
25  */
26 #pragma once
27 
28 #include "libfreenect.h"
29 #include <stdint.h>
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
36 typedef struct {
37  int16_t left;
38  int16_t right;
39  int16_t center;
40  int16_t lfe;
41  int16_t surround_left;
42  int16_t surround_right;
44 
58 typedef void (*freenect_audio_in_cb)(freenect_device *dev, int num_samples,
59  int32_t* mic1, int32_t* mic2,
60  int32_t* mic3, int32_t* mic4,
61  int16_t* cancelled, void *unknown/*, timestamp_t timestamp*/);
62 
71 typedef void (*freenect_audio_out_cb)(freenect_device *dev, freenect_sample_51* samples, int* sample_count);
72 
82 
93 
102 
111 
112 #ifdef __cplusplus
113 }
114 #endif
#define FREENECTAPI
If Win32, export all functions for DLL usage.
Definition: libfreenect.h:188
struct _freenect_device freenect_device
Definition: libfreenect.h:180
FREENECTAPI int freenect_stop_audio(freenect_device *dev)
FREENECTAPI void freenect_set_audio_in_callback(freenect_device *dev, freenect_audio_in_cb callback)
FREENECTAPI int freenect_start_audio(freenect_device *dev)
void(* freenect_audio_out_cb)(freenect_device *dev, freenect_sample_51 *samples, int *sample_count)
Definition: libfreenect_audio.h:71
FREENECTAPI void freenect_set_audio_out_callback(freenect_device *dev, freenect_audio_out_cb callback)
void(* freenect_audio_in_cb)(freenect_device *dev, int num_samples, int32_t *mic1, int32_t *mic2, int32_t *mic3, int32_t *mic4, int16_t *cancelled, void *unknown)
Definition: libfreenect_audio.h:58
Structure to represent a single 16-bit signed little-endian PCM sample.
Definition: libfreenect_audio.h:36
int16_t lfe
Definition: libfreenect_audio.h:40
int16_t right
Definition: libfreenect_audio.h:38
int16_t surround_left
Definition: libfreenect_audio.h:41
int16_t center
Definition: libfreenect_audio.h:39
int16_t surround_right
Definition: libfreenect_audio.h:42
int16_t left
Definition: libfreenect_audio.h:37