demos/spectrum/app/engine.h
changeset 29 b72c6db6890b
parent 25 e24348a560a6
child 30 5dc02b23752f
equal deleted inserted replaced
25:e24348a560a6 29:b72c6db6890b
     7 ** This file is part of the examples of the Qt Toolkit.
     7 ** This file is part of the examples of the Qt Toolkit.
     8 **
     8 **
     9 ** $QT_BEGIN_LICENSE:BSD$
     9 ** $QT_BEGIN_LICENSE:BSD$
    10 ** You may use this file under the terms of the BSD license as follows:
    10 ** You may use this file under the terms of the BSD license as follows:
    11 **
    11 **
    12 ** Redistribution and use in source and binary forms, with or without
    12 ** "Redistribution and use in source and binary forms, with or without
    13 ** modification, are permitted provided that the following conditions are met:
    13 ** modification, are permitted provided that the following conditions are
    14 ** - Redistributions of source code must retain the above copyright notice,
    14 ** met:
    15 **   this list of conditions and the following disclaimer.
    15 **   * Redistributions of source code must retain the above copyright
    16 ** - Redistributions in binary form must reproduce the above copyright notice,
    16 **     notice, this list of conditions and the following disclaimer.
    17 **   this list of conditions and the following disclaimer in the documentation
    17 **   * Redistributions in binary form must reproduce the above copyright
    18 **   and/or other materials provided with the distribution.
    18 **     notice, this list of conditions and the following disclaimer in
    19 ** - Neither the name of Nokia Corporation and its Subsidiary(-ies) nor the
    19 **     the documentation and/or other materials provided with the
    20 **   names of its contributors may be used to endorse or promote products
    20 **     distribution.
    21 **   derived from this software without specific prior written permission.
    21 **   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
    22 **
    22 **     the names of its contributors may be used to endorse or promote
    23 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    23 **     products derived from this software without specific prior written
    24 ** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    24 **     permission.
    25 ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    25 **
    26 ** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
    26 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    27 ** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    27 ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    28 ** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    28 ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    29 ** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    29 ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    30 ** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    30 ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    31 ** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    31 ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    32 ** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    32 ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    33 ** POSSIBILITY OF SUCH DAMAGE.
    33 ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
       
    34 ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
       
    35 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
       
    36 ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
    34 ** $QT_END_LICENSE$
    37 ** $QT_END_LICENSE$
    35 **
    38 **
    36 *****************************************************************************/
    39 ****************************************************************************/
    37 
    40 
    38 #ifndef ENGINE_H
    41 #ifndef ENGINE_H
    39 #define ENGINE_H
    42 #define ENGINE_H
    40 
    43 
    41 #include "spectrum.h"
    44 #include "spectrum.h"
    59 
    62 
    60 #ifdef DUMP_DATA
    63 #ifdef DUMP_DATA
    61 #include <QDir>
    64 #include <QDir>
    62 #endif
    65 #endif
    63 
    66 
    64 class QAudioInput;
       
    65 class QAudioOutput;
       
    66 class FrequencySpectrum;
    67 class FrequencySpectrum;
    67 class QFile;
    68 
       
    69 QT_FORWARD_DECLARE_CLASS(QAudioInput)
       
    70 QT_FORWARD_DECLARE_CLASS(QAudioOutput)
       
    71 QT_FORWARD_DECLARE_CLASS(QFile)
    68 
    72 
    69 /**
    73 /**
    70  * This class interfaces with the QtMultimedia audio classes, and also with
    74  * This class interfaces with the QtMultimedia audio classes, and also with
    71  * the SpectrumAnalyser class.  Its role is to manage the capture and playback
    75  * the SpectrumAnalyser class.  Its role is to manage the capture and playback
    72  * of audio data, meanwhile performing real-time analysis of the audio level
    76  * of audio data, meanwhile performing real-time analysis of the audio level