Skip to content

Commit

Permalink
Merge AudioServices into mainline.
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin McPherson committed Aug 5, 2009
1 parent bd51c30 commit e7052de
Show file tree
Hide file tree
Showing 88 changed files with 12,950 additions and 2 deletions.
1 change: 1 addition & 0 deletions bin/syncqt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ my %modules = ( # path to module name map
"QtDBus" => "$basedir/src/dbus",
"QtWebKit" => "$basedir/src/3rdparty/webkit/WebCore",
"phonon" => "$basedir/src/phonon",
"QtMultimedia" => "$basedir/src/multimedia",
);
my %moduleheaders = ( # restrict the module headers to those found in relative path
"QtWebKit" => "../WebKit/qt/Api",
Expand Down
4 changes: 4 additions & 0 deletions config.tests/unix/alsa/alsa.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SOURCES = alsatest.cpp
LIBS+=-lasound
CONFIG -= qt dylib
mac:CONFIG -= app_bundle
6 changes: 6 additions & 0 deletions config.tests/unix/alsa/alsatest.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <alsa/asoundlib.h>
int main(int argc,char **argv)
{
return 0;
}

36 changes: 35 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@ CFG_NOBUILD_PARTS=""
CFG_RELEASE_QMAKE=no
CFG_PHONON=auto
CFG_PHONON_BACKEND=yes
CFG_MULTIMEDIA=yes
CFG_SVG=yes
CFG_WEBKIT=auto # (yes|no|auto)

Expand Down Expand Up @@ -709,6 +710,7 @@ OPT_VERBOSE=no
OPT_HELP=
CFG_SILENT=no
CFG_GRAPHICS_SYSTEM=default
CFG_ALSA=auto

# initalize variables used for installation
QT_INSTALL_PREFIX=
Expand Down Expand Up @@ -848,7 +850,7 @@ while [ "$#" -gt 0 ]; do
VAL=no
;;
#Qt style yes options
-incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xshape|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-svg|-webkit|-scripttools|-rpath|-force-pkg-config)
-incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xshape|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-svg|-webkit|-scripttools|-rpath|-force-pkg-config)
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
VAL=yes
;;
Expand Down Expand Up @@ -1976,6 +1978,13 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
multimedia)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_MULTIMEDIA="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
*)
UNKNOWN_OPT=yes
;;
Expand Down Expand Up @@ -3152,6 +3161,7 @@ Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir
[-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
[-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
[-no-openssl] [-openssl] [-openssl-linked]
[-no-multimedia] [-multimedia]
[-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit]
[-no-scripttools] [-scripttools]
Expand Down Expand Up @@ -3292,6 +3302,9 @@ fi
-no-phonon-backend.. Do not build the platform phonon plugin.
+ -phonon-backend..... Build the platform phonon plugin.
-no-multimedia ..... Do not build the multimedia module.
* -multimedia ........ Build the multimedia module.
-no-svg ............ Do not build the SVG module.
+ -svg ............... Build the SVG module.
Expand Down Expand Up @@ -5664,6 +5677,14 @@ if [ "$CFG_PTMALLOC" != "no" ]; then
QMakeVar add QMAKE_LFLAGS "$outpath/lib/libptmalloc3.a"
fi

if [ "$CFG_ALSA" = "auto" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
CFG_ALSA=yes
else
CFG_ALSA=no
fi
fi

#-------------------------------------------------------------------------------
# ask for all that hasn't been auto-detected or specified in the arguments
#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -6104,6 +6125,10 @@ if [ "$CFG_EXCEPTIONS" != "no" ]; then
QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
fi

if [ "$CFG_ALSA" = "yes" ]; then
QT_CONFIG="$QT_CONFIG alsa"
fi

#
# Some Qt modules are too advanced in C++ for some old compilers
# Detect here the platforms where they are known to work.
Expand Down Expand Up @@ -6275,6 +6300,12 @@ else
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
fi

if [ "$CFG_MULTIMEDIA" = "yes" ]; then
QT_CONFIG="$QT_CONFIG multimedia"
else
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
fi

if [ "$CFG_EXCEPTIONS" = "no" ]; then
case "$COMPILER" in
g++*)
Expand Down Expand Up @@ -6776,6 +6807,7 @@ fi
[ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
[ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
[ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
[ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"

# sort QCONFIG_FLAGS for neatness if we can
[ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
Expand Down Expand Up @@ -7135,6 +7167,7 @@ echo "QtConcurrent code.... $CFG_CONCURRENT"
echo "QtScriptTools module $CFG_SCRIPTTOOLS"
echo "QtXmlPatterns module $CFG_XMLPATTERNS"
echo "Phonon module ....... $CFG_PHONON"
echo "Multimedia module ... $CFG_MULTIMEDIA"
echo "SVG module .......... $CFG_SVG"
echo "WebKit module ....... $CFG_WEBKIT"
echo "STL support ......... $CFG_STL"
Expand Down Expand Up @@ -7285,6 +7318,7 @@ if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG"
echo "NOTE: Mac OS X frameworks implicitly build debug and release Qt libraries."
echo
fi
echo "alsa support ........ $CFG_ALSA"
echo

sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
Expand Down
Binary file modified configure.exe
Binary file not shown.
5 changes: 5 additions & 0 deletions demos/qtdemo/xml/examples.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@
<category dirname="phonon" name="Phonon">
<example filename="musicplayer" name="Music Player" />
</category>
<category dirname="multimedia/audio" name="Multimedia">
<example filename="audiodevices" name="Audio Devices" />
<example filename="audiooutput" name="Audio Output" />
<example filename="audioinput" name="Audio Input" />
</category>
<category dirname="richtext" name="Rich Text">
<example filename="calendar" name="Calendar" />
<example filename="orderform" name="Order Form" />
Expand Down
11 changes: 11 additions & 0 deletions doc/src/examples-overview.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,17 @@
These examples demonstrate the basic techniques used to take advantage of
OpenGL in Qt applications.

\section1 \l{Qt Examples#Multimedia}{Multimedia}

\l{Qt Examples#Multimedia}

Qt provides low-level audio support on linux,windows and mac platforms by default and
an audio plugin API to allow developers to implement there own audio support for
custom devices and platforms.

These examples demonstrate the basic techniques used to take advantage of
Audio API in Qt applications.

\section1 \l{Qt Examples#SQL}{SQL}

\l{Qt Examples#SQL}{\inlineimage sql-examples.png
Expand Down
8 changes: 8 additions & 0 deletions doc/src/examples.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,14 @@
\o \l{phonon/musicplayer}{Music Player}\raisedaster
\endlist

\section1 Multimedia

\list
\o \l{multimedia/audio/audiodevices}{Audio Devices}\raisedaster
\o \l{multimedia/audio/audiooutput}{Audio Output}\raisedaster
\o \l{multimedia/audio/audioinput}{Audio Input}\raisedaster
\endlist

\section1 Qt Designer

\list
Expand Down
54 changes: 54 additions & 0 deletions doc/src/examples/audiodevices.qdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation ([email protected])
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the either Technology Preview License Agreement or the
** Beta Release License Agreement.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain
** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
** package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
\example multimedia/audio/audiodevices
\title Audio Devices Example

The Audio Devices example demonstrates the basic use of QAudioDeviceInfo class
provided with Qt.

Qt provides the QAudioDeviceInfo class to enable audio querying within
a standard application user interface.

This example allows you to browse audio devices available and try out different
configurations to see if they are supported.
*/
54 changes: 54 additions & 0 deletions doc/src/examples/audioinput.qdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation ([email protected])
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the either Technology Preview License Agreement or the
** Beta Release License Agreement.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain
** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
** package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
\example multimedia/audio/audioinput
\title AudioInput Example

The Audio Input example demonstrates the basic use of QAudioInput class
provided with Qt.

Qt provides the QAudioInput class to enable audio functionality within
a standard application user interface.

This example uses a fast-fourier transform on the input audio from the microphone
and displays the output.
*/
52 changes: 52 additions & 0 deletions doc/src/examples/audiooutput.qdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation ([email protected])
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the either Technology Preview License Agreement or the
** Beta Release License Agreement.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain
** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
** package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
\example multimedia/audio/audiooutput
\title Audio Output Example

The Audio Output example demonstrates the basic use of the QAudioOutput class
provided with Qt.

This example provides a tone generator to supply continuous audio playback.
The first button allows pause and resume of the playback.
The second button allows toggling between push and pull modes of operation.
*/
1 change: 1 addition & 0 deletions examples/examples.pro
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ SUBDIRS = \
multitouch \
gestures

contains(QT_CONFIG, multimedia):!static: SUBDIRS += multimedia
contains(QT_CONFIG, phonon):!static: SUBDIRS += phonon
contains(QT_CONFIG, webkit): SUBDIRS += webkit
embedded:SUBDIRS += qws
Expand Down
34 changes: 34 additions & 0 deletions examples/multimedia/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

The example launcher provided with Qt can be used to explore each of the
examples in this directory.

Documentation for these examples can be found via the Tutorial and Examples
link in the main Qt documentation.


Finding the Qt Examples and Demos launcher
==========================================

On Windows:

The launcher can be accessed via the Windows Start menu. Select the menu
entry entitled "Qt Examples and Demos" entry in the submenu containing
the Qt tools.

On Mac OS X:

For the binary distribution, the qtdemo executable is installed in the
/Developer/Applications/Qt directory. For the source distribution, it is
installed alongside the other Qt tools on the path specified when Qt is
configured.

On Unix/Linux:

The qtdemo executable is installed alongside the other Qt tools on the path
specified when Qt is configured.

On all platforms:

The source code for the launcher can be found in the demos/qtdemo directory
in the Qt package. This example is built at the same time as the Qt libraries,
tools, examples, and demonstrations.
Loading

0 comments on commit e7052de

Please sign in to comment.