From de1d97419b496747e8c5c0079b026975c289ed85 Mon Sep 17 00:00:00 2001 From: rbencina Date: Wed, 25 Jan 2012 07:08:11 +0000 Subject: [PATCH] cleaned up tutorial start page --- doc/src/tutorial/tutorial_start.dox | 58 +++++++++-------------------- 1 file changed, 18 insertions(+), 40 deletions(-) diff --git a/doc/src/tutorial/tutorial_start.dox b/doc/src/tutorial/tutorial_start.dox index 6e3f951..7d3b3a8 100644 --- a/doc/src/tutorial/tutorial_start.dox +++ b/doc/src/tutorial/tutorial_start.dox @@ -1,43 +1,15 @@ /** @page tutorial_start PortAudio Tutorials @ingroup tutorial -@section tut_start1 Overview of PortAudio +These tutorials takes you through a hands-on example of using PortAudio to make sound. If you'd prefer to start with a top-down overview of the PortAudio API, check out the @ref api_overview. -PortAudio is a cross-platform, open-source C language library for real-time audio input and output. The library provides functions that allow your software to acquire and output real-time audio streams from your computer's sound card or audio interface. It is designed to simplify writing cross-platform audio applications, and also to simplify the development of audio software in general by hiding the complexities of dealing directly with each native audio API. PortAudio is used to implement sound recording, editing and mixing applications, software synthesizers, effects processors, music players, Internet telephony applications, software-defined radios and more. Supported platforms include Microsoft Windows®, Mac OS X and Linux. In addition to the C language, third-party language bindings make it possible to call PortAudio from other programming languages including C++, C#, Python, PureBasic, FreePascal and Lazarus. - -Among the operating systems and audio subsystems supported by PortAudio: - -- Windows - - MME - - DirectSound - - WASAPI - - ASIO - -- Mac OS X - - Core Audio - -- Linux - - ALSA - - JACK - - OSS - -Below are the steps to writing a PortAudio application: - - - Write a callback function that will be called by PortAudio when audio processing is needed. - - Initialize the PA library and open a stream for audio I/O. - - Start the stream. Your callback function will be now be called repeatedly by PA in the background. - - In your callback you can read audio data from the inputBuffer and/or write data to the outputBuffer. - - Stop the stream by returning 1 from your callback, or by calling a stop function. - - Close the stream and terminate the library. - -In addition to this "Callback" architecture, V19 also supports a "Blocking I/O" model which uses read and write calls which may be more familiar to non-audio programmers. Note that at this time, not all APIs support this functionality. +@section tut_start1 Downloading +First thing you need to do is download the PortAudio source code either as a tarball from the website, or from the Subversion Repository. @section tut_start2 Compiling -First thing you'll need to know, after you've gotten PortAudio from the [wiki:UsingThePortAudioSvnRepository Subversion Repository] is how to compile your application, which of course, depends on your environment: - -ED: not actually sure this is how it should be organized, since it's possible to compile for multiple interfaces. +Once you've downloaded PortAudio you'll need to compile it, which of course, depends on your environment: - Windows - \ref compile_windows @@ -48,15 +20,25 @@ First thing you'll need to know, after you've gotten PortAudio from the [wiki:Us - \ref compile_mac_coreaudio - POSIX - \ref compile_linux - - Others? Many platforms with GCC/make can use the simple ./configure && make combination and simply use the resulting libraries in their code. @section tut_start3 Programming with PortAudio -In this tutorial, we'll show how to use the callback architecture to play a sawtooth wave. Much of the tutorial is taken from the file patest_saw.c, which is part of the PortAudio distribution. When you're done with this tutorial, you'll be armed with the basic knowledge you need to write an audio program. If you need more sample code, look in the "test" directory of the PortAudio distribution. Another great source of info is the portaudio.h Doxygen page, which documents the entire V19 API. Also see the page for tips on programming PortAudio located here: [http://www.assembla.com/spaces/portaudio/wiki/Tips]. +Below are the steps to writing a PortAudio application: + + - Write a callback function that will be called by PortAudio when audio processing is needed. + - Initialize the PA library and open a stream for audio I/O. + - Start the stream. Your callback function will be now be called repeatedly by PA in the background. + - In your callback you can read audio data from the inputBuffer and/or write data to the outputBuffer. + - Stop the stream by returning 1 from your callback, or by calling a stop function. + - Close the stream and terminate the library. + +In addition to this "Callback" architecture, V19 also supports a "Blocking I/O" model which uses read and write calls which may be more familiar to non-audio programmers. Note that at this time, not all APIs support this functionality. + +In this tutorial, we'll show how to use the callback architecture to play a sawtooth wave. Much of the tutorial is taken from the file paex_saw.c, which is part of the PortAudio distribution. When you're done with this tutorial, you'll be armed with the basic knowledge you need to write an audio program. If you need more sample code, look in the "examples" and "test" directory of the PortAudio distribution. Another great source of info is the portaudio.h Doxygen page, which documents the entire V19 API. Also see the page for tips on programming PortAudio on the PortAudio wiki. -If you are upgrading from V18, you may want to see our [http://www.portaudio.com/docs/proposals/index.html Proposed Enhancements to PortAudio], which describes the differences between V18 and V19. +If you are upgrading from V18, you may want to look at the Proposed Enhancements to PortAudio, which describes the differences between V18 and V19. - \ref writing_a_callback - \ref initializing_portaudio @@ -66,12 +48,8 @@ If you are upgrading from V18, you may want to see our [http://www.portaudio.com - \ref utility_functions - \ref querying_devices - \ref blocking_read_write -- \ref exploring - -Once you understand how PortAudio works, you might be interested in \ref exploring. -TO DO: - * Complete tutorial with utility and info about querying devices/opening non-default devices +Once you have a basic understanding of how to use PortAudio, you might be interested in \ref exploring. Next: \ref writing_a_callback -- 2.43.0