Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TAudioSequence
Inherited By:
None.
Purpose:
A derived class of TAudioFile that represents an Audio Interchange File Format (AIFF) sound file.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
Not intended to be derived.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- TAudioIFFSequence ()
- TAudioIFFSequence (const TFileSystemEntity & theFileName, MOpenFile::EPermissionsForMe forMe =MOpenFile::kRead, MOpenFile::EPermissionsForOthers forOthers =MOpenFile::kAllowRead)
- TAudioIFFSequence (const TFileSystemEntity & theFileName, const TAudioType& audioType, long numberOfChannels, MOpenFile::EPermissionsForOthers forOthers =MOpenFile::kAllowRead)
- TAudioIFFSequence (const TAudioIFFSequence &)
Interface Category:
API.
Purpose:
- Default constructor. Unitinitialized sequence.
- Opens an existing sound file.
- Creates a new sound file.
- Copy constructor.
Calling Context:
- Call directly to create an undefined object that will immediately be assigned to or streamed into.
- Call directly to open an existing sound file.
- Call directly to create a new sound file.
- Call directly to copy an object.
Parameters:
- Takes no parameters.
- const TFileSystemEntity & theFileName -The file entity to open.
- MOpenFile::EPermissionsForMe forMe =MOpenFile::kRead -Specifies owner permissions for the file system. The value must be MOpenFile::kReadWrite if new data is to be written into the sequence.
- MOpenFile::EPermissionsForOthers forOthers =MOpenFile::kAllowRead -Specifies non-owners' permissions for the file system.
- const TFileSystemEntity & theFileName -The file entity to create.
- const TAudioType & audioType -The type of audio data to be stored in the file.
- long numberOfChannels -The number of channels to be stored in the file.
- MOpenFile::EPermissionsForOthers forOthers =MOpenFile::kAllowRead -Specifies non-owners' permissions for the file system.
- const TAudioIFFSequence & -The audio sequence to copy.
Return Value:
None.
Exceptions:
Throws TTimeMediaException::kNoSequence if the data file does not exist or cannot be created.
Throws TTimeMediaException::kInvalidType if the type of data in the audio file is unsupported.
Concurrency:
Not multithread safe.
Other Considerations:
Note: The file system entity parameter used in constructing objects of this class contains an absolute pathname. When streamed, objects will continue to reference a file on the machine of origin.
virtual ~ TAudioIFFSequence ()
Interface Category:
API.
Purpose:
Destructor.
Calling Context:
Called by Runtime to destroy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TAudioIFFSequence & operator =(const TAudioIFFSequence &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Call directly when an object is assigned to another compatible object.
Parameters:
Return Value:
A non-const reference to the left-hand side object.
Exceptions:
Throws TTimeMediaException::kNoSequence if the data file does not exist.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual bool IsReadOnly () const
Interface Category:
API.
Purpose:
Returns true if the sequence cannot be written.
Calling Context:
Call directly to see if the sequence cannot be written.
Parameters:
Return Value:
Returns true if the sequence cannot be written, otherwise returns false.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void SeekToSample (TSamples :: Position position)
Interface Category:
API.
Purpose:
Seeks to a specific sample position in the sequence.
Calling Context:
Call directly to seek to a specific sample.
Parameters:
- TSamples :: Position position -The position to seek to.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TAudioIFFSequence::GetPositionInSamples
virtual TSamples :: Position GetPositionInSamples () const
Interface Category:
API.
Purpose:
Returns the current position in the file.
Calling Context:
Call directly to get the position in samples.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TSamples::Position Read (TMemorySurrogate & fillThis, TSamples::Position numberOfSamplesToRead)
Interface Category:
API.
Purpose:
Reads a block of memory from the sequence starting at the current Seek position. The Seek position is moved to the end of the block actually read.
Calling Context:
Call directly when reading data.
Parameters:
- TMemorySurrogate & fillThis -The block of memory to receive data from the sequence.
- TSamples::Position numberOfSamplesToRead -The specified number of samples to read from the sequence.
Return Value:
TSamples::Position -The number of samples actually read.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TSamples::Position Write (const TMemorySurrogate & dataToWrite, TSamples::Position numberOfSamplesToWrite)
Interface Category:
API.
Purpose:
Writes a block of memory into the sequence starting at the current Seek position. The Seek position is moved to the end of the block actually written. The Duration of the sequence is updated if changed by Write.
Calling Context:
Call directly when writing data.
Parameters:
- const TMemorySurrogate & dataToWrite -The block of memory to copy into the sequence.
- TSamples::Position numberOfSamplesToWrite -The specified number of samples to write into the sequence.
Return Value:
TSamples::Position -The number of samples actually written.
Exceptions:
Throws TTimeMediaException::kReadOnlySequence if the data file does not have the appropriate access permissions.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TMediaSequence * CreateSubrange (const TMediaRange & range) const
Interface Category:
API.
Purpose:
Creates a new audio sequence that is a subset of the audio sequence. The range specifies the start time and duration of the subset.
Calling Context:
Call directly to create a subset of an audio sequence. Unlike DeepCopy, CreateSubrange does not copy any actual data, just references to the data. This is an inexpensive operation.
Parameters:
- const TMediaRange & range -A range specifying the start and duration of the subset.
Return Value:
TMediaSequence* -A new audio sequence that is a subset of the original.
Exceptions:
Throws TTimeMediaException::kInvalidSubrange if the duration of the subrange exceeds the current duration of the sequence.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TAudioIFFSequence::GetDurationInSamples
virtual TSamples :: Position GetDurationInSamples () const
Interface Category:
API.
Purpose:
Returns the total number of samples in the audio sequence.
Calling Context:
Call directly to determine how long the sequence is.
Parameters:
Return Value:
virtual TSamples :: Position -The number of samples.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TStream & operator <<= (TStream & fromWhere)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Call directly to stream in data.
Parameters:
- TStream & fromWhere -The stream the object streams itself in from.
Return Value:
Returns a reference to the stream the object streams itself in from.
Exceptions:
Throws TInvalidVersionError if the versions don't match.
Throws TTimeMediaException::kNoSequence if the data file does not exist or cannot be created.
Throws TTimeMediaException::kInvalidSubrange if the duration of the subrange exceeds the current duration of the sequence.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TStream & operator >>=(TStream & toWhere) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Call directly to stream out data.
Parameters:
- TStream & toWhere -The stream the object streams itself out to.
Return Value:
Returns a reference to the stream the object streams itself out to.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual long Hash () const
Interface Category:
API.
Purpose:
Generates a hash value.
Calling Context:
Call directly to generate a hash value.
Parameters:
Return Value:
The hash value.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.