summaryrefslogtreecommitdiff
path: root/portaudio/doc/src/tutorial/initializing_portaudio.dox
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-08-25 14:54:53 -0500
committersanine <sanine.not@pm.me>2022-08-25 14:54:53 -0500
commit37c97e345d12f95dde44e1d1a4c2f2aadd4615bc (patch)
treee1bb25bc855883062bdd7847ff2c04290f71c840 /portaudio/doc/src/tutorial/initializing_portaudio.dox
parent5634c7b04da619669f2f29f6798c03982be05180 (diff)
add initial structure
Diffstat (limited to 'portaudio/doc/src/tutorial/initializing_portaudio.dox')
-rw-r--r--portaudio/doc/src/tutorial/initializing_portaudio.dox29
1 files changed, 29 insertions, 0 deletions
diff --git a/portaudio/doc/src/tutorial/initializing_portaudio.dox b/portaudio/doc/src/tutorial/initializing_portaudio.dox
new file mode 100644
index 0000000..9439c35
--- /dev/null
+++ b/portaudio/doc/src/tutorial/initializing_portaudio.dox
@@ -0,0 +1,29 @@
+/** @page initializing_portaudio Initializing PortAudio
+@ingroup tutorial
+
+@section tut_init1 Initializing PortAudio
+
+Before making any other calls to PortAudio, you 'must' call Pa_Initialize(). This will trigger a scan of available devices which can be queried later. Like most PA functions, it will return a result of type paError. If the result is not paNoError, then an error has occurred.
+@code
+err = Pa_Initialize();
+if( err != paNoError ) goto error;
+@endcode
+
+You can get a text message that explains the error message by passing it to Pa_GetErrorText( err ). For Example:
+
+@code
+printf( "PortAudio error: %s\n", Pa_GetErrorText( err ) );
+@endcode
+
+It is also important, when you are done with PortAudio, to Terminate it:
+
+@code
+err = Pa_Terminate();
+if( err != paNoError )
+ printf( "PortAudio error: %s\n", Pa_GetErrorText( err ) );
+@endcode
+
+
+Previous: \ref writing_a_callback | Next: \ref open_default_stream
+
+*/ \ No newline at end of file