• Main Page
  • Classes
  • Files
  • File List
  • File Members

libfreenect-audio.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of the OpenKinect Project. http://www.openkinect.org
00003  *
00004  * Copyright (c) 2011 individual OpenKinect contributors. See the CONTRIB file
00005  * for details.
00006  *
00007  * This code is licensed to you under the terms of the Apache License, version
00008  * 2.0, or, at your option, the terms of the GNU General Public License,
00009  * version 2.0. See the APACHE20 and GPL2 files for the text of the licenses,
00010  * or the following URLs:
00011  * http://www.apache.org/licenses/LICENSE-2.0
00012  * http://www.gnu.org/licenses/gpl-2.0.txt
00013  *
00014  * If you redistribute this file in source form, modified or unmodified, you
00015  * may:
00016  *   1) Leave this header intact and distribute it under the same terms,
00017  *      accompanying it with the APACHE20 and GPL20 files, or
00018  *   2) Delete the Apache 2.0 clause and accompany it with the GPL2 file, or
00019  *   3) Delete the GPL v2 clause and accompany it with the APACHE20 file
00020  * In all cases you must keep the copyright notice intact and include a copy
00021  * of the CONTRIB file.
00022  *
00023  * Binary distributions must follow the binary distribution requirements of
00024  * either License.
00025  */
00026 
00027 #ifndef LIBFREENECT_AUDIO_H
00028 #define LIBFREENECT_AUDIO_H
00029 
00030 #include <libfreenect.h>
00031 #include <stdint.h>
00032 
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036 
00038 typedef struct {
00039         int16_t left;
00040         int16_t right;
00041         int16_t center;
00042         int16_t lfe;
00043         int16_t surround_left;
00044         int16_t surround_right;
00045 } freenect_sample_51;
00046 
00060 typedef void (*freenect_audio_in_cb)(freenect_device *dev, int num_samples,
00061                                      int32_t* mic1, int32_t* mic2,
00062                                      int32_t* mic3, int32_t* mic4,
00063                                      int16_t* cancelled, void *unknown/*, timestamp_t timestamp*/);
00064 
00073 typedef void (*freenect_audio_out_cb)(freenect_device *dev, freenect_sample_51* samples, int* sample_count);
00074 
00083 FREENECTAPI void freenect_set_audio_in_callback(freenect_device *dev, freenect_audio_in_cb callback);
00084 
00094 FREENECTAPI void freenect_set_audio_out_callback(freenect_device *dev, freenect_audio_out_cb callback);
00095 
00103 FREENECTAPI int freenect_start_audio(freenect_device* dev);
00104 
00112 FREENECTAPI int freenect_stop_audio(freenect_device* dev);
00113 
00114 #ifdef __cplusplus
00115 }
00116 #endif
00117 
00118 #endif //
00119 
00120 

Generated on Mon May 14 2012 11:25:48 for libfreenect by  doxygen 1.7.1