Class IWaveSound

3DS Max Plug-In SDK

Class IWaveSound

SeeAlso: Class Interface.

class IWaveSound

Description:

This class provides an interface into 3ds max's default WAV sound object. Use the Interface method GetSoundObject() to get a pointer to the current sound object and then use the macro GetWaveSoundInterface() on the result to see if it supports this interface. See the sample code below:

// Retrieve the current sound object

SoundObj *sound = ip->GetSoundObject();

// Attempt to get a wave interface

IWaveSound *iWave = GetWaveSoundInterface(sound);

if (iWave) {

iWave->SetSoundFileName(_T("LedZep.wav"))

}

All methods of this class are implemented by the system.

Methods:

Prototype:

virtual TSTR GetSoundFileName()=0;

Remarks:

Returns the name of the current sound file.

Prototype:

virtual BOOL SetSoundFileName(TSTR name)=0;

Remarks:

Sets the sound file. This will cause the .WAV to be loaded into the track view.

Parameters:

TSTR name

The name of the sound file to set.

Return Value:

FALSE if the file can't be opened or no wave track exists; otherwise TRUE.

Prototype:

virtual void SetStartTime(TimeValue t)=0;

Remarks:

Sets the time offset for the wave file.

Parameters:

TimeValue t

The start time.

Prototype:

virtual TimeValue GetStartTime()=0;

Remarks:

Returns the start time offset for the wave.

Prototype:

virtual TimeValue GetEndTime()=0;

Remarks:

Returns the end time for the wave.