Urbi SDK Remote for C++  2.7.5
urbi::USound Class Reference

Class encapsulating sound information. More...

#include <usound.hh>

Collaboration diagram for urbi::USound:

List of all members.

Public Member Functions

void init ()
 Initialize.
const char * format_string () const
 Return a legible definition of imageFormat.
bool operator== (const USound &b) const
std::ostream & dump (std::ostream &o) const

Static Public Member Functions

static USound make ()
 Return an empty instance.

Public Attributes

char * data
 Pointer to sound data.
size_t size
 Total size in byte.
size_t channels
 Number of audio channels.
size_t rate
 Rate in Hertz.
size_t sampleSize
 Sample size in bit.
USoundFormat soundFormat
 Format of the sound data.
USoundSampleFormat sampleFormat
 Sample format.

Private Member Functions

std::string headers_ () const

Friends

class UBinary

Detailed Description

Class encapsulating sound information.

This class does not handle its memory: the data field must be freed manualy.

Definition at line 62 of file usound.hh.


Member Function Documentation

std::ostream & urbi::USound::dump ( std::ostream &  o) const

Definition at line 136 of file usound.cc.

References channels, format_string(), rate, sampleFormat, sampleSize, and size.

Referenced by urbi::operator<<().

const char * urbi::USound::format_string ( ) const

Return a legible definition of imageFormat.

Definition at line 121 of file usound.cc.

References soundFormat.

Referenced by dump(), and headers_().

std::string urbi::USound::headers_ ( ) const [private]

Definition at line 127 of file usound.cc.

References channels, format_string(), rate, sampleFormat, and sampleSize.

Referenced by urbi::UBinary::getMessage().

void urbi::USound::init ( )

Initialize.

Not a constructor so that we can still put it in a union.

Definition at line 98 of file usound.cc.

References channels, data, rate, urbi::SAMPLE_UNSIGNED, sampleFormat, sampleSize, size, urbi::SOUND_UNKNOWN, and soundFormat.

Referenced by make().

USound urbi::USound::make ( ) [static]

Return an empty instance.

Not a constructor so that we can still put it in a union.

Definition at line 107 of file usound.cc.

References init().

Referenced by urbi::UValue::operator USound().

bool urbi::USound::operator== ( const USound b) const

Definition at line 115 of file usound.cc.


Friends And Related Function Documentation

friend class UBinary [friend]

Definition at line 99 of file usound.hh.


Member Data Documentation

Number of audio channels.

Definition at line 86 of file usound.hh.

Referenced by urbi::convert(), dump(), headers_(), init(), urbi::UBinary::parse(), and urbi::UAbstractClient::sendSound().

Pointer to sound data.

Definition at line 82 of file usound.hh.

Referenced by urbi::convert(), init(), urbi::UAbstractClient::sendSound(), and urbi::UBinary::UBinary().

Rate in Hertz.

Definition at line 88 of file usound.hh.

Referenced by urbi::convert(), dump(), headers_(), init(), urbi::UBinary::parse(), and urbi::UAbstractClient::sendSound().

Sample size in bit.

Definition at line 90 of file usound.hh.

Referenced by urbi::convert(), dump(), headers_(), init(), urbi::UBinary::parse(), and urbi::UAbstractClient::sendSound().


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