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

Inheritance diagram

 Inheritance diagram of SFBSoundClass

Version

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

Reference

BREW API ISound

Member

Public Functions
Void Get( AEESoundInfo* info )
Get the device attributes of SFBSound Interface object.
Void GetVolume( Void )
Retrieve the current volume used for the device/method pair.
static
SFBSoundSmp
NewInstance( SFCErrorPtr exception = null )
Create a new SFBSound instance.
static
SFBSoundSmp
NewInstance( AEECLSID id , SFCErrorPtr exception = null )
Create a new SFBSound instance.
Void PlayFreqTone( UInt16 hiFreq , UInt16 loFreq , UInt16 duration = 0 )
Play a tone given a high frequency and a low frequency for the specified amount of time.
Void PlayTone( AEESoundToneData tone )
Play a tone given a tone ID for the specified amount of time.
Void PlayToneList( AEESoundToneData* tones , UInt16 count )
Play a list of tones given a tone ID for the specified amount of time.
Void RegisterNotify( PFNSOUNDSTATUS notify , VoidConstPtr data = null )
Register the status callback function.
SFCError Set( AEESoundInfo const & info )
Set the device attributes of SFBSound Interface object.
Void SetDevice( Void )
Connect the SFBSound instance to a specific audio device.
Void SetVolume( UInt16 volume )
Set the volume to be used for the device/method pair specified in the call to SFBSOUND::Set().
Void StopTone( Void )
Stop playing current tone or ends the playback of tone list.
Void StopVibrate( Void )
Stop the current vibration.
Void UnregisterNotify( Void )
Unregister the status callback function.
Void Vibrate( UInt16 duration )
Cause the device to vibrate for the specified amount or until SFBSOUND::StopVibrate() is called.
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.

SFBSound::Get
Get the device attributes of SFBSound Interface object.
[ public ]
Void Get(
    AEESoundInfo* info   // structure containing device attributes 
);

Reference

BREW API ISOUND_Get | AEESoundInfo | SFBSound::Set


SFBSound::GetVolume
Retrieve the current volume used for the device/method pair.
[ public ]
Void GetVolume(Void);

Reference

BREW API ISOUND_GetVolume


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

SFBSound::PlayFreqTone
Play a tone given a high frequency and a low frequency for the specified amount of time.
[ public ]
Void PlayFreqTone(
    UInt16 hiFreq         // higher frequency of the DTMF pair
    UInt16 loFreq         // higher frequency of the DTMF pair 
    UInt16 duration = 0   // tone play duration in milliseconds 
);

Reference

BREW API ISOUND_PlayFreqTone


SFBSound::PlayTone
Play a tone given a tone ID for the specified amount of time.
[ public ]
Void PlayTone(
    AEESoundToneData tone   // structure containing a ToneID and the duration in milliseconds for which that tone is to be played 
);

Reference

BREW API ISOUND_PlayTone | AEESoundToneData


SFBSound::PlayToneList
Play a list of tones given a tone ID for the specified amount of time.
[ public ]
Void PlayToneList(
    AEESoundToneData* tones   // list of structures containing a ToneID and the duration in milliseconds for which that tone is to be played
    UInt16 count              // number of tones in the tones list
);

Reference

BREW API ISOUND_PlayToneList | AEESoundToneData


SFBSound::RegisterNotify
Register the status callback function.
[ public ]
Void RegisterNotify(
    PFNSOUNDSTATUS notify      // status callback function pointer (can be null, if no callback is required)
    VoidConstPtr data = null   // user data for unique correlation/identification of the transaction. 
                               // this piece of information is not retrieved or processed by SFBSound and can be null 
                               // if no identifying data is required. 
                               // this same data pointer is passed back to the client along with callback status to correlate the transactions
);

Reference

BREW API ISOUND_RegisterNotify | PFNSOUNDSTATUS


SFBSound::Set
Set the device attributes of SFBSound Interface object.
[ public ]
SFCError Set(
    AEESoundInfo const & info   // structure containing device attributes 
);

Reference

BREW API ISOUND_Set | AEESoundInfo | SFBSound::Get


SFBSound::SetDevice
Connect the SFBSound instance to a specific audio device.
[ public ]
Void SetDevice(Void);

Reference

BREW API ISOUND_SetDevice | SFBSound::Set


SFBSound::SetVolume
Set the volume to be used for the device/method pair specified in the call to SFBSOUND::Set().
[ public ]
Void SetVolume(
    UInt16 volume   // new volume level for device/method 
);

Reference

BREW API ISOUND_SetVolume | SFBSound::Set


SFBSound::StopTone
Stop playing current tone or ends the playback of tone list.
[ public ]
Void StopTone(Void);

Reference

BREW API ISOUND_StopTone | SFBSound::Vibrate


SFBSound::StopVibrate
Stop the current vibration.
[ public ]
Void StopVibrate(Void);

Reference

BREW API ISOUND_StopVibrate | SFBSound::Vibrate


SFBSound::UnregisterNotify
Unregister the status callback function.
[ public ]
Void UnregisterNotify(Void);

Description

Calling this function is as same as calling SFBSound::RegisterNotify( null , null )

Reference

SFBSound::RegisterNotify


SFBSound::Vibrate
Cause the device to vibrate for the specified amount or until SFBSOUND::StopVibrate() is called.
[ public ]
Void Vibrate(
    UInt16 duration   // duration of vibration in milliseconds 
);

Reference

BREW API ISOUND_Vibrate | SFBSound::StopVibrate