vrpn 07.35
Virtual Reality Peripheral Network
Loading...
Searching...
No Matches
vrpn_Sound_Server Class Referenceabstract

#include <vrpn_Sound.h>

Inheritance diagram for vrpn_Sound_Server:
Collaboration diagram for vrpn_Sound_Server:

Public Member Functions

 vrpn_Sound_Server (const char *name, vrpn_Connection *c)
 ~vrpn_Sound_Server ()
virtual void playSound (vrpn_SoundID id, vrpn_int32 repeat, vrpn_SoundDef soundDef)=0
virtual void loadSoundLocal (char *filename, vrpn_SoundID id, vrpn_SoundDef soundDef)=0
virtual void loadSoundRemote (char *file, vrpn_SoundID id, vrpn_SoundDef soundDef)=0
virtual void stopSound (vrpn_SoundID id)=0
virtual void unloadSound (vrpn_SoundID id)=0
virtual void changeSoundStatus (vrpn_SoundID id, vrpn_SoundDef soundDef)=0
virtual void setListenerPose (vrpn_PoseDef pose)=0
virtual void setListenerVelocity (vrpn_float64 *velocity)=0
virtual void setSoundPose (vrpn_SoundID id, vrpn_PoseDef pose)=0
virtual void setSoundVelocity (vrpn_SoundID id, vrpn_float64 *velocity)=0
virtual void setSoundDistInfo (vrpn_SoundID id, vrpn_float64 *distinfo)=0
virtual void setSoundConeInfo (vrpn_SoundID id, vrpn_float64 *coneinfo)=0
virtual void setSoundDoplerFactor (vrpn_SoundID id, vrpn_float64 doplerfactor)=0
virtual void setSoundEqValue (vrpn_SoundID id, vrpn_float64 eqvalue)=0
virtual void setSoundPitch (vrpn_SoundID id, vrpn_float64 pitch)=0
virtual void setSoundVolume (vrpn_SoundID id, vrpn_float64 volume)=0
virtual void loadModelLocal (const char *filename)=0
virtual void loadModelRemote ()=0
virtual void loadPolyQuad (vrpn_QuadDef *quad)=0
virtual void loadPolyTri (vrpn_TriDef *tri)=0
virtual void loadMaterial (vrpn_MaterialDef *material, vrpn_int32 id)=0
virtual void setPolyQuadVertices (vrpn_float64 vertices[4][3], const vrpn_int32 id)=0
virtual void setPolyTriVertices (vrpn_float64 vertices[3][3], const vrpn_int32 id)=0
virtual void setPolyOF (vrpn_float64 OF, vrpn_int32 tag)=0
virtual void setPolyMaterial (const char *material, vrpn_int32 tag)=0
Public Member Functions inherited from vrpn_Sound
 vrpn_Sound (const char *name, vrpn_Connection *c)
 ~vrpn_Sound ()
Public Member Functions inherited from vrpn_BaseClass
 vrpn_BaseClass (const char *name, vrpn_Connection *c=NULL)
 Names the device and assigns or opens connection, calls registration methods.
virtual ~vrpn_BaseClass ()
Public Member Functions inherited from vrpn_BaseClassUnique
 vrpn_BaseClassUnique ()
virtual ~vrpn_BaseClassUnique ()
 Unregister all of the message handlers that were to be autodeleted.
vrpn_ConnectionconnectionPtr ()
 Returns a pointer to the connection this object is using.
Public Member Functions inherited from vrpn_Text_Sender
 vrpn_Text_Sender (const char *name, vrpn_Connection *c=NULL)
void mainloop (void)
 Mainloop the connection to send the message.
int send_message (const char *msg, vrpn_TEXT_SEVERITY type=vrpn_TEXT_NORMAL, vrpn_uint32 level=0, const struct timeval time=vrpn_TEXT_NOW)
 Send a text message.

Additional Inherited Members

Public Attributes inherited from vrpn_BaseClassUnique
bool shutup
Protected Member Functions inherited from vrpn_Sound
int register_types (void)
 Register the types of messages this device sends/receives. Return 0 on success, -1 on fail.
vrpn_int32 encodeSound_local (const char *filename, const vrpn_SoundID id, const vrpn_SoundDef soundDef, char **buf)
vrpn_int32 decodeSound_local (const char *buf, char **filename, vrpn_SoundID *id, vrpn_SoundDef *soundDef, const int payload)
vrpn_int32 encodeSound_remote (const char *filename, const vrpn_SoundID id, char **buf)
vrpn_int32 decodeSound_remote (const char *buf, char **filename, vrpn_SoundID *id, const int payload)
vrpn_int32 encodeSoundID (const vrpn_SoundID id, char *buf)
vrpn_int32 decodeSoundID (const char *buf, vrpn_SoundID *id)
vrpn_int32 encodeSoundDef (const vrpn_SoundDef sound, const vrpn_SoundID id, const vrpn_int32 repeat, char *buf)
vrpn_int32 decodeSoundDef (const char *buf, vrpn_SoundDef *sound, vrpn_SoundID *id, vrpn_int32 *repeat)
vrpn_int32 encodeSoundPlay (const vrpn_SoundID id, const vrpn_int32 repeat, char *buf)
vrpn_int32 decodeSoundPlay (const char *buf, vrpn_SoundID *id, vrpn_int32 *repeat)
vrpn_int32 encodeListenerVelocity (const vrpn_float64 *velocity, char *buf)
vrpn_int32 decodeListenerVelocity (const char *buf, vrpn_float64 *velocity)
vrpn_int32 encodeListenerPose (const vrpn_PoseDef pose, char *buf)
vrpn_int32 decodeListenerPose (const char *buf, vrpn_PoseDef *pose)
vrpn_int32 encodeSoundPose (const vrpn_PoseDef pose, const vrpn_SoundID id, char *buf)
vrpn_int32 decodeSoundPose (const char *buf, vrpn_PoseDef *pose, vrpn_SoundID *id)
vrpn_int32 encodeSoundVelocity (const vrpn_float64 *velocity, const vrpn_SoundID id, char *buf)
vrpn_int32 decodeSoundVelocity (const char *buf, vrpn_float64 *velocity, vrpn_SoundID *id)
vrpn_int32 encodeSoundDistInfo (const vrpn_float64 min_back, const vrpn_float64 max_back, const vrpn_float64 min_front, const vrpn_float64 max_front, const vrpn_SoundID id, char *buf)
vrpn_int32 decodeSoundDistInfo (const char *buf, vrpn_float64 *min_back, vrpn_float64 *max_back, vrpn_float64 *min_front, vrpn_float64 *max_front, vrpn_SoundID *id)
vrpn_int32 encodeSoundConeInfo (const vrpn_float64 cone_inner_angle, const vrpn_float64 cone_outer_angle, const vrpn_float64 cone_gain, const vrpn_SoundID id, char *buf)
vrpn_int32 decodeSoundConeInfo (const char *buf, vrpn_float64 *cone_inner_angle, vrpn_float64 *cone_outer_angle, vrpn_float64 *cone_gain, vrpn_SoundID *id)
vrpn_int32 encodeSoundDoplerScale (const vrpn_float64 doplerfactor, const vrpn_SoundID id, char *buf)
vrpn_int32 decodeSoundDoplerScale (const char *buf, vrpn_float64 *doplerfactor, vrpn_SoundID *id)
vrpn_int32 encodeSoundEqFactor (const vrpn_float64 eqfactor, const vrpn_SoundID id, char *buf)
vrpn_int32 decodeSoundEqFactor (const char *buf, vrpn_float64 *eqfactor, vrpn_SoundID *id)
vrpn_int32 encodeSoundPitch (const vrpn_float64 pitch, const vrpn_SoundID id, char *buf)
vrpn_int32 decodeSoundPitch (const char *buf, vrpn_float64 *pitch, vrpn_SoundID *id)
vrpn_int32 encodeSoundVolume (const vrpn_float64 volume, const vrpn_SoundID id, char *buf)
vrpn_int32 decodeSoundVolume (const char *buf, vrpn_float64 *volume, vrpn_SoundID *id)
vrpn_int32 encodeLoadModel_local (const char *filename, char **buf)
vrpn_int32 decodeLoadModel_local (const char *buf, char **filename, const int payload)
vrpn_int32 encodeLoadModel_remote (const char *filename, char **buf)
vrpn_int32 decodeLoadModel_remote (const char *buf, char **filename, const int payload)
vrpn_int32 encodeLoadPolyQuad (const vrpn_QuadDef quad, char *buf)
vrpn_int32 decodeLoadPolyQuad (const char *buf, vrpn_QuadDef *quad)
vrpn_int32 encodeLoadPolyTri (const vrpn_TriDef tri, char *buf)
vrpn_int32 decodeLoadPolyTri (const char *buf, vrpn_TriDef *tri)
vrpn_int32 encodeLoadMaterial (const vrpn_int32 id, const vrpn_MaterialDef material, char *buf)
vrpn_int32 decodeLoadMaterial (const char *buf, vrpn_MaterialDef *material, vrpn_int32 *id)
vrpn_int32 encodeSetQuadVert (const vrpn_float64 vertices[4][3], const vrpn_int32 tag, char *buf)
vrpn_int32 decodeSetQuadVert (const char *buf, vrpn_float64(*vertices)[4][3], vrpn_int32 *tag)
vrpn_int32 encodeSetTriVert (const vrpn_float64 vertices[3][3], const vrpn_int32 tag, char *buf)
vrpn_int32 decodeSetTriVert (const char *buf, vrpn_float64(*vertices)[3][3], vrpn_int32 *tag)
vrpn_int32 encodeSetPolyOF (const vrpn_float64 openingfactor, const vrpn_int32 tag, char *buf)
vrpn_int32 decodeSetPolyOF (const char *buf, vrpn_float64 *openingfactor, vrpn_int32 *tag)
vrpn_int32 encodeSetPolyMaterial (const char *material, const vrpn_int32 tag, char *buf)
vrpn_int32 decodeSetPolyMaterial (const char *buf, char **material, vrpn_int32 *tag, const int payload)
Protected Member Functions inherited from vrpn_BaseClass
virtual int init (void)
 Initialize things that the constructor can't. Returns 0 on success, -1 on failure.
virtual int register_senders (void)
 Register the sender for this device (by default, the name of the device). Return 0 on success, -1 on fail.
Protected Member Functions inherited from vrpn_BaseClassUnique
int register_autodeleted_handler (vrpn_int32 type, vrpn_MESSAGEHANDLER handler, void *userdata, vrpn_int32 sender=vrpn_ANY_SENDER)
 Registers a handler with the connection, and remembers to delete at destruction.
int send_text_message (const char *msg, struct timeval timestamp, vrpn_TEXT_SEVERITY type=vrpn_TEXT_NORMAL, vrpn_uint32 level=0)
 Sends a NULL-terminated text message from the device d_sender_id.
SendTextMessageBoundCall send_text_message (vrpn_TEXT_SEVERITY type=vrpn_TEXT_NORMAL)
 Returns an object you can stream into to send a text message from the device like send_text_message(vrpn_TEXT_WARNING) << "Value of i is: " << i; This use requires including vrpn_SendTextMessageStreamProxy.h.
void server_mainloop (void)
 Handles functions that all servers should provide in their mainloop() (ping/pong, for example) Should be called by all servers in their mainloop().
void client_mainloop (void)
 Handles functions that all clients should provide in their mainloop() (warning of no server, for example) Should be called by all clients in their mainloop().
Protected Member Functions inherited from vrpn_Text_Sender
virtual int register_types (void)
 No types to register beyond the text, which is done in BaseClass.
Static Protected Member Functions inherited from vrpn_BaseClassUnique
static int encode_text_message_to_buffer (char *buf, vrpn_TEXT_SEVERITY severity, vrpn_uint32 level, const char *msg)
 Encodes the body of the text message into a buffer, preparing for sending.
static int decode_text_message_from_buffer (char *msg, vrpn_TEXT_SEVERITY *severity, vrpn_uint32 *level, const char *buf)
 Decodes the body of the text message from a buffer from the connection.
Protected Attributes inherited from vrpn_Sound
vrpn_int32 load_sound_local
vrpn_int32 load_sound_remote
vrpn_int32 unload_sound
vrpn_int32 play_sound
vrpn_int32 stop_sound
vrpn_int32 change_sound_status
vrpn_int32 set_listener_pose
vrpn_int32 set_listener_velocity
vrpn_int32 set_sound_pose
vrpn_int32 set_sound_velocity
vrpn_int32 set_sound_distanceinfo
vrpn_int32 set_sound_coneinfo
vrpn_int32 set_sound_doplerfactor
vrpn_int32 set_sound_eqvalue
vrpn_int32 set_sound_pitch
vrpn_int32 set_sound_volume
vrpn_int32 load_model_local
vrpn_int32 load_model_remote
vrpn_int32 load_polyquad
vrpn_int32 load_polytri
vrpn_int32 load_material
vrpn_int32 set_polyquad_vertices
vrpn_int32 set_polytri_vertices
vrpn_int32 set_poly_openingfactor
vrpn_int32 set_poly_material
vrpn_int32 receive_text_message
struct timeval timestamp
Protected Attributes inherited from vrpn_BaseClassUnique
vrpn_Connectiond_connection
 Connection that this object talks to.
char * d_servicename
 Name of this device, not including the connection part.
vrpn_int32 d_sender_id
 Sender ID registered with the connection.
vrpn_int32 d_text_message_id
 ID for text messages.
vrpn_int32 d_ping_message_id
 Ask the server if they are there.
vrpn_int32 d_pong_message_id
 Server telling that it is there.

Detailed Description

Definition at line 346 of file vrpn_Sound.h.

Constructor & Destructor Documentation

◆ vrpn_Sound_Server()

◆ ~vrpn_Sound_Server()

vrpn_Sound_Server::~vrpn_Sound_Server ( )

Definition at line 1439 of file vrpn_Sound.C.

Member Function Documentation

◆ changeSoundStatus()

virtual void vrpn_Sound_Server::changeSoundStatus ( vrpn_SoundID id,
vrpn_SoundDef soundDef )
pure virtual

◆ loadMaterial()

virtual void vrpn_Sound_Server::loadMaterial ( vrpn_MaterialDef * material,
vrpn_int32 id )
pure virtual

◆ loadModelLocal()

virtual void vrpn_Sound_Server::loadModelLocal ( const char * filename)
pure virtual

◆ loadModelRemote()

virtual void vrpn_Sound_Server::loadModelRemote ( )
pure virtual

◆ loadPolyQuad()

virtual void vrpn_Sound_Server::loadPolyQuad ( vrpn_QuadDef * quad)
pure virtual

◆ loadPolyTri()

virtual void vrpn_Sound_Server::loadPolyTri ( vrpn_TriDef * tri)
pure virtual

◆ loadSoundLocal()

virtual void vrpn_Sound_Server::loadSoundLocal ( char * filename,
vrpn_SoundID id,
vrpn_SoundDef soundDef )
pure virtual

◆ loadSoundRemote()

virtual void vrpn_Sound_Server::loadSoundRemote ( char * file,
vrpn_SoundID id,
vrpn_SoundDef soundDef )
pure virtual

◆ playSound()

virtual void vrpn_Sound_Server::playSound ( vrpn_SoundID id,
vrpn_int32 repeat,
vrpn_SoundDef soundDef )
pure virtual

◆ setListenerPose()

virtual void vrpn_Sound_Server::setListenerPose ( vrpn_PoseDef pose)
pure virtual

◆ setListenerVelocity()

virtual void vrpn_Sound_Server::setListenerVelocity ( vrpn_float64 * velocity)
pure virtual

◆ setPolyMaterial()

virtual void vrpn_Sound_Server::setPolyMaterial ( const char * material,
vrpn_int32 tag )
pure virtual

◆ setPolyOF()

virtual void vrpn_Sound_Server::setPolyOF ( vrpn_float64 OF,
vrpn_int32 tag )
pure virtual

◆ setPolyQuadVertices()

virtual void vrpn_Sound_Server::setPolyQuadVertices ( vrpn_float64 vertices[4][3],
const vrpn_int32 id )
pure virtual

◆ setPolyTriVertices()

virtual void vrpn_Sound_Server::setPolyTriVertices ( vrpn_float64 vertices[3][3],
const vrpn_int32 id )
pure virtual

◆ setSoundConeInfo()

virtual void vrpn_Sound_Server::setSoundConeInfo ( vrpn_SoundID id,
vrpn_float64 * coneinfo )
pure virtual

◆ setSoundDistInfo()

virtual void vrpn_Sound_Server::setSoundDistInfo ( vrpn_SoundID id,
vrpn_float64 * distinfo )
pure virtual

◆ setSoundDoplerFactor()

virtual void vrpn_Sound_Server::setSoundDoplerFactor ( vrpn_SoundID id,
vrpn_float64 doplerfactor )
pure virtual

◆ setSoundEqValue()

virtual void vrpn_Sound_Server::setSoundEqValue ( vrpn_SoundID id,
vrpn_float64 eqvalue )
pure virtual

◆ setSoundPitch()

virtual void vrpn_Sound_Server::setSoundPitch ( vrpn_SoundID id,
vrpn_float64 pitch )
pure virtual

◆ setSoundPose()

virtual void vrpn_Sound_Server::setSoundPose ( vrpn_SoundID id,
vrpn_PoseDef pose )
pure virtual

◆ setSoundVelocity()

virtual void vrpn_Sound_Server::setSoundVelocity ( vrpn_SoundID id,
vrpn_float64 * velocity )
pure virtual

◆ setSoundVolume()

virtual void vrpn_Sound_Server::setSoundVolume ( vrpn_SoundID id,
vrpn_float64 volume )
pure virtual

◆ stopSound()

virtual void vrpn_Sound_Server::stopSound ( vrpn_SoundID id)
pure virtual

◆ unloadSound()

virtual void vrpn_Sound_Server::unloadSound ( vrpn_SoundID id)
pure virtual

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