mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-05 17:01:17 -05:00
5b9645bf09
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@189 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
56 lines
2.3 KiB
HTML
56 lines
2.3 KiB
HTML
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<meta name="GENERATOR" content="Mozilla/4.75 [en]C-gatewaynet (Win98; U) [Netscape]">
|
|
<meta name="Author" content="Phil Burk">
|
|
<meta name="Description" content="Tutorial for PortAudio, a cross platform, open-source, audio I/O library.It provides a very simple API for recording and/or playing sound using a simple callback function.">
|
|
<meta name="KeyWords" content="audio, tutorial, library, portable, open-source, DirectSound,sound, music, JSyn, synthesis,">
|
|
<title>PortAudio Tutorial</title>
|
|
</head>
|
|
<body>
|
|
|
|
<center><table COLS=1 WIDTH="100%" BGCOLOR="#FADA7A" >
|
|
<tr>
|
|
<td>
|
|
<center>
|
|
<h1>
|
|
PortAudio Tutorial</h1></center>
|
|
</td>
|
|
</tr>
|
|
</table></center>
|
|
|
|
<h2>
|
|
Utility Functions</h2>
|
|
|
|
<blockquote>Here are several more functions that are not critical, but
|
|
may be handy when using PortAudio.
|
|
<p>Pa_StreamActive() returns one when the stream in playing audio, zero
|
|
when not playing, or a negative error number if the stream is invalid.
|
|
The stream is active between calls to Pa_StartStream() and Pa_StopStream(),
|
|
but may also become inactive if the callback returns a non-zero value.
|
|
In the latter case, the stream is considered inactive after the last buffer
|
|
has finished playing.
|
|
<blockquote>
|
|
<pre>PaError Pa_StreamActive( PortAudioStream *stream );</pre>
|
|
</blockquote>
|
|
Pa_StreamTime() returns the number of samples that have been generated.
|
|
PaTimeStamp is a double precision number which is a convenient way to pass
|
|
big numbers around even though we only need integers.
|
|
<blockquote>
|
|
<pre>PaTimestamp Pa_StreamTime( PortAudioStream *stream );</pre>
|
|
</blockquote>
|
|
The "CPU Load" is a fraction of total CPU time consumed by the stream's
|
|
audio processing. A value of 0.5 would imply that PortAudio and the sound
|
|
generating callback was consuming roughly 50% of the available CPU time.
|
|
This function may be called from the callback function or the application.
|
|
<blockquote>
|
|
<pre>double Pa_GetCPULoad( PortAudioStream* stream );</pre>
|
|
</blockquote>
|
|
</blockquote>
|
|
<font size=+2><a href="http://www.portaudio.com/">home</a> |
|
|
<a href="pa_tutorial.html">contents</a> | <a href="pa_tut_term.html">previous</a>
|
|
| <a href="pa_tut_devs.html">next</a></font>
|
|
</body>
|
|
</html>
|