Created
December 12, 2016 05:44
-
-
Save GRGSIBERIA/568ecd9e242455f1ac9b76c44b7642d2 to your computer and use it in GitHub Desktop.
PortAudioの一部を抜粋
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
struct PaTestData { | |
int frameIndex; | |
int maxFrameIndex; | |
SAMPLE *recordedSamples; | |
}; | |
int main() { | |
PaTestData data; | |
PaStreamParameters inputParameters, outputParameters; | |
PaStream *stream; | |
data.maxFrameIndex = totalFrames; | |
// 以下,2行に渡りdataを初期化 | |
err = Pa_Initialize(); | |
inputParameters.device = Pa_GetDefaultInputDevice(); | |
// 以下,4行に渡りinputParametersを初期化 | |
outputParameters.device = Pa_GetDefaultOutputDevice(); | |
// 以下,4行に渡りoutputParametersを初期化 | |
err = Pa_OpenStream(/* 8個の引数 */); | |
err = Pa_StartStream(stream); | |
while ((err = Pa_IsStreamActive(stream)) == 1) | |
Pa_Sleep(1000); // ストリーミング | |
err = Pa_CloseStream(stream); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment