This service provides a means to share audio data captured from a sound source (e.g. microphone). More...
#include <audiosensor.h>
Public Member Functions | |
AudioSensor () | |
~AudioSensor () | |
virtual bool | SetAudioSample (const Byte deviceID, const Audio::Format format, const int frequency, const Packet &audioBuffer, const Time ×tamp=Time(true)) |
Audio | GetAudioSample (const int deviceID=-1) const |
virtual bool | GenerateEvent (const Events::Subscription &info) const |
virtual bool | IsEventSupported (const Events::Type type, const double requestedPeriodicRate, const Message *queryMessage, double &confirmedPeriodicRate, std::string &errorMessage) const |
virtual bool | IsDiscoverable () const |
virtual void | Receive (const Message *message) |
Processes messages passed-to or received by this Service. | |
virtual Message * | CreateMessage (const UShort messageCode) const |
Static Public Attributes | |
static const std::string | Name |
String name of the Service. |
This service provides a means to share audio data captured from a sound source (e.g. microphone).
Definition at line 59 of file audiosensor.h.
JAUS::AudioSensor::AudioSensor | ( | ) |
JAUS::AudioSensor::~AudioSensor | ( | ) |
Implements JAUS::Service.
virtual bool JAUS::AudioSensor::GenerateEvent | ( | const Events::Subscription & | info ) | const [virtual] |
Implements JAUS::Events::Child.
Audio JAUS::AudioSensor::GetAudioSample | ( | const int | deviceID = -1 ) |
const |
virtual bool JAUS::AudioSensor::IsDiscoverable | ( | ) | const [inline, virtual] |
Implements JAUS::Service.
Definition at line 83 of file audiosensor.h.
virtual bool JAUS::AudioSensor::IsEventSupported | ( | const Events::Type | type, |
const double | requestedPeriodicRate, | ||
const Message * | queryMessage, | ||
double & | confirmedPeriodicRate, | ||
std::string & | errorMessage | ||
) | const [virtual] |
Implements JAUS::Events::Child.
virtual void JAUS::AudioSensor::Receive | ( | const Message * | message ) | [virtual] |
Processes messages passed-to or received by this Service.
Whenever a Service receives a message, this method is called. New Services must overload this method to add processing capabilities.
If the service does not support the Message, then it must use the PushMessageToChildren method to pass it to inheriting Services that do support it (this is the default behavior of the method).
Reimplemented from JAUS::Service.
virtual bool JAUS::AudioSensor::SetAudioSample | ( | const Byte | deviceID, |
const Audio::Format | format, | ||
const int | frequency, | ||
const Packet & | audioBuffer, | ||
const Time & | timestamp = Time(true) |
||
) | [virtual] |
const std::string JAUS::AudioSensor::Name [static] |
String name of the Service.
Definition at line 62 of file audiosensor.h.