Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- short int* samples = new short int[44100 / 24 * 23];
- static int framesSinceLastPrint = 0;
- const int framesInBetween = 1;
- framesSinceLastPrint++;
- if (framesSinceLastPrint == framesInBetween)
- {
- framesSinceLastPrint = 0;
- const int numSamples = 44100 / 24 * framesInBetween;
- for (int i = 0; i < numSamples; ++i)
- {
- samples[i] = std::sin(i / 44100.f * 2 * 3.1415f * 440) * 32767;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment