Created
March 22, 2018 20:44
-
-
Save RelativisticMechanic/aabf8a5f35cd41aaa468a451f0bb0c32 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsigned int test_int = 0; | |
static int audio_interface_callback( const void *inputBuffer, void *outputBuffer, | |
unsigned long framesPerBuffer, | |
const PaStreamCallbackTimeInfo* timeInfo, | |
PaStreamCallbackFlags statusFlags, | |
void *userData ) | |
{ | |
uint16_t* out = (uint16_t*)outputBuffer; | |
uint16_t* data = (uint16_t*)((uintptr_t)userData + test_int * sizeof(uint16_t)); | |
for(int i = 0; i < framesPerBuffer; i++) | |
{ | |
*out++ = *data++; | |
*out++ = *data++; | |
test_int += 2; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment