Update documentation.
Rewrite the module overview, add video and audio overviews, and update the camera overview. Tweak the radiooverview slightly. Still missing some links for examples and some fleshing out but hopefully a lot better. Change-Id: Id6486e20ba4a09c36d7739e327d4f9910ad083a5 Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
0889d69790
commit
5ec608b006
127
doc/src/audiooverview.qdoc
Normal file
127
doc/src/audiooverview.qdoc
Normal file
@@ -0,0 +1,127 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** All rights reserved.
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of the documentation of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:FDL$
|
||||
** GNU Free Documentation License
|
||||
** Alternatively, this file may be used under the terms of the GNU Free
|
||||
** Documentation License version 1.3 as published by the Free Software
|
||||
** Foundation and appearing in the file included in the packaging of
|
||||
** this file.
|
||||
**
|
||||
** Other Usage
|
||||
** Alternatively, this file may be used in accordance with the terms
|
||||
** and conditions contained in a signed written agreement between you
|
||||
** and Nokia.
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
/*!
|
||||
\page audiooverview.html
|
||||
\title Audio Overview
|
||||
\brief Audio playback and recording
|
||||
|
||||
\section1 Audio Features
|
||||
|
||||
Qt Multimedia offers a range of audio classes, covering both low and
|
||||
high level approaches to audio input and output.
|
||||
|
||||
\section1 Audio Implementation Details
|
||||
|
||||
\section2 Low level audio playback and recording
|
||||
Qt Multimedia offers classes for raw access to audio input and output
|
||||
facilities, allowing applications to receive raw data from devices like
|
||||
microphones, and to write raw data to speakers or other devices. Generally
|
||||
these classes do not do any audio decoding, or other processing, but they
|
||||
can support different types of raw audio data.
|
||||
|
||||
The QAudioOutput class offers raw audio data output, while QAudioInput
|
||||
offers raw audio data input. Both classes have adjustable buffers and
|
||||
latency, so they are suitable for both low latency usecases (like games
|
||||
or VOIP) and high latency (like music playback). The available hardware
|
||||
determines what audio outputs and inputs are available.
|
||||
|
||||
\section3 Push and Pull
|
||||
[TBD] - description of push vs. pull mode.
|
||||
|
||||
\section2 Low latency sound effects
|
||||
|
||||
In addition to the raw access to sound devices described above, the QSoundEffect class (and
|
||||
\l {SoundEffect} QML element) offers a slightly higher level way to play
|
||||
sounds. These classes allow you to specify a WAV format file which can
|
||||
then be played with low latency when necessary. Both QSoundEffect and the
|
||||
SoundEffect element have essentially the same API.
|
||||
|
||||
You can adjust the number of \l {QSoundEffect::setLoops()}{loops} a sound effect is played, as well as
|
||||
the \l {QSoundEffect::setVolume()}{volume} (or \l {QSoundEffect::setMuted()}{muting}) of the effect.
|
||||
|
||||
For older, Qt 4.x based applications \l QSound is also available. Applications
|
||||
are recommended to use QSoundEffect where possible.
|
||||
|
||||
\section2 Playing compressed audio
|
||||
For playing media or audio files that are not simple, raw audio, you can
|
||||
use the \l QMediaPlayer C++ class, or the \l {Audio} and \l {MediaPlayer} QML elements.
|
||||
The QMediaPlayer class (and MediaPlayer element) is also capable of playing
|
||||
\l{multimedia-playing-video}{video}, if required. The compressed audio formats supported does depend
|
||||
on the operating system environment, and also what media plugins the user
|
||||
may have installed.
|
||||
|
||||
Here is how you play a local file using C++:
|
||||
|
||||
\snippet doc/src/snippets/multimedia-snippets/media.cpp Local playback
|
||||
|
||||
You can also put files (even remote URLs) into a playlist:
|
||||
\snippet doc/src/snippets/multimedia-snippets/media.cpp Audio playlist
|
||||
|
||||
\section2 Recording audio to a file
|
||||
For recording audio to a file, the \l {QAudioRecorder} class allows you
|
||||
to compress audio data from an input device and record it.
|
||||
|
||||
\snippet doc/src/snippets/multimedia-snippets/media.cpp Audio recorder
|
||||
|
||||
\section1 Examples
|
||||
|
||||
There are both C++ and QML examples available.
|
||||
|
||||
C++ Examples:
|
||||
|
||||
\section2 Record a Sound Source
|
||||
|
||||
\l{audiorecorder}{AudioRecorder} is a demonstration of the discovery of
|
||||
the supported devices and codecs and the use of recording functions in the
|
||||
QAudioRecorder class.
|
||||
|
||||
\list
|
||||
\o \l audiodevices
|
||||
\o \l audioinput
|
||||
\o \l audiooutput
|
||||
\o \l audiorecorder
|
||||
\o \l spectrum
|
||||
\endlist
|
||||
|
||||
QML Examples:
|
||||
[TBD]
|
||||
|
||||
\section1 Reference Documentation
|
||||
|
||||
\section2 Audio Classes
|
||||
|
||||
\annotatedlist multimedia_audio
|
||||
|
||||
\section2 QML Elements
|
||||
|
||||
\list
|
||||
\o \l Audio
|
||||
\o \l MediaPlayer
|
||||
\endlist
|
||||
|
||||
*/
|
||||
Reference in New Issue
Block a user