visualisation_stream Class Reference

#include <vis.h>

Inheritance diagram for visualisation_stream:

service_base

List of all members.

Public Types

typedef visualisation_stream t_interface
typedef service_base t_interface_parent

Public Member Functions

virtual bool get_absolute_time (double &p_value)=0
 Retrieves absolute playback time since last playback start or seek. You typically pass value retrieved by this function - optionally with offset added - to other visualisation_stream methods.
virtual bool get_chunk_absolute (audio_chunk &p_chunk, double p_offset, double p_requested_length)=0
virtual bool get_spectrum_absolute (audio_chunk &p_chunk, double p_offset, unsigned p_fft_size)=0
virtual void make_fake_chunk_absolute (audio_chunk &p_chunk, double p_offset, double p_requested_length)=0
virtual void make_fake_spectrum_absolute (audio_chunk &p_chunk, double p_offset, unsigned p_fft_size)=0

Static Public Attributes

static const GUID class_guid


Detailed Description

This class provides abstraction for receiving visualisation data. Instances of visualisation_stream being created/released serve as an indication for visualisation backend to process currently played audio data or shut down when there are no visualisation clients active.
Use visualisation_manager::create_stream to instantiate.

Member Typedef Documentation

Reimplemented from service_base.


Member Function Documentation

virtual bool visualisation_stream::get_absolute_time ( double &  p_value  )  [pure virtual]

Retrieves absolute playback time since last playback start or seek. You typically pass value retrieved by this function - optionally with offset added - to other visualisation_stream methods.

virtual bool visualisation_stream::get_chunk_absolute ( audio_chunk p_chunk,
double  p_offset,
double  p_requested_length 
) [pure virtual]

Retrieves an audio chunk starting at specified offset (see get_absolute_time()), of specified length.

Returns:
False when requested timestamp is out of available range, true on success.

virtual bool visualisation_stream::get_spectrum_absolute ( audio_chunk p_chunk,
double  p_offset,
unsigned  p_fft_size 
) [pure virtual]

Retrieves spectrum for audio data at specified offset (see get_absolute_time()), with specified FFT size.

Parameters:
p_chunk Receives spectrum data. audio_chunk type is used for consistency (since required functionality is identical to provided by audio_chunk), the data is *not* PCM. Returned sample count is equal to half of FFT size; channels and sample rate are as in audio stream the spectrum was generated from.
p_offset Timestamp of spectrum to retrieve. See get_absolute_time().
p_fft_size FFT size to use for spectrum generation. Must be a power of 2.
Returns:
False when requested timestamp is out of available range, true on success.

virtual void visualisation_stream::make_fake_chunk_absolute ( audio_chunk p_chunk,
double  p_offset,
double  p_requested_length 
) [pure virtual]

Generates fake audio chunk to display when get_chunk_absolute() fails - e.g. shortly after visualisation_stream creation data for currently played audio might not be available yet. Throws std::exception derivatives on failure.

virtual void visualisation_stream::make_fake_spectrum_absolute ( audio_chunk p_chunk,
double  p_offset,
unsigned  p_fft_size 
) [pure virtual]

Generates fake spectrum to display when get_spectrum_absolute() fails - e.g. shortly after visualisation_stream creation data for currently played audio might not be available yet. Throws std::exception derivatives on failure.


Member Data Documentation

const GUID visualisation_stream::class_guid [static]

Initial value:

 
{ 0x4a4b1dd8, 0x82ff, 0x4071, { 0xa6, 0xe2, 0xbd, 0x4, 0x3f, 0x4c, 0x25, 0x1c } }


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

Generated on Fri Apr 18 13:56:58 2008 for foobar2000 SDK by  doxygen 1.5.5