#include <mdaaudiosampleeditor.h>
Link against: mediaclientaudio.lib
class CMdaAudioClipUtility : public CBase, public MMMFClientUtility |
Public Member Enumerations | |
---|---|
enum | TState { ENotReady, EOpen, EPlaying, ERecording } |
Public Member Functions | |
---|---|
pure virtual void | ClearPlayWindow() |
virtual void | ClipUtil_Reserved3() |
virtual void | ClipUtil_Reserved4() |
pure virtual void | Close() |
pure virtual void | CropFromBeginningL() |
pure virtual void | CropL() |
pure virtual const TTimeIntervalMicroSeconds & | Duration() |
pure virtual void | PlayL() |
pure virtual const TTimeIntervalMicroSeconds & | Position() |
pure virtual void | RecordL() |
pure virtual const TTimeIntervalMicroSeconds & | RecordTimeAvailable() |
pure virtual void | SetMaxWriteLength(TInt) |
pure virtual void | SetPlayWindow(const TTimeIntervalMicroSeconds &, const TTimeIntervalMicroSeconds &) |
pure virtual void | SetPosition(const TTimeIntervalMicroSeconds &) |
pure virtual void | SetRepeats(TInt, const TTimeIntervalMicroSeconds &) |
pure virtual TState | State() |
pure virtual void | Stop() |
virtual CMdaAudioType * | TypeL() |
This class is used by both the audio recorder and audio converter. This class should not be used,
other than the TState enum.
Prior to 7.0s the pure virtual functions in this class were implemented virtual functions. In 7.0s
this changed, so now any classes derived from this one must implement the functions themselves.
Defines the possible state of the audio data sample.
Enumerator | Value | Description |
---|---|---|
ENotReady | 0 |
The audio clip recorder or audio converter has been constructed but no file or descriptor has been opened. |
EOpen |
Files or descriptors are open but no playing or recording operation is in progress. | |
EPlaying |
Audio sample data is playing. | |
ERecording |
New audio sample data is being recorded. |
void | ClearPlayWindow | ( | ) | [pure virtual] |
Removes any window defined on the audio sample data.
All subsequent playing, position setting and position querying requests are mapped to the whole of the audio sample data.
void | CropFromBeginningL | ( | ) | [pure virtual] |
Deletes all audio sample data from the beginning of the audio clip. The effects of the function cannot be undone.
The function is synchronous and can leave if there is a problem. The leave code depends on the configuration.
void | CropL | ( | ) | [pure virtual] |
Deletes all audio sample data after the current head position. The effects of the function cannot be undone.
The function is synchronous and can leave if there is a problem. The leave code depends on the configuration.
const TTimeIntervalMicroSeconds & | Duration | ( | ) | [pure virtual] |
Returns the duration of the audio sample data.
void | PlayL | ( | ) | [pure virtual] |
Begins playback of audio sample data at the current playback position using the current volume,
gain and priority settings.
const TTimeIntervalMicroSeconds & | Position | ( | ) | [pure virtual] |
Returns the current head position.
The head position is defined in terms of a time interval measured from the beginning of the audio sample data.
void | RecordL | ( | ) | [pure virtual] |
Starts appending new audio sample data.
The new audio sample data is appended to the existing audio sample data in the same format as
the existing audio sample data. If existing data is to be overwritten, then it should be cropped
to the appropriate length before appending the new data.
Note, before starting to record, make sure that the gain is set by calling
CMdaAudioRecorderUtility::SetGain(), as the initial gain is undefined. The gain might also
have been modified by another client application.
See also: CMdaAudioRecorderUtilityCMdaAudioRecorderUtility::SetGain()
const TTimeIntervalMicroSeconds & | RecordTimeAvailable | ( | ) | [pure virtual] |
Returns the recording time available for the selected file or descriptor and encoding format.
void | SetMaxWriteLength | ( | TInt | aMaxWriteLength = KMdaClipLocationMaxWriteLengthNone | ) | [pure virtual] |
Sets the maximum size for a file that is being recorded.
When this limit is reached, MMF stops recording and notifies the client application. Notification is caused
by MMdaObjectStateChangeObserver::MoscoStateChangeEvent() with the error code KErrEof.
This function is provided so that applications such as recorders can limit the amount of file storage/memory
that should be allocated.
Parameters | |
---|---|
aMaxWriteLength | The maximum file size in kilobytes. If the default value is used, there is no maximum file size. |
void | SetPlayWindow | ( | const TTimeIntervalMicroSeconds & | aStart, |
const TTimeIntervalMicroSeconds & | aEnd | |||
) | [pure virtual] |
Defines a window on the audio sample data.
The window is defined in terms of a start and end position.
When the current playback position reaches the window end position, or Stop() is called, the
current playback position is set to the window start position and playback stops.
The current playback position is not affected by a call to SetPlayWindow() unless it is outside
the new playback window, in which case it is set to the window start or end position depending
on which one is closer.
The window persists until ClearPlayWindow() is called.
Loading new audio sample data without adjusting or clearing the window will result in
playback errors if the window is outside the new data.
value is less than zero, it is set to zero. If this value is greater than aEnd,
then it is swapped with aEnd.
is greater than the value returned by Duration(), it is set to the value of Duration().
If this value is less than aStart, then it is swapped with aStart.
Parameters | |
---|---|
aStart | The position defining the start of the window, measured in microseconds. If this |
aEnd | The position defining the end of the window, measured in microseconds. If this value |
void | SetPosition | ( | const TTimeIntervalMicroSeconds & | aPosition | ) | [pure virtual] |
Sets the head position.
The playback head is moved to a position which is defined in terms of a time interval measured
from the beginning of the audio sample data. A subsequent call to PlayL() starts from
this new position.
void | SetRepeats | ( | TInt | aRepeatNumberOfTimes, |
const TTimeIntervalMicroSeconds & | aTrailingSilence | |||
) | [pure virtual] |
Sets the number of times the audio sample is to be repeated during the PlayL() operation.
A period of silence can follow each playing of the audio sample. The audio sample can be repeated
indefinitely or until stopped.
The number of times the audio sample, together with the trailing silence, is to
be repeated. If this is set to KMdaRepeatForever, then the audio sample, together with
the trailing silence, is repeated indefinitely. If this is set to zero, then the audio
sample is not repeated.
The length of the trailing silence in microseconds.
TState | State | ( | ) | [pure virtual] |
Returns the current state of the audio sample data.
void | Stop | ( | ) | [pure virtual] |
Stops the playback or recording operation.
The operation is stopped at the current location. For a playback operation, the head is positioned at the last played data.
CMdaAudioType * | TypeL | ( | ) | [virtual] |
This function is no longer supported. It is provided for binary compatibility with previous
releases and always leaves with KErrNotSupported.