Introduction
Downloads
Documentation
Tutorials
Pixie Lite
Forum

Home

Platform_Win32_Sound_SoundStream_NoSound Class Reference

Inheritance diagram for Platform_Win32_Sound_SoundStream_NoSound:

Platform_Sound_SoundStream

List of all members.


Public Member Functions

 Platform_Win32_Sound_SoundStream_NoSound (int channels, int frequency, int bitsPerSample, int size)
virtual ~Platform_Win32_Sound_SoundStream_NoSound ()
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 SetVolume (float level)
virtual float GetVolume ()

Detailed Description

Author:
Mattias Gustavsson

Definition at line 20 of file Platform_Win32_Sound_SoundStream_NoSound.h.


Constructor & Destructor Documentation

Platform_Win32_Sound_SoundStream_NoSound::Platform_Win32_Sound_SoundStream_NoSound ( int  channels,
int  frequency,
int  bitsPerSample,
int  size 
)

Definition at line 8 of file Platform_Win32_Sound_SoundStream_NoSound.cpp.

Platform_Win32_Sound_SoundStream_NoSound::~Platform_Win32_Sound_SoundStream_NoSound (  )  [virtual]

Definition at line 19 of file Platform_Win32_Sound_SoundStream_NoSound.cpp.


Member Function Documentation

void Platform_Win32_Sound_SoundStream_NoSound::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 24 of file Platform_Win32_Sound_SoundStream_NoSound.cpp.

void Platform_Win32_Sound_SoundStream_NoSound::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 31 of file Platform_Win32_Sound_SoundStream_NoSound.cpp.

int Platform_Win32_Sound_SoundStream_NoSound::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 38 of file Platform_Win32_Sound_SoundStream_NoSound.cpp.

void Platform_Win32_Sound_SoundStream_NoSound::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 46 of file Platform_Win32_Sound_SoundStream_NoSound.cpp.

void Platform_Win32_Sound_SoundStream_NoSound::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 53 of file Platform_Win32_Sound_SoundStream_NoSound.cpp.

void Platform_Win32_Sound_SoundStream_NoSound::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 60 of file Platform_Win32_Sound_SoundStream_NoSound.cpp.

int Platform_Win32_Sound_SoundStream_NoSound::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 67 of file Platform_Win32_Sound_SoundStream_NoSound.cpp.

int Platform_Win32_Sound_SoundStream_NoSound::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 75 of file Platform_Win32_Sound_SoundStream_NoSound.cpp.

int Platform_Win32_Sound_SoundStream_NoSound::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 83 of file Platform_Win32_Sound_SoundStream_NoSound.cpp.

int Platform_Win32_Sound_SoundStream_NoSound::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 91 of file Platform_Win32_Sound_SoundStream_NoSound.cpp.

void Platform_Win32_Sound_SoundStream_NoSound::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 99 of file Platform_Win32_Sound_SoundStream_NoSound.cpp.

float Platform_Win32_Sound_SoundStream_NoSound::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 107 of file Platform_Win32_Sound_SoundStream_NoSound.cpp.



Pixie University and the Pixie Game Engine is created and managed by Mattias Gustavsson.
Reproduction/republishing of any material on this site without permission is strictly prohibited.