epoc32/include/mmf/common/mmfbase.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
williamr@2
     1
// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@2
     4
// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
williamr@2
     5
// which accompanies this distribution, and is available
williamr@2
     6
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@2
    14
//
williamr@2
    15
williamr@2
    16
#ifndef __MMFBASE_H__
williamr@2
    17
#define __MMFBASE_H__
williamr@2
    18
williamr@2
    19
// Standard EPOC32 includes
williamr@2
    20
#include <e32base.h>
williamr@2
    21
williamr@2
    22
williamr@2
    23
/** 
williamr@2
    24
@publishedAll
williamr@2
    25
@released
williamr@2
    26
williamr@2
    27
The priority for clients accessing a sound output device for audio playback or audio streaming.
williamr@2
    28
williamr@2
    29
This is a value between EMdaPriorityMin and EMdaPriorityMax. The higher value indicates a more 
williamr@2
    30
important request. It is used to resolve conflicts when more than one client tries to access the
williamr@2
    31
same hardware resource simultaneously.
williamr@2
    32
williamr@2
    33
One of these values is passed in the first parameter to CMdaAudioOutputStream::SetPriority().
williamr@2
    34
williamr@2
    35
@see CMdaAudioOutputStream::SetPriority()
williamr@2
    36
*/
williamr@2
    37
enum TMdaPriority
williamr@2
    38
	{
williamr@2
    39
  	/**
williamr@2
    40
	The lowest priority (= – 100). This indicates that the client can be interrupted 
williamr@2
    41
	by any other client.
williamr@2
    42
	*/
williamr@2
    43
    EMdaPriorityMin = -100,
williamr@2
    44
	/**
williamr@2
    45
	Normal priority. This indicates that the client can be interrupted but only by higher priority clients.
williamr@2
    46
	*/
williamr@2
    47
    EMdaPriorityNormal = 0,
williamr@2
    48
	/**
williamr@2
    49
    The highest priority (= 100). This indicates that the client cannot be interrupted by other clients.
williamr@2
    50
	*/
williamr@2
    51
    EMdaPriorityMax = 100
williamr@2
    52
	};
williamr@2
    53
williamr@2
    54
/**
williamr@2
    55
@publishedAll
williamr@2
    56
@released
williamr@2
    57
williamr@2
    58
A set of priority values which define the behaviour to be adopted by an
williamr@2
    59
audio client if a higher priority client takes over the device.
williamr@2
    60
*/
williamr@2
    61
enum TMdaPriorityPreference
williamr@2
    62
	{
williamr@2
    63
	/**
williamr@2
    64
	No priority.
williamr@2
    65
	*/
williamr@2
    66
    EMdaPriorityPreferenceNone =	0x00000000,
williamr@2
    67
	/**
williamr@2
    68
	The audio data is time sensitive. The playback operation fails if it cannot happen when 
williamr@2
    69
	requested but degraded output such as mixing or muting is allowed.
williamr@2
    70
	*/
williamr@2
    71
    EMdaPriorityPreferenceTime =	0x00000001,
williamr@2
    72
	/**
williamr@2
    73
    The audio data must be played at the best possible quality (for example, it must not be degraded by 
williamr@2
    74
	muting or mixing). The playback operation is delayed until the sound device is available for exclusive use.
williamr@2
    75
	*/
williamr@2
    76
    EMdaPriorityPreferenceQuality = 0x00000002,
williamr@2
    77
	/**
williamr@2
    78
    The audio data is both time and quality sensitive. The playback operation fails if it cannot 
williamr@2
    79
	happen immediately at the highest quality.
williamr@2
    80
	*/
williamr@2
    81
    EMdaPriorityPreferenceTimeAndQuality = EMdaPriorityPreferenceTime|EMdaPriorityPreferenceQuality
williamr@2
    82
	};
williamr@2
    83
williamr@2
    84
/**
williamr@2
    85
@publishedAll
williamr@2
    86
@released
williamr@2
    87
williamr@2
    88
Holds the current state of DevSound.
williamr@2
    89
*/
williamr@2
    90
enum TMMFState
williamr@2
    91
{
williamr@2
    92
	/** Idle state.
williamr@2
    93
	*/
williamr@2
    94
	EMMFStateIdle,
williamr@2
    95
	/** The MMF is currently playing.
williamr@2
    96
	*/
williamr@2
    97
	EMMFStatePlaying,
williamr@2
    98
	/** The MMF is playing a tone.
williamr@2
    99
	*/
williamr@2
   100
	EMMFStateTonePlaying,
williamr@2
   101
	/** The MMF is currently recording.
williamr@2
   102
	*/
williamr@2
   103
	EMMFStateRecording,
williamr@2
   104
	/** The MMF is playing and recording.
williamr@2
   105
	*/
williamr@2
   106
	EMMFStatePlayingRecording,
williamr@2
   107
	/** The MMF is converting data.
williamr@2
   108
	*/
williamr@2
   109
	EMMFStateConverting
williamr@2
   110
};
williamr@2
   111
williamr@2
   112
/**
williamr@2
   113
@publishedAll
williamr@2
   114
@released
williamr@2
   115
williamr@2
   116
A class type representing the audio client's priority,
williamr@2
   117
priority preference and state settings.
williamr@2
   118
*/
williamr@2
   119
class TMMFPrioritySettings
williamr@2
   120
	{
williamr@2
   121
public:
williamr@2
   122
	TMMFPrioritySettings();
williamr@2
   123
	/**
williamr@2
   124
	Absolute priority of a client of the MMF Server.
williamr@2
   125
williamr@2
   126
	Used by the policy server to determine which client should gain access to the sound device.
williamr@2
   127
williamr@2
   128
	The priority which should be an integer in the range -100 to +100.
williamr@2
   129
	*/
williamr@2
   130
	TInt iPriority;
williamr@2
   131
williamr@2
   132
	/**
williamr@2
   133
    The priority preference that expresses the nature of the priority that can be none, 
williamr@2
   134
	time (or speed), quality or both time and quality.
williamr@2
   135
williamr@2
   136
	If this is set to EMdaPriorityPreferenceTime then the audio data is time sensitive. The playback 
williamr@2
   137
	operation fails if it cannot happen when requested but degraded output such as mixing or muting 
williamr@2
   138
	is allowed.
williamr@2
   139
williamr@2
   140
	If this is set to EMdaPriorityPreferenceQuality then the audio data must be played at the best possible 
williamr@2
   141
	quality (for example, it must not be degraded by muting or mixing). The playback operation is delayed
williamr@2
   142
	until the sound device is available for exclusive use.
williamr@2
   143
williamr@2
   144
	If this is set to EMdaPriorityPreferenceTimeAndQuality then the audio data is both time and quality 
williamr@2
   145
	sensitive. The playback operation fails if it cannot happen immediately at the highest quality.
williamr@2
   146
	*/
williamr@2
   147
	TMdaPriorityPreference iPref;
williamr@2
   148
williamr@2
   149
	/**
williamr@2
   150
    The state of the MMF player such as idle, playing, recording and so on. See the TMMFState enum for possible states.
williamr@2
   151
	*/
williamr@2
   152
	TMMFState iState;
williamr@2
   153
private:
williamr@2
   154
	/**
williamr@2
   155
	This member is internal and not intended for use.
williamr@2
   156
	*/
williamr@2
   157
	TInt iReserved1;
williamr@2
   158
	};
williamr@2
   159
williamr@2
   160
/**
williamr@2
   161
@publishedAll
williamr@2
   162
@released
williamr@2
   163
williamr@2
   164
This is a TPckgBuf package of a TMMFPrioritySettings.
williamr@2
   165
*/
williamr@2
   166
typedef TPckgBuf<TMMFPrioritySettings> TMMFPrioritySettingsPckg;
williamr@2
   167
williamr@2
   168
/**
williamr@2
   169
Initializes the object with arbitrary values.
williamr@2
   170
*/
williamr@2
   171
inline TMMFPrioritySettings::TMMFPrioritySettings() : iPriority(EMdaPriorityNormal), iPref(EMdaPriorityPreferenceNone), iState(EMMFStateIdle), iReserved1(0)
williamr@2
   172
	{
williamr@2
   173
	}
williamr@2
   174
williamr@2
   175
#endif