#include "libfreenect.h"
#include "libfreenect_audio.h"
#include "freenect_internal.h"
#include <string.h>
#include <stdlib.h>
Go to the source code of this file.
Set the audio in callback. This is the function called when the library has new microphone samples. It will be called approximately 62.5 times per second (16kHz sample rate, expect 512 samples/callback)
- Parameters
-
dev | Device for which to set the callback |
callback | Callback function to set |
Definition at line 142 of file audio.c.
Set the audio out callback. This is the "tell me what audio you're about
to play through the speakers so the Kinect can subtract it out" callback for a given device. If you choose not set an audio_out_callback, the library will send silence to the Kinect for you - it requires data either way.
- Parameters
-
dev | Device for which to set the callback |
callback | Callback function to set |
Definition at line 145 of file audio.c.
Start streaming audio for the specified device.
- Parameters
-
dev | Device for which to start audio streaming |
- Returns
- 0 on success, < 0 if error
Definition at line 149 of file audio.c.
Stop streaming audio for the specified device.
- Parameters
-
dev | Device for which to stop audio streaming |
- Returns
- 0 on success, < 0 if error
Definition at line 198 of file audio.c.