Scaleform::GFx::Video::VideoSound
class VideoSound : public RefCountBaseNTS<VideoSound,Stat_Video_Mem>;
VideoSound object represents a stream of audio data for a single video file playing within GFx. VideoSound objects are created by the VideoSoundSystem::Create function; they are further initialized by CreateOutput. After creation, GFx calls Start, Stop, Pause and other functions of the sound object to tell it when to start and stop streaming data.
VideoSound receives its PCM data by polling it from the video player through the PCMStream interface passed to the Start function. PCM data can be requested in either 16-bit integer or 32-bit floating point format; users specify the desired format by implementing the GetPCMFormat function. The actual polling process typically takes place on a separate thread created by the sound or VideoSoundSystem.
The following is a detailed sequence of events that takes place with VideoSound object:
Throughout its lifetime, VideoSound is responsible for maintaining its Status state and reporting it properly from the GetStatus() function. The status starts out in Sound_Stopped state and transitions to Sound_Playing when Start is called. The other status states include Sound_Paused and Sound_Error.
Class |
Description |
An abstract interface used by VideoSound implementation to retrieve sound data from the video player. |
Enumeration |
Description |
Specifies the format of uncompressed PCM sound data supported by this VideoSound implementation. A value of this type is returned by GetPCMFormat. | |
Method |
Description |
Initializes sound output to the specified number of channels and sample rate. | |
Shuts down sound output. Internal hardware sound buffers can be destroyed during this call. | |
Returns the format of the PCM data expected by VideoSound implementation. | |
Obtains the instance of the sound channel for setting the volume of the sound. | |
Returns the current playback status. | |
Returns the time of user audio playback from the stream, in user specified units. | |
Pauses or resumes the sound streaming, temporarily halting playback and PCM polling. | |
Sets the sound spatial information such as position, orientation and velocity. | |
Tells VideoSound to begin sound output by polling PCM data from the PCM stream interface. | |
Tells video sound to stop sound object. PCMStream should not be polled for data after this call. |
Video_Video.h