IMMRecordable

The IMMRecordable class is a base class and provides all of the common behavior for all recordable media devices. There are functions for cutting, copying, and pasting from a clipboard. Also, it includes delete, undo, and save functions.


IMMRecordable - Member Functions and Data by Group

Constructors & Destructor

Derived classes can use these members to create objects of this class.


[view class]
~IMMRecordable
public:
virtual ~IMMRecordable()

Supported Platforms

Windows OS/2 AIX
Yes Yes No


[view class]
IMMRecordable


Overload 1
protected:
IMMRecordable( const IString& deviceName, bool openNow, unsigned long instance, bool openShareable )

A derived class can construct an IMMRecordable from the following:

deviceName
You must specify what device you want to construct.
openNow
If true, it causes the device to automatically open the device before returning from the constructor; otherwise, you have to call one of the open functions to open the device yourself.
instance
You can provide your own instance number instead of letting IMMRecordable generate one.
openShareable
If true, it allows the hardware device to be shared by different programs; otherwise, the hardware cannot be shared.

Supported Platforms

Windows OS/2 AIX
Yes Yes No


Overload 2
protected:
IMMRecordable( unsigned long deviceIdentifier, const IString& newAlias = IString ( ) )

A derived class can construct an IMMRecordable from the following:

deviceIdentifier
The value the system uses to identify the device.
newAlias
The name you can use to associate a string to the device. Optional.

Supported Platforms

Windows OS/2 AIX
Yes Yes No


Editing

Use these members to edit and record data by the device.


[view class]
canRedo
public:
bool canRedo() const

Returns true if the device has any actions to be redone.

Exception

IAccessError The device identifier is not valid; possibly the device is closed.
IAccessError The device cannot acquire access to the hardware device; possibly another device of this same type was acquired for exclusive use in this or another process.
IAccessError An internal driver error occurred.
IInvalidRequest The device must be in the open state before calling this function.

Supported Platforms

Windows OS/2 AIX
No Yes No


[view class]
canUndo
public:
bool canUndo() const

Returns true if the device has any actions that can be undone.

Exception

IAccessError The device identifier is not valid; possibly the device is closed.
IAccessError The device cannot acquire access to the hardware device; possibly another device of this same type was acquired for exclusive use in this or another process.
IAccessError An internal driver error occurred.
IInvalidRequest The device must be in the open state before calling this function.

Supported Platforms

Windows OS/2 AIX
No Yes No


[view class]
copy
public:
virtual IMMRecordable& copy( const IMMTime& from = IMMTime ( ), const IMMTime& to = IMMTime ( ), CallType call = wait ) const

Copies data from the passed-in start position to the passed-in end position into the clipboard. If from is omitted, it uses the current position; if to is omitted, it uses the end of the data. The clipboard is cleared before the copy occurs.

Exception

IAccessError The device identifier is not valid; possibly the device is closed.
IAccessError The device cannot acquire access to the hardware device; possibly another device of this same type was acquired for exclusive use in this or another process.
IAccessError An internal driver error occurred.
IInvalidRequest The device must be in the open state before calling this function.
IAccessError Invalid from position; possibly the from position is greater than the end position or the from position is greater than the to position.
IAccessError Invalid to position; possibly the to position is greater than the length of the data.

Supported Platforms

Windows OS/2 AIX
Yes Yes No


[view class]
cueForRecording
public:
virtual IMMRecordable& cueForRecording( CallType call = nowait )

Cues the device for recording. This function causes any up front work that can occur to occur, thereby making the start of recording quick. This function does not have to be issued before recording; however, depending on the device, it might reduce the delay associated with the record function. For example, a sound card might have to clear some internal buffers before it can start recording from a microphone. This function would clear out those internal buffers for the sound card.

Exception

IAccessError The device identifier is not valid; possibly the device is closed.
IAccessError The device cannot acquire access to the hardware device; possibly another device of this same type was acquired for exclusive use in this or another process.
IAccessError An internal driver error occurred.
IInvalidRequest The device must be in the open state before calling this function.

Supported Platforms

Windows OS/2 AIX
Yes Yes No


[view class]
cut
public:
virtual IMMRecordable& cut( const IMMTime& from = IMMTime ( ), const IMMTime& to = IMMTime ( ), CallType call = wait )

Cuts the data from the passed-in start position to the passed-in end position into the clipboard. If data is already in the clipboard, it is overwritten. If from is omitted, it uses the current position; if to is omitted, it uses the end of the data.

Exception

IAccessError The device identifier is not valid; possibly the device is closed.
IAccessError The device cannot acquire access to the hardware device; possibly another device of this same type was acquired for exclusive use in this or another process.
IAccessError An internal driver error occurred.
IInvalidRequest The device must be in the open state before calling this function.
IAccessError Invalid from position; possibly the from position is greater than the end position or the from position is greater than the to position.
IAccessError Invalid to position; possibly if the to position is greater than the length of the data.

Supported Platforms

Windows OS/2 AIX
Yes Yes No


[view class]
deleteSelection
public:
virtual IMMRecordable& deleteSelection( const IMMTime& from = IMMTime ( ), const IMMTime& to = IMMTime ( ), CallType call = wait )

Deletes data from the passed-in start position to the passed-in end position. If from is omitted, it uses the current position; if to is omitted, it uses the end of the data.

Exception

IAccessError The device identifier is not valid; possibly the device is closed.
IAccessError The device cannot acquire access to the hardware device; possibly another device of this same type was acquired for exclusive use in this or another process.
IAccessError An internal driver error occurred.
IInvalidRequest The device must be in the open state before calling this function.
IAccessError Invalid from position; possibly the from position is greater than the end position or the from position is greater than the to position.
IAccessError Invalid to position; possibly if the to position is greater than the length of the data.

Supported Platforms

Windows OS/2 AIX
Yes Yes No


[view class]
paste
public:
virtual IMMRecordable& paste( const IMMTime& from = IMMTime ( ), const IMMTime& to = IMMTime ( ), bool convert = true, CallType call = wait )

Replaces the data with data from the clipboard, from the passed-in start position to the passed-in end position. If neither from nor to is specified, it inserts the data at the current position. If from is omitted, it uses the start of the buffer; if to is omitted, it uses the end of the audio data in the buffer. If convert is true, it causes the audio data in the clipboard to be converted to the current audio format before being pasted; otherwise, no conversion occurs. If you are pasting audio data, and audio format for data in the clipboard is incompatible with this device's audio format, then convert should be set to true; otherwise, an exception occurs.

Exception

IAccessError The device identifier is not valid; possibly the device is closed.
IAccessError The device cannot acquire access to the hardware device; possibly another device of this same type was acquired for exclusive use in this or another process.
IAccessError An internal driver error occurred.
IInvalidRequest The device must be in the open state before calling this function.
IAccessError Invalid from position; possibly the from position is greater than the end position or the from position is greater than the to position.
IAccessError Invalid to position; possibly the to position is greater than the length of the data.
IAccessError The disk or buffer is full.
IAccessError There is insufficient memory to perform the operation requested.
IAccessError The clipboard format is not valid.
IAccessError The clipboard cannot be opened.
IAccessError No recognizable information is in the clipboard.
IAccessError Unable to convert audio format in the clipboard to the destination audio format.

Supported Platforms

Windows OS/2 AIX
Yes Yes No


[view class]
record
public:
virtual IMMRecordable& record( bool insert = true, const IMMTime& begin = IMMTime ( ), const IMMTime& end = IMMTime ( ), bool resumeIfPaused = true, CallType call = nowait )

Starts recording at the begin location till it reaches the end location. If the end location is not specified, recording continues until a pause or stop occurs. If the begin location is not specified, recording starts at the current location. It is recommended that you temporarily acquire the device exclusively while you are recording; otherwise, the recording can become inactive if another device requests access to the device.

Exception

IAccessError The device identifier is not valid; possibly the device is closed.
IAccessError The device cannot acquire access to the hardware device; possibly another device of this same type was acquired for exclusive use in this or another process.
IAccessError An internal driver error occurred.
IInvalidRequest The device must be in the open state before calling this function.
IAccessError Invalid begin position; possibly the begin position is greater than the length of the data or the begin position is greater than the end position.
IAccessError Invalid end position; possibly if the end position is greater than the length of the data.
IAccessError The disk or buffer is full.

Supported Platforms

Windows OS/2 AIX
Yes Yes No


[view class]
redo
public:
virtual IMMRecordable& redo(CallType call = wait)

Redoes the record, cut, paste, or delete operation most recently undone by undo. The position is at the beginning of the file after a redo. You can redo up to the last save, which causes any previous actions to be cleared and cannot be redone. Not all devices support his function.

Exception

IAccessError The device identifier is not valid; possibly the device is closed.
IAccessError The device cannot acquire access to the hardware device; possibly another device of this same type was acquired for exclusive use in this or another process.
IAccessError An internal driver error occurred.
IInvalidRequest The device must be in the open state before calling this function.
IAccessError Cannot redo. Redo is not possible in the current state; possibly there are no actions to be redone (that is, the file was just saved).

Supported Platforms

Windows OS/2 AIX
No Yes No


[view class]
save
public:
virtual IMMRecordable& save(CallType call = nowait)

Saves the current file.

Exception

IAccessError The device identifier is not valid; possibly the device is closed.
IAccessError The device cannot acquire access to the hardware device; possibly another device of this same type was acquired for exclusive use in this or another process.
IAccessError An internal driver error occurred.
IInvalidRequest The device must be in the open state before calling this function.
IAccessError The file is not found; possibly the current data does not have a name. Use saveAs with the file name.
IAccessError Save to a read-only file; possibly the currently loaded file was loaded as read-only.
IAccessError The disk or buffer is full.
IAccessError There is insufficient memory to perform the save operation.

Supported Platforms

Windows OS/2 AIX
Yes Yes No


[view class]
saveAs
public:
virtual IMMRecordable& saveAs( const IString& filename, CallType call = nowait )

Saves the current file as a different file. Any subsequent calls to the save function will overwrite this file.

Exception

IAccessError The device identifier is not valid; possibly the device is closed.
IAccessError The device cannot acquire access to the hardware device; possibly another device of this same type was acquired for exclusive use in this or another process.
IAccessError An internal driver error occurred.
IInvalidRequest The device must be in the open state before calling this function.
IAccessError The file is not found; possibly the file name string does not contain a valid file name.
IAccessError Save to a read-only file; possibly if the currently loaded file was loaded as read-only.
IAccessError The disk or buffer is full.
IAccessError There is insufficient memory to perform the save operation.

Supported Platforms

Windows OS/2 AIX
Yes Yes No


[view class]
undo
public:
virtual IMMRecordable& undo(CallType call = wait)

Undoes the operation most recently performed by cut, record, paste, or delete. After an undo, the position is at the beginning of the media. You can undo up to the last save, which causes any previous actions to be cleared and cannot be undone. Not all devices support his function.

Exception

IAccessError The device identifier is not valid; possibly the device is closed.
IAccessError The device cannot acquire access to the hardware device; possibly another device of this same type was acquired for exclusive use in this or another process.
IAccessError An internal driver error occurred.
IInvalidRequest The device must be in the open state before calling this function.
IAccessError Cannot undo. Undo is not possible in the current state; possibly there are no actions to be undone (that is, the file is in the state where the last change was made).

Supported Platforms

Windows OS/2 AIX
No Yes No


Hidden Functions

We have hidden these functions to prevent you from using them.


[view class]
restoreDeviceSettings
protected:
virtual IMMRecordable& restoreDeviceSettings( bool newRecordMode = false )

Restores settings for the current device. Derived classes should override this function, handle class-specific settings, and call the corresponding inherited function.

Supported Platforms

Windows OS/2 AIX
Yes No No


[view class]
saveDeviceSettings
protected:
virtual IMMRecordable& saveDeviceSettings()

Saves settings for the current device. Derived classes should override this function, handle class-specific settings, and call the corresponding inherited function.

Supported Platforms

Windows OS/2 AIX
Yes No No


IMMRecordable - Inherited Member Functions and Data

Inherited Public Functions

IMMDevice
IMMFileMedia
IMMPlayableDevice
INotifier
IStandardNotifier

Inherited Public Data

INotifier
IMMDevice

Inherited Protected Functions

INotifier
IStandardNotifier
IMMDevice
IMMFileMedia
IMMPlayableDevice

Inherited Protected Data