Gnash  0.8.11dev
Public Member Functions | List of all members
gnash::sound::Buffers Class Reference

#include <LiveSound.h>

Public Member Functions

 Buffers (size_t in_point)
 
 Buffers (const Buffers &)=delete
 
Buffersoperator= (const Buffers &)=delete
 
void append (SimpleBuffer buf)
 Append a buffer of data to be read by the consumer later. More...
 
void restart ()
 
size_t copy (std::uint8_t *to, size_t bytes)
 Copy up to the given number of bytes to the given buffer. More...
 
std::uint64_t countBytes () const
 
std::uint64_t consumed () const
 

Detailed Description

Maintains a collection of SimpleBuffers, providing stateful sequential read access to the data contained therein.

Constructor & Destructor Documentation

gnash::sound::Buffers::Buffers ( size_t  in_point)
inline
gnash::sound::Buffers::Buffers ( const Buffers )
delete

Member Function Documentation

void gnash::sound::Buffers::append ( SimpleBuffer  buf)
inline

Append a buffer of data to be read by the consumer later.

Referenced by gnash::sound::LiveSound::appendDecodedData().

std::uint64_t gnash::sound::Buffers::consumed ( ) const
inline
Returns
number of bytes previously copied by calls to copy().

Referenced by gnash::sound::LiveSound::playbackPosition().

size_t gnash::sound::Buffers::copy ( std::uint8_t *  to,
size_t  bytes 
)
inline

Copy up to the given number of bytes to the given buffer.

points to a buffer to be written to. number of bytes to be written.

Returns
number of bytes actually written.

References gnash::SimpleBuffer::data(), and gnash::SimpleBuffer::size().

std::uint64_t gnash::sound::Buffers::countBytes ( ) const
inline
Returns
total number of bytes contained.

Referenced by gnash::sound::LiveSound::decodedSamplesAhead().

Buffers& gnash::sound::Buffers::operator= ( const Buffers )
delete
void gnash::sound::Buffers::restart ( )
inline

The documentation for this class was generated from the following file: