00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
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);
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