Platform_Win32_Sound_SoundStream_WMM Class Reference

Public Member Functions | |
| Platform_Win32_Sound_SoundStream_WMM (Platform_Win32_Sound_WMM *manager, int channels, int frequency, int bitsPerSample, int size) | |
| virtual | ~Platform_Win32_Sound_SoundStream_WMM () |
| virtual void | Play () |
| virtual void | Stop () |
| virtual int | GetPosition () |
| virtual void | SetPosition (int position) |
| virtual void | CopySoundToBuffer (int bufferOffset, const void *soundData, int bytesToCopy) |
| virtual void | ClearBuffer (int bufferOffset, int bytesToClear) |
| virtual int | GetChannels () |
| virtual int | GetFrequency () |
| virtual int | GetBitsPerSample () |
| virtual int | GetSize () |
| virtual void | Update () |
| virtual void | SetVolume (float level) |
| virtual float | GetVolume () |
Detailed Description
Definition at line 22 of file Platform_Win32_Sound_SoundStream_WMM.h.
Constructor & Destructor Documentation
| Platform_Win32_Sound_SoundStream_WMM::Platform_Win32_Sound_SoundStream_WMM | ( | Platform_Win32_Sound_WMM * | manager, | |
| int | channels, | |||
| int | frequency, | |||
| int | bitsPerSample, | |||
| int | size | |||
| ) |
Definition at line 46 of file Platform_Win32_Sound_SoundStream_WMM.cpp.
| Platform_Win32_Sound_SoundStream_WMM::~Platform_Win32_Sound_SoundStream_WMM | ( | ) | [virtual] |
Definition at line 100 of file Platform_Win32_Sound_SoundStream_WMM.cpp.
Member Function Documentation
| void Platform_Win32_Sound_SoundStream_WMM::Play | ( | ) | [virtual] |
Starts playing the sound stream, from whatever position it is currently at. The stream will keep playing and loop when it's reached the end, until the Stop method is called. The GetPosition method can be called to monitor the current position in the stream, and if looping is not desired, Stop should be called when the position have reached the end of the stream buffer.
Implements Platform_Sound_SoundStream.
Definition at line 113 of file Platform_Win32_Sound_SoundStream_WMM.cpp.
| void Platform_Win32_Sound_SoundStream_WMM::Stop | ( | ) | [virtual] |
Pause the playback, and keeps the position so that the next call to Play will resume from the last point.
Implements Platform_Sound_SoundStream.
Definition at line 157 of file Platform_Win32_Sound_SoundStream_WMM.cpp.
| int Platform_Win32_Sound_SoundStream_WMM::GetPosition | ( | ) | [virtual] |
Retrieves the current position in the sound stream buffer of the playback.
- Returns:
- The current position
Implements Platform_Sound_SoundStream.
Definition at line 197 of file Platform_Win32_Sound_SoundStream_WMM.cpp.
| void Platform_Win32_Sound_SoundStream_WMM::SetPosition | ( | int | position | ) | [virtual] |
Sets the playback position. Must be in the range from 0 to the size of the sound stream buffer. There is no need to call Stop/Play for it to take effect.
Implements Platform_Sound_SoundStream.
Definition at line 205 of file Platform_Win32_Sound_SoundStream_WMM.cpp.
| void Platform_Win32_Sound_SoundStream_WMM::CopySoundToBuffer | ( | int | bufferOffset, | |
| const void * | soundData, | |||
| int | bytesToCopy | |||
| ) | [virtual] |
Copies raw sound data to the sound streams buffer, starting at bufferOffset. The data is copied from the soundData pointer, for a total of bytesToCopy number of bytes. bufferOffset + bytesToClear should be less than the value returned by GetSize. The format of the data is interleaved raw sound samples, as specified by the combination of channels, frequency and bits per sample.
Implements Platform_Sound_SoundStream.
Definition at line 213 of file Platform_Win32_Sound_SoundStream_WMM.cpp.
| void Platform_Win32_Sound_SoundStream_WMM::ClearBuffer | ( | int | bufferOffset, | |
| int | bytesToClear | |||
| ) | [virtual] |
Clears the specified part of the sound streams buffer. bufferOffset + bytesToClear should be less than the value returned by GetSize
Implements Platform_Sound_SoundStream.
Definition at line 287 of file Platform_Win32_Sound_SoundStream_WMM.cpp.
| int Platform_Win32_Sound_SoundStream_WMM::GetChannels | ( | ) | [virtual] |
Retrieves the number of channels this sound stream was created with.
- Returns:
- The number of channels, 1=mono, 2=stereo
Implements Platform_Sound_SoundStream.
Definition at line 295 of file Platform_Win32_Sound_SoundStream_WMM.cpp.
| int Platform_Win32_Sound_SoundStream_WMM::GetFrequency | ( | ) | [virtual] |
Retrieves the frequency (samples per second) this sound stream was created with. Typical values for this is 11025 (11 kHz), 22050 (22 kHz) or 44100 (44 kHz, CD-quality).
- Returns:
- The number of samples per second
Implements Platform_Sound_SoundStream.
Definition at line 303 of file Platform_Win32_Sound_SoundStream_WMM.cpp.
| int Platform_Win32_Sound_SoundStream_WMM::GetBitsPerSample | ( | ) | [virtual] |
Retrieves the number of bits per sample which this sound stream was created with. This is typically 8 or 16 bits.
- Returns:
- The number of bits per sample (typically 8 or 16)
Implements Platform_Sound_SoundStream.
Definition at line 311 of file Platform_Win32_Sound_SoundStream_WMM.cpp.
| int Platform_Win32_Sound_SoundStream_WMM::GetSize | ( | ) | [virtual] |
Retrieves the number of bytes allocated for this sound streams buffer.
- Returns:
- The size of the sound stream buffer in bytes
Implements Platform_Sound_SoundStream.
Definition at line 319 of file Platform_Win32_Sound_SoundStream_WMM.cpp.
| void Platform_Win32_Sound_SoundStream_WMM::Update | ( | ) | [virtual] |
Definition at line 221 of file Platform_Win32_Sound_SoundStream_WMM.cpp.
| void Platform_Win32_Sound_SoundStream_WMM::SetVolume | ( | float | level | ) | [virtual] |
Sets the current volume level, in the range 0 to 1. This is a linear volume level value, where 0 is silent and 1 is full volume.
Implements Platform_Sound_SoundStream.
Definition at line 327 of file Platform_Win32_Sound_SoundStream_WMM.cpp.
| float Platform_Win32_Sound_SoundStream_WMM::GetVolume | ( | ) | [virtual] |
Retrieves the current volume level, in the range 0 to 1. This is a linear volume level value, where 0 is silent and 1 is full volume.
- Returns:
- The current volume
Implements Platform_Sound_SoundStream.
Definition at line 335 of file Platform_Win32_Sound_SoundStream_WMM.cpp.
Reproduction/republishing of any material on this site without permission is strictly prohibited.
