The IMMWaveAudio class provides recording and playing of sound files. The sound files are stored in a waveform format. Not only can you use the inherited functions, such as play, pause, and setFormat, but you can also use this class for cutting, copying, and pasting to and from an audio buffer.
You can construct and destruct objects of this class.
![]() |
public:
virtual ~IMMWaveAudio()
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
IMMWaveAudio( bool openNow = true, unsigned long instance = 0, bool openShareable = true )
You can construct an IMMWaveAudio from the following:
Windows | OS/2 | AIX |
Yes | Yes | No |
protected:
IMMWaveAudio( unsigned long deviceIdentifier, const IString& newAlias = IString ( ) )
A derived class can construct an IMMWaveAudio from the following:
Windows | OS/2 | AIX |
Yes | Yes | No |
Use these members to edit the audio using buffers and setting attributes for the current audio.
![]() |
public:
virtual IMMWaveAudio& copyFromBuffer( const IMMAudioBuffer& audioBuffer, CallType call = wait )
Copies all of the audio data from the audio buffer to the current location.
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. |
Windows | OS/2 | AIX |
No | Yes | No |
![]() |
public:
virtual IMMWaveAudio& copyToBuffer( IMMAudioBuffer& audioBuffer, const IMMTime& from = IMMTime ( ), const IMMTime& to = IMMTime ( ), CallType call = wait ) const
Copies audio data into the audio buffer from the passed-in begin 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 audio data.
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 buffer is too small to hold that data. |
IAccessError | The passed-in range is invalid; either the to or the from position does not point to a valid position or the difference between from and to is not greater than zero. |
Windows | OS/2 | AIX |
No | Yes | No |
![]() |
public:
virtual unsigned long cutCopyBufferSize( const IMMTime& from = IMMTime ( ), const IMMTime& to = IMMTime ( ) ) const
Returns the size the audio buffer needs to be to contain the audio data from the passed-in beginning position to the passed-in ending position. If from is omitted, it uses the current position; if to is omitted, it uses the end of the audio data.
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 buffer is too small to hold that data. |
IAccessError | The passed-in range is invalid; either the to or the from position does not point to a valid position or the difference between from and to is not greater than zero. |
Windows | OS/2 | AIX |
No | Yes | No |
![]() |
public:
virtual IMMWaveAudio& cutToBuffer( IMMAudioBuffer& audioBuffer, const IMMTime& from = IMMTime ( ), const IMMTime& to = IMMTime ( ), CallType call = wait )
Cuts audio data into the audio buffer from the passed-in begin 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 audio data.
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 buffer is too small to hold that data. |
IAccessError | The passed-in range is invalid; either the to or the from position does not point to a valid position or the difference between from and to is not greater than zero. |
Windows | OS/2 | AIX |
No | Yes | No |
![]() |
public:
virtual IMMWaveAudio& pasteFromBuffer( const IMMAudioBuffer& audioBuffer, const IMMTime& from = IMMTime ( ), const IMMTime& to = IMMTime ( ), CallType call = wait )
Replaces the audio data with data from the audio buffer, from the passed-in begin position to the passed-in end position. If neither from nor to is specified, then 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.
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 passed-in range is invalid; either the to or the from position does not point to a valid position or the difference between from and to is not greater than zero. |
Windows | OS/2 | AIX |
No | Yes | No |
![]() |
public:
virtual IMMWaveAudio& pasteToBuffer( IMMAudioBuffer& audioBuffer, CallType call = wait ) const
Pastes audio data into the passed-in audio buffer.
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 buffer is too small to hold that data. |
Windows | OS/2 | AIX |
No | Yes | No |
![]() |
public:
virtual bool supportsWaveFormat( unsigned long bitsPerSample, unsigned long samplesPerSecond, unsigned long channels, IMMAudioBuffer::Format format, CallType call = wait ) const
Returns true if the format is supported. This allows an application to determine whether a specific wave audio format is supported.
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 device hardware does not support this format; possibly the combination of the passed-in audio attributes is not supported by the system. |
Windows | OS/2 | AIX |
No | Yes | No |
These members check if the passed-in string is in the correct format to open the current device.
![]() |
protected:
virtual bool isOpenStringValid( const IString& deviceName ) const
Returns true if the passed-in open string is valid for this device.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
protected:
virtual IMMWaveAudio& 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.
Windows | OS/2 | AIX |
Yes | No | No |
![]() |
protected:
virtual IMMWaveAudio& saveDeviceSettings()
Saves settings for the current device. Derived classes should override this function, handle class-specific settings, and call the corresponding inherited function.
Windows | OS/2 | AIX |
Yes | No | No |
virtual ~IMMConfigurableAudio()
unsigned long bitsPerSample(CallType call = wait) const
unsigned long blockAlignment(CallType call = wait) const
unsigned long bytesPerSecond(CallType call = wait) const
unsigned long channels(CallType call = wait) const
IMMAudioBuffer::Format format(CallType call = wait) const
unsigned long samplesPerSecond(CallType call = wait) const
virtual IMMConfigurableAudio& setBitsPerSample( unsigned long bitsPerSample, CallType call = wait )
virtual IMMConfigurableAudio& setBlockAlignment( unsigned long alignment, CallType call = wait )
virtual IMMConfigurableAudio& setBytesPerSecond( unsigned long averageBytes, CallType call = wait )
virtual IMMConfigurableAudio& setChannels( unsigned long channels, CallType call = wait )
virtual IMMConfigurableAudio& setFormat( IMMAudioBuffer::Format tag = IMMAudioBuffer::pcm, CallType call = wait )
virtual IMMConfigurableAudio& setSamplesPerSecond( unsigned long samplesPerSecond, CallType call = wait )
virtual IMMConfigurableAudio& setVolume( unsigned long volume, AudioChannel channel = all, const IMMMillisecondTime& over = IMMMillisecondTime ( ), CallType call = wait )
virtual unsigned long volume( AudioChannel channel = left, CallType call = wait ) const
virtual ~IMMDevice()
virtual IMMDevice& acquire( ShareMode acquire = shareable, bool queuedForResources = false, CallType call = wait )
IString aliasName() const
virtual IMMDevice& close(CallType call = wait)
unsigned long connectedDeviceId( ConnectorType type, CallType call = wait ) const
virtual IMMDevice& deletePendingEvents( EventType event = allEvents )
IString description(CallType call = wait) const
unsigned long deviceId() const
IString deviceName() const
unsigned long deviceType(CallType call = wait) const
virtual IMMDevice& disableAudio( AudioChannel channel = all, const IMMMillisecondTime& over = IMMMillisecondTime ( ), CallType call = wait )
virtual IMMDevice& disableConnector( ConnectorType type, CallType call = wait )
virtual IMMDevice& enableAudio( bool enable = true, AudioChannel channel = all, const IMMMillisecondTime& over = IMMMillisecondTime ( ), CallType call = wait )
virtual IMMDevice& enableConnector( ConnectorType type, bool enable = true, CallType call = wait )
virtual IMMDevice& enableNotification(bool enabled = true)
bool isAcquired(CallType call = wait) const
bool isAudioEnabled( AudioChannel channel = all, CallType call = wait )
bool isCloseOnDestroy() const
bool isConnectionSupported( ConnectorType type, CallType call = wait ) const
bool isConnectorEnabled( ConnectorType type, CallType call = wait ) const
bool isOpen() const
virtual Mode mode(CallType call = wait) const
virtual IMMDevice& open( const IString& fileOrDevice = IString ( ), bool shareable = true, CallType call = wait )
virtual IMMDevice& openOnThread( const IString& fileOrDevice = IString ( ), bool shareable = true, CallType call = wait )
IMMTime prerollTime(CallType call = wait) const
PrerollType prerollType(CallType call = wait) const
virtual IMMDevice& release(CallType call = wait)
bool requiresFiles(CallType call = wait) const
IMMDevice& setCloseOnDestroy(bool close = true)
virtual IMMDevice& setSpeedFormat( IMMSpeed::Format format, CallType call = wait )
virtual IMMDevice& setTimeFormat( IMMTime::Format format, CallType call = wait )
virtual IMMDevice& setVolume( unsigned long volume, AudioChannel channel = all, const IMMMillisecondTime& over = IMMMillisecondTime ( ), CallType call = wait )
IMMSpeed::Format speedFormat(CallType call = wait) const
bool supportsAudio(CallType call = wait) const
bool supportsCommand( IMMNotifyEvent::Command command, CallType call = wait ) const
bool supportsDigitalTransfer(CallType call = wait) const
bool supportsDisableEject(CallType call = wait) const
bool supportsEject(CallType call = wait) const
bool supportsPlay(CallType call = wait) const
bool supportsRecord(CallType call = wait) const
bool supportsRecordInsertion(CallType call = wait) const
bool supportsSave(CallType call = wait) const
bool supportsStreaming(CallType call = wait) const
bool supportsVideo(CallType call = wait) const
bool supportsVolumeAdjustment(CallType call = wait) const
IMMTime::Format timeFormat(CallType call = wait) const
virtual ~IMMFileMedia()
IString filename(CallType call = wait) const
virtual bool isWriteable() const
virtual IMMFileMedia& load( const IString& filename, bool readOnly = false, CallType call = wait )
virtual IMMFileMedia& loadOnThread( const IString& filename, bool readOnly = false )
virtual IMMFileMedia& open( const IString& fileOrDevice = IString ( ), bool shareable = true, CallType call = wait )
virtual IMMFileMedia& openOnThread( const IString& fileOrDevice = IString ( ), bool shareable = true, CallType call = wait )
virtual ~IMMPlayableDevice()
virtual IMMPlayableDevice& addCuePoint( const IMMTime& time, CallType call = wait )
virtual IMMPlayableDevice& cueForPlayback( CallType call = wait )
unsigned long length(CallType call = wait) const
virtual IMMPlayableDevice& pause(CallType call = wait)
virtual IMMPlayableDevice& play( const IMMTime& from = IMMTime ( ), const IMMTime& to = IMMTime ( ), bool resumeIfPaused = true, CallType call = nowait )
unsigned long position(CallType call = wait) const
virtual IMMPlayableDevice& removeCuePoint( const IMMTime& time, CallType call = wait )
virtual IMMPlayableDevice& resume( bool resume = true, CallType call = wait )
virtual IMMPlayableDevice& seek( const IMMTime& to, CallType call = wait )
virtual IMMPlayableDevice& seekToEnd(CallType call = wait)
virtual IMMPlayableDevice& seekToStart( CallType call = wait )
virtual IMMPlayableDevice& startPositionTracking( const IMMTime& timeInterval, CallType call = wait )
virtual IMMPlayableDevice& stepFrame( unsigned long frames = 1, bool forward = true, CallType call = wait )
virtual IMMPlayableDevice& stop(CallType call = wait)
virtual IMMPlayableDevice& stopPositionTracking( CallType call = wait )
virtual ~IMMRecordable()
bool canRedo() const
bool canUndo() const
virtual IMMRecordable& copy( const IMMTime& from = IMMTime ( ), const IMMTime& to = IMMTime ( ), CallType call = wait ) const
virtual IMMRecordable& cueForRecording( CallType call = nowait )
virtual IMMRecordable& cut( const IMMTime& from = IMMTime ( ), const IMMTime& to = IMMTime ( ), CallType call = wait )
virtual IMMRecordable& deleteSelection( const IMMTime& from = IMMTime ( ), const IMMTime& to = IMMTime ( ), CallType call = wait )
virtual IMMRecordable& paste( const IMMTime& from = IMMTime ( ), const IMMTime& to = IMMTime ( ), bool convert = true, CallType call = wait )
virtual IMMRecordable& record( bool insert = true, const IMMTime& begin = IMMTime ( ), const IMMTime& end = IMMTime ( ), bool resumeIfPaused = true, CallType call = nowait )
virtual IMMRecordable& redo(CallType call = wait)
virtual IMMRecordable& save(CallType call = nowait)
virtual IMMRecordable& saveAs( const IString& filename, CallType call = nowait )
virtual IMMRecordable& undo(CallType call = wait)
virtual ~INotifier()
virtual INotifier& disableNotification() = 0
virtual INotifier& enableNotification( bool enable = true ) = 0
INotifier()
virtual bool isEnabledForNotification() const = 0
virtual INotifier& notifyObservers( const INotificationEvent& event ) = 0
virtual INotifier& notifyObserversAsync( const INotificationEvent& event )
const IThreadId& threadId() const
virtual ~IStandardNotifier()
virtual IStandardNotifier& disableNotification()
virtual IStandardNotifier& enableNotification( bool enable = true )
virtual bool isEnabledForNotification() const
IStandardNotifier(const IStandardNotifier& copy)
IStandardNotifier()
virtual INotifierAddress notifierAddress() const
virtual IStandardNotifier& notifyObservers( const INotificationEvent& anEvent )
virtual IStandardNotifier& notifyObserversAsync( const INotificationEvent& anEvent )
IStandardNotifier& operator =( const IStandardNotifier& aStandardNotifier )
static INotificationId const allChangesId
static INotificationId const deleteId
static const unsigned long allDevices
static const unsigned long ampMixer
static const unsigned long animation
static const unsigned long audioCD
static const unsigned long audioTape
static const unsigned long cdxa
static INotificationId const commandNotifyId
static INotificationId const cuePointId
static const unsigned long dat
static INotificationId const deviceEventId
static const unsigned long digitalVideo
static const unsigned long headphone
static const unsigned long microphone
static const unsigned long monitor
static const unsigned long other
static const unsigned long overlay
static INotificationId const passDeviceId
static INotificationId const positionChangeId
static const unsigned long sequencer
static const unsigned long speaker
static const unsigned long videoDisc
static const unsigned long videoTape
static const unsigned long waveAudio
virtual INotifier& addObserver( IObserver& observer, const IInterest& interest )
virtual INotifier& notifyObservers( const INotificationId& id ) = 0
virtual IObserverList& observerList( const IInterest* anInterest = 0 ) const = 0
virtual INotifier& removeAllObservers() = 0
virtual INotifier& removeObserver(IObserver& observer) = 0
virtual INotifier& removeObserver( IObserver& observer, const IInterest& interest )
virtual IStandardNotifier& addObserver( IObserver& observer, const IInterest& interest )
virtual IStandardNotifier& notifyObservers( const INotificationId& nId )
virtual IObserverList& observerList( const IInterest* anInterest = 0 ) const
virtual IStandardNotifier& removeAllObservers()
virtual IStandardNotifier& removeObserver( IObserver& observer )
virtual IStandardNotifier& removeObserver( IObserver& observer, const IInterest& interest )
IMMMessageWindow& deviceWindow() const
IMMDevice(const IString& fileOrDevice)
IMMDevice( unsigned long deviceIdentifier, const IString& newAlias = IString ( ) )
unsigned long itemCapability( unsigned long item, CallType call ) const
unsigned long itemStatus( unsigned long item, unsigned long value = 0, CallType call = wait ) const
unsigned long lastError() const
virtual bool mixerControlValues( unsigned long dwComponentType, unsigned long dwControlType, unsigned long* ulDetails, bool uniform = true, unsigned long multipleItems = 0, unsigned long hmx = NULL )
virtual bool mixerControlValues( unsigned long dwComponentType, unsigned long dwControlType, unsigned short* usDetails, bool uniform = true, unsigned long multipleItems = 0, unsigned long hmx = NULL )
IMMDeviceNotifyHandler* notificationHandler() const
virtual IMMDevice& open( unsigned long instanceNumber, bool shareable = true, CallType call = nowait )
virtual IMMDevice& openOnThread( unsigned long instanceNumber, bool shareable = true )
OpenStatus openStatus() const
virtual IMMDevice& restoreDeviceSettings( bool newRecordMode = false )
virtual IMMDevice& saveDeviceSettings()
IMMDevice& sendCommand( unsigned short message, unsigned long param1, void* param2, unsigned short userParm )
IMMDevice& sendCommand( unsigned short message, unsigned long param1, void* param2 )
IString sendCommand( const IString& command, unsigned short userParm )
IString sendCommand(const IString& command)
IMMDevice& setLastError(unsigned long errorId)
virtual bool setMixerControlValues( unsigned long dwComponentType, unsigned long dwControlType, unsigned short* usDetails, bool uniform = true, unsigned long multipleItems = 0, unsigned long hmx = NULL )
virtual bool setMixerControlValues( unsigned long dwComponentType, unsigned long dwControlType, unsigned long* ulDetails, bool uniform = true, unsigned long multipleItems = 0, unsigned long hmx = NULL )
IMMDevice& setNotificationHandler( IMMDeviceNotifyHandler* notifyHandler )
IMMDevice& setOpenStatus(OpenStatus status)
IMMDevice& setPassDeviceRequested(bool sawPassDevice)
IMMDevice& setSystemMixerHandle(unsigned long hmx)
IMMDevice& setUserParameter(unsigned short userParm = 0)
unsigned long systemMixerHandle() const
unsigned short userParameter() const
bool wasPassDeviceRequested() const
virtual IMMFileMedia& enableDataUpdate(bool update = true)
IMMFileMedia( const IString& deviceName, bool openNow, unsigned long instance, bool openShareable )
IMMFileMedia( unsigned long deviceIdentifier, const IString& newAlias = IString ( ) )
virtual IMMFileMedia& open( unsigned long instanceNumber, bool shareable = true, CallType call = nowait )
virtual IMMFileMedia& openOnThread( unsigned long instanceNumber, bool shareable = true )
virtual IMMFileMedia& restoreDeviceSettings( bool newRecordMode = false )
virtual IMMFileMedia& saveDeviceSettings()
IMMConfigurableAudio( const IString& deviceName, bool openNow = true, unsigned long instance = 0, bool openShareable = true )
IMMConfigurableAudio( unsigned long deviceIdentifier, const IString& newAlias = IString ( ) )
virtual IMMConfigurableAudio& restoreDeviceSettings( bool newRecordMode = false )
virtual IMMConfigurableAudio& saveDeviceSettings()
virtual unsigned long translateAudioFlag( unsigned long ) const
IMMPlayableDevice( unsigned long deviceIdentifier, const IString& newAlias = IString ( ) )
IMMPlayableDevice( const IString& deviceOrFileName, bool openNow = true, unsigned long instance = 0, bool openShareable = true )
virtual IMMPlayableDevice& restoreDeviceSettings( bool newRecordMode = false )
virtual IMMPlayableDevice& saveDeviceSettings()
IMMRecordable( const IString& deviceName, bool openNow, unsigned long instance, bool openShareable )
IMMRecordable( unsigned long deviceIdentifier, const IString& newAlias = IString ( ) )
virtual IMMRecordable& restoreDeviceSettings( bool newRecordMode = false )
virtual IMMRecordable& saveDeviceSettings()