PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFBVocoder
Wrapper Class for the IVocoder interface.
#include <SFBVocoder.h.hpp>
class SFBVocoder : public SFBBase;
SFMTYPEDEFWRAPPER(SFBVocoder)

Inheritance diagram

 Inheritance diagram of SFBVocoderClass

Version

BREW 2.0 BREW 2.1 BREW 3.1 BREW 4.0
O O O O

Reference

BREW API IVocoder

Member

Public Functions
SInt16 GetFrameLength( VocoderType type , DataRateType rate , UInt16Ptr length )
Provide the size of the specified vocoder frame at a given rate
SFCError GetInDepth( UInt16Ptr depth )
Discover how many encoded frames are queued
SFCError GetOutDepth( UInt16Ptr depth )
Discover how many frames are queued for playout.
static
SFBVocoderSmp
NewInstance( SFCErrorPtr exception = null )
Create a new SFBVocoder instance.
static
SFBVocoderSmp
NewInstance( AEECLSID id , SFCErrorPtr exception = null )
Create a new SFBVocoder instance.
SFCError PlayTone( UInt16 tone1 , UInt16 tone2 , SInt16 volume , UInt16 duration )
Play a tone through the vocoder
SFCError VocConfigure( IVocoderConfigType config , IVocoderInfoType* info )
This function configures the vocoder object to use a specific vocoder.
SFCError VocInRead( DataRateType* rate , UInt16Ptr length , VoidPtr data )
Obtain the oldest encoded voice frame from the queue.
SFCError VocInRead( DataRateType* rate , SFXBufferPtr data )
Obtain the oldest encoded voice frame from the queue.
SFCError VocInReset( Void )
Clear the queue of encoded vocoder frames.
SFCError VocInStart( Void )
Start encoding voice frames.
SFCError VocInStop( Void )
Stop encoding voice frames.
SFCError VocOutReset( Void )
Clear the queue of frames available for decoding.
SFCError VocOutStart( Void )
Start the decoding and playout of queued frames.
SFCError VocOutStop( Void )
Stop the decoding and playout of queued frames.
SFCError VocOutWrite( DataRateType rate , UInt16 length , VoidConstPtr data )
Provide a new frame of data for the decoder.
SFCError VocOutWrite( DataRateType rate , SFXBufferConstRef data )
Provide a new frame of data for the decoder.
Protected Functions
static
SFBBaseSmp
FactoryByCreate( AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface.
static
SFBBaseSmp
FactoryByQuery( SFBQuerySmpConstRef query , AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface using the SFBQuery instance.

SFBVocoder::GetFrameLength
Provide the size of the specified vocoder frame at a given rate
[ public ]
SInt16 GetFrameLength(
    VocoderType type    // vocoder type of the frame 
    DataRateType rate   // data rate of the frame 
    UInt16Ptr length    // pointer to storage to accept size of the frame
);

Reference

BREW API IVOCODER_GetFrameLength


SFBVocoder::GetInDepth
Discover how many encoded frames are queued
[ public ]
SFCError GetInDepth(
    UInt16Ptr depth   // pointer to storage to accept count of queued frames 
);

Reference

BREW API IVOCODER_GetInDepth


SFBVocoder::GetOutDepth
Discover how many frames are queued for playout.
[ public ]
SFCError GetOutDepth(
    UInt16Ptr depth   // pointer to storage to accept count of queued frames 
);

Reference

BREW API IVOCODER_GetOutDepth


SFBVocoder::NewInstance
Create a new SFBVocoder instance.
[ public, static ]
SFBVocoderSmp NewInstance(
    SFCErrorPtr exception = null   // Error
);
[ public, static ]
SFBVocoderSmp NewInstance(
    AEECLSID id                    // Class ID
    SFCErrorPtr exception = null   // Error
);

SFBVocoder::PlayTone
Play a tone through the vocoder
[ public ]
SFCError PlayTone(
    UInt16 tone1      // frequency of first tone 
    UInt16 tone2      // frequency of second tone 
    SInt16 volume     // volume of tones 
    UInt16 duration   // duration of tones
);

Reference

BREW API IVOCODER_PlayTone


SFBVocoder::VocConfigure
This function configures the vocoder object to use a specific vocoder.
[ public ]
SFCError VocConfigure(
    IVocoderConfigType config   // configuration parameters for the vocoder object 
    IVocoderInfoType* info      // configuration information about the selected vocoder 
);

Reference

BREW API IVOCODER_VocConfigure | IVocoderConfigType


SFBVocoder::VocInRead
Obtain the oldest encoded voice frame from the queue.
[ public ]
SFCError VocInRead(
    DataRateType* rate   // pointer to storage to accept data rate of the frame
    UInt16Ptr length     // pointer to storage to accept size in bytes of the frame
    VoidPtr data         // pointer to storage to accept the encoded frame bytes 
);
[ public ]
SFCError VocInRead(
    DataRateType* rate   // pointer to storage to accept data rate of the frame
    SFXBufferPtr data    // pointer to storage to accept the encoded frame bytes, 
                         // the size is modified to UInt16 automatically when called by API
);

Reference

BREW API IVOCODER_VocInRead | IVocoderConfigType


SFBVocoder::VocInReset
Clear the queue of encoded vocoder frames.
[ public ]
SFCError VocInReset(Void);

Reference

BREW API IVOCODER_VocInReset | SFBVocoder::VocInStop


SFBVocoder::VocInStart
Start encoding voice frames.
[ public ]
SFCError VocInStart(Void);

Reference

BREW API IVOCODER_VocInStart | IVocoderConfigType


SFBVocoder::VocInStop
Stop encoding voice frames.
[ public ]
SFCError VocInStop(Void);

Reference

BREW API IVOCODER_VocInStop | IVocoderConfigType


SFBVocoder::VocOutReset
Clear the queue of frames available for decoding.
[ public ]
SFCError VocOutReset(Void);

Reference

BREW API IVOCODER_VocOutReset | IVocoderConfigType


SFBVocoder::VocOutStart
Start the decoding and playout of queued frames.
[ public ]
SFCError VocOutStart(Void);

Reference

BREW API IVOCODER_VocOutStart | SFBVocoder::VocOutWrite | IVocoderConfigType


SFBVocoder::VocOutStop
Stop the decoding and playout of queued frames.
[ public ]
SFCError VocOutStop(Void);

Reference

BREW API IVOCODER_VocOutStop


SFBVocoder::VocOutWrite
Provide a new frame of data for the decoder.
[ public ]
SFCError VocOutWrite(
    DataRateType rate   // data rate of the frame
    UInt16 length       // size in bytes of the frame 
    VoidConstPtr data   // pointer to the frame data bytes
);
[ public ]
SFCError VocOutWrite(
    DataRateType rate        // data rate of the frame
    SFXBufferConstRef data   // buffer to the frame data bytes, 
                             // size is modified to UInt16 automatically when called by API
);

Reference

BREW API IVOCODER_VocOutWrite | IVocoderConfigType