|
"L. Spiro Engine"
|
A source used with streaming audio data. More...
#include <LSSStreamingSoundSource.h>
Classes | |
| struct | LSS_STREAMING_BUFFER |
Public Member Functions | |
| LSE_CALLCTOR | CStreamingSoundSource (LSUINT32 _ui32Id) |
| virtual LSS_SOUND_SOURCE LSE_CALL | GetType () const |
| virtual LSBOOL LSE_CALL | Static () const |
| virtual LSVOID LSE_CALL | SetBuffer (const CSoundBuffer *_psbBuffer) |
| LSBOOL LSE_CALL | CreateStream (const IStreamingSoundSourceStreamer *_pssssSource, CAllocator *_paAllocator) |
| LSVOID LSE_CALL | Reset () |
| virtual LSVOID LSE_CALL | Tick (LSUINT64 _ui64TimeSinceLastUpdate) |
| virtual LSBOOL LSE_CALL | Play (LSUINT32 _ui32LoopCount) |
| const IStreamingSoundSourceStreamer *LSE_CALL | GetStreamer () const |
| virtual LSBOOL LSE_CALL | CanSoftReset () const |
Protected Types | |
| typedef struct lss::CStreamingSoundSource::LSS_STREAMING_BUFFER * | LPLSS_STREAMING_BUFFER |
|
typedef struct lss::CStreamingSoundSource::LSS_STREAMING_BUFFER | LPCLSS_STREAMING_BUFFER |
| typedef CVectorPoD < LSS_STREAMING_BUFFER > | LSS_STREAMING_BUFFER_LIST |
|
typedef CVectorPoD < LSS_STREAMING_BUFFER > * | LPLSS_STREAMING_BUFFER_LIST |
|
typedef CVectorPoD < LSS_STREAMING_BUFFER > *const | LPCLSS_STREAMING_BUFFER_LIST |
Protected Member Functions | |
| LSVOID LSE_CALL | SetSource (const IStreamingSoundSourceStreamer *_pssssSource) |
| LSVOID LSE_CALL | CheckQueue () |
| LSVOID LSE_CALL | CheckUnqueue () |
| LSUINT32 LSE_CALL | GetOldestBufferIndex () const |
| LSUINT32 LSE_CALL | GetFreeBuffer () const |
| LSBOOL LSE_CALL | Buffer (LSUINT64 _ui64From, LSUINT64 _ui64Length) |
| LSVOID LSE_CALL | UnBuffer (LSUINT32 _ui32Index) |
| virtual LSBOOL LSE_CALL | DeviceActivated () |
| virtual LSVOID LSE_CALL | DeviceWillClose () |
Protected Attributes | |
| LSS_STREAMING_BUFFER_LIST | m_sblBuffers |
| CAllocator * | m_paAllocator |
|
const IStreamingSoundSourceStreamer * | m_pssssSource |
| LSUINT64 | m_ui64BufferSize |
| LSUINT64 | m_ui64Queued |
| LSBOOL | m_bHaveDevice |
A source used with streaming audio data.
Class CStreamingSoundSource Description: A source used for streaming. Provides an interface for continuous loading of buffer data in order to keep the sound playing. By default, streaming sounds ignore soft resets.
typedef struct lss::CStreamingSoundSource::LSS_STREAMING_BUFFER * lss::CStreamingSoundSource::LPLSS_STREAMING_BUFFER [protected] |
The buffers used by CStreamingSoundSource.
typedef CVectorPoD<LSS_STREAMING_BUFFER> lss::CStreamingSoundSource::LSS_STREAMING_BUFFER_LIST [protected] |
A list of LSS_STREAMING_BUFFER objects.
| LSBOOL LSE_CALL lss::CStreamingSoundSource::Buffer | ( | LSUINT64 | _ui64From, |
| LSUINT64 | _ui64Length | ||
| ) | [protected] |
Buffer a given amount of time in the sound. This function finds the first available buffer and attempts to buffer the requested data into it.
| _ui64From | Time at the beginning of the buffer, in microseconds. |
| _ui64Length | Length to buffer, in microseconds. |
| virtual LSBOOL LSE_CALL lss::CStreamingSoundSource::CanSoftReset | ( | ) | const [virtual] |
Set the value indicating whether this source should resist soft resets or not. A soft reset is a reset that stops sources that do not resist soft resets, then releases all unreferenced data (sources/buffers). This is not the same as a soft unload, which can happen at any time just to save RAM and works only on expired data. A soft reset will stop sources that do not resist the stopping action by returning true via this function.
| LSVOID LSE_CALL lss::CStreamingSoundSource::CheckQueue | ( | ) | [protected] |
Check to see if we need to queue any buffers. If so, buffers are automatically queued.
| LSVOID LSE_CALL lss::CStreamingSoundSource::CheckUnqueue | ( | ) | [protected] |
Check for buffers that need to be unqueued. If any are found, they are unqueued.
| LSBOOL LSE_CALL lss::CStreamingSoundSource::CreateStream | ( | const IStreamingSoundSourceStreamer * | _pssssSource, |
| CAllocator * | _paAllocator | ||
| ) |
Create a stream of audio using the provided IStreamingSoundSourceStreamer interface.
| _pssssSource | The interface that provides this class with the data it needs to stream audio. |
| _paAllocator | The allocator to be used for all allocations made by this class. Must not be NULL. |
| virtual LSBOOL LSE_CALL lss::CStreamingSoundSource::DeviceActivated | ( | ) | [protected, virtual] |
A device has been created. We can register with the hardware. The sound manager notifies us of this event after the device has been changed. If there is a device already when we are created, we are notified via this function immediately after being created.
| virtual LSVOID LSE_CALL lss::CStreamingSoundSource::DeviceWillClose | ( | ) | [protected, virtual] |
Notifies us that the device is about to be lost (changed). We need to sever our connections to it, although we may retain our data/ settings.
| LSUINT32 LSE_CALL lss::CStreamingSoundSource::GetFreeBuffer | ( | ) | const [protected] |
Find the first free buffer.
| LSUINT32 LSE_CALL lss::CStreamingSoundSource::GetOldestBufferIndex | ( | ) | const [protected] |
Get the oldest buffer still active.
| const IStreamingSoundSourceStreamer* LSE_CALL lss::CStreamingSoundSource::GetStreamer | ( | ) | const |
Get the streamer associated with this sound stream.
| virtual LSS_SOUND_SOURCE LSE_CALL lss::CStreamingSoundSource::GetType | ( | ) | const [virtual] |
Get the type of this source.
| virtual LSBOOL LSE_CALL lss::CStreamingSoundSource::Play | ( | LSUINT32 | _ui32LoopCount | ) | [virtual] |
Begin playing the sound. If there is no data source, returns false. The sound plays regardless of whether or not there is a sound device. If there is no sound device, the sound will begin playing at the correct position when a device becomes active. The sound begins playing on the next tick event.
| _ui32LoopCount | Number of times to loop the sound. |
| LSVOID LSE_CALL lss::CStreamingSoundSource::Reset | ( | ) |
Reset the stream. Deallocates everything.
| virtual LSVOID LSE_CALL lss::CStreamingSoundSource::SetBuffer | ( | const CSoundBuffer * | _psbBuffer | ) | [virtual] |
This class uses its own private buffers internally. We override this function to make it a do-nothing function.
| _psbBuffer | Not used. |
| LSVOID LSE_CALL lss::CStreamingSoundSource::SetSource | ( | const IStreamingSoundSourceStreamer * | _pssssSource | ) | [protected] |
Set the source source.
| _pssssSource | The source to use for the data we need to operate as a streaming sound source. |
| virtual LSBOOL LSE_CALL lss::CStreamingSoundSource::Static | ( | ) | const [virtual] |
Is this source static (non-streaming)?
| virtual LSVOID LSE_CALL lss::CStreamingSoundSource::Tick | ( | LSUINT64 | _ui64TimeSinceLastUpdate | ) | [virtual] |
Update the source. This usually entails checking the dirty flag and updating the hardware accordingly. Time is given in microseconds.
| _ui64TimeSinceLastUpdate | Microseconds by which to update. |
| LSVOID LSE_CALL lss::CStreamingSoundSource::UnBuffer | ( | LSUINT32 | _ui32Index | ) | [protected] |
Unbuffer an a buffer.
| _ui32Index | The index of the buffer to remove. |
CAllocator* lss::CStreamingSoundSource::m_paAllocator [protected] |
Allocator we use. May not be NULL.
The 4 buffers we used for streaming.
1.7.3