os/mm/mm_plat/audio_visualization_api/inc/MVisualizationObserver.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:  Definition of the Audio Visualization Observer class.
    15 *
    16 */
    17 
    18 
    19 
    20 #ifndef MVISUALIZATIONOBSERVER_H
    21 #define MVISUALIZATIONOBSERVER_H
    22 
    23 class CVisualization;
    24 // CLASS DECLARATION
    25 
    26 
    27 class TVisualizationData
    28     {
    29     public:
    30 
    31         /**
    32         * Constructor.
    33         */
    34         TVisualizationData() { iFrequencyData = NULL, iWaveFormData = NULL; }
    35 
    36 		TUint64 iTimeStamp;
    37 		const TArray<TUint32>* iFrequencyData;
    38 		const TArray<TInt16>* iWaveFormData;
    39 
    40     };
    41 
    42 
    43 /**
    44 *  Interface class to be implemented by objects that are interested in receiving notifications
    45 *  from Audio Visualization object.
    46 *
    47 *  @since 3.0
    48 */
    49 class MVisualizationObserver
    50     {
    51     public:
    52 
    53         /**
    54         * Invoked when the state of the visualization object has changed.
    55         * @since 3.0
    56         * @param aVisualization The visualization object that changed
    57         * @param aData The visualization data.
    58         */
    59         virtual void DataChanged( const CVisualization* aVisualization, TVisualizationData aData ) = 0;
    60 
    61      	/**
    62         * Invoked when the visualization data rate changed.
    63         * @since 3.0
    64         * @param aVisualization The visualization object that changed
    65         * @param aData The visualization data.
    66         */
    67         virtual void DataRateChanged( const CVisualization* aVisualization ) = 0;
    68 
    69      	/**
    70         * Invoked when the visualization frequency band count changed.
    71         * @since 3.0
    72         * @param aVisualization The visualization object that changed
    73         * @param aData The visualization data.
    74         */
    75         virtual void FrequencyBandCountChanged( const CVisualization* aVisualization ) = 0;
    76 
    77      	/**
    78         * Invoked when the visualization is preempted.
    79         * @since 3.0
    80         */
    81         virtual void VisualizationPreempted( ) = 0;
    82 
    83      	/**
    84         * Invoked when the visualization is resumed.
    85         * @since 3.0
    86         */
    87         virtual void VisualizationResumed( ) = 0;
    88 
    89      	/**
    90         * Invoked when the visualization is started.
    91         * @since 3.0
    92         */
    93         virtual void VisualizationStarted( ) = 0;
    94 
    95      	/**
    96         * Invoked when the visualization is stopped.
    97         * @since 3.0
    98         */
    99         virtual void VisualizationStopped( ) = 0;
   100 
   101      	/**
   102         * Invoked when the visualization the waveform data length changed.
   103         * @since 3.0
   104         * @param aVisualization The visualization object that changed
   105         * @param aData The visualization data.
   106         */
   107         virtual void WaveformDataLengthChanged( const CVisualization* aVisualization ) = 0;
   108 
   109     };
   110 
   111 #endif      // MVISUALIZATIONOBSERVER_H
   112 
   113 // End of File