Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

ark::SoundStreamer Class Reference

#include <SoundStreamer.h>

Inheritance diagram for ark::SoundStreamer:

ark::AsyncProducer< SoundStreamerChunk, async_producer_policies::FifoQueue, async_producer_policies::GenericDescription< SoundStreamerDescription >, SoundStreamerCreationPolicy > ark::async_producer_policies::FifoQueue< SoundStreamerChunk > ark::SoundStreamerCreationPolicy< async_producer_policies::GenericDescription< SoundStreamerDescription > > noncopyable ark::async_producer_policies::SignaledCreation< async_producer_policies::GenericDescription< SoundStreamerDescription > > List of all members.

Public Member Functions

 SoundStreamer (boost::shared_ptr< SoundResource > const &file)
 ~SoundStreamer ()
unsigned sampleRate () const
boost::shared_ptr< SoundResourceresource ()
SoundStreamerChunk produce (SoundStreamerDescription &desc)
void handleOverflow (my_super::OverflowError const &err)

Private Types

typedef AsyncProducer< SoundStreamerChunk,
SoundStreamerDescription >,
SoundStreamerCreationPolicy > 

Private Attributes

boost::shared_ptr< SoundResource_source
unsigned _readPos
SoundStreamerChunk _pendingChunk
bool _hasPendingChunk

Member Typedef Documentation

typedef AsyncProducer<SoundStreamerChunk, async_producer_policies::FifoQueue, async_producer_policies::GenericDescription<SoundStreamerDescription>, SoundStreamerCreationPolicy> ark::SoundStreamer::my_super [private]

Reimplemented from ark::SoundStreamerCreationPolicy< async_producer_policies::GenericDescription< SoundStreamerDescription > >.

Constructor & Destructor Documentation

SoundStreamer::SoundStreamer boost::shared_ptr< SoundResource > const &  file  ) 

Constructor Constructs a streamer, given a shared reference to a sound resource.

SoundStreamer::~SoundStreamer  ) 

Destructor Cleanly destructs the streamer, releasing it's references to temporary chunks and the passed sound source constructor argument.

Member Function Documentation

void ark::SoundStreamer::handleOverflow my_super::OverflowError const &  err  ) 

handleOverflow An override of the ProducerThread base class, handles an overflow of rt communication channels. The default action is to store one overflow for re-sending later on, and rethrow the overflow error if we already have a pending chunk.

err The overflow error to handle

SoundStreamerChunk SoundStreamer::produce SoundStreamerDescription desc  ) 

produce An override of the ProducerThread base class, returns the next chunk from the sound file, or an invalid chunk. Use chunk.isValid() to check the returned product.

desc The description of the sound chunk to produce

shared_ptr< SoundResource > SoundStreamer::resource  ) 


A shared reference to the installed resource of this streamer

unsigned SoundStreamer::sampleRate  )  const


The sample rate of the current sound resource. Shorthand for this->resource()->sampleRate().

Member Data Documentation

bool ark::SoundStreamer::_hasPendingChunk [private]

SoundStreamerChunk ark::SoundStreamer::_pendingChunk [private]

unsigned ark::SoundStreamer::_readPos [private]

boost::shared_ptr<SoundResource> ark::SoundStreamer::_source [private]

The documentation for this class was generated from the following files:
Generated on Tue Sep 6 14:54:42 2005 for Arkonnekt Sound by  doxygen 1.4.4