SophiaFramework UNIVERSE 5.3 |
#include <SFBSoundPlayer.h.hpp>
class SFBSoundPlayer : public SFBBase;
SFMTYPEDEFWRAPPER(SFBSoundPlayer)
BREW 2.0 | BREW 2.1 | BREW 3.1 | BREW 4.0 |
---|---|---|---|
O | O | O | O |
Public Functions | |
---|---|
Void |
FastForward(
UInt32 time
)
Issue a command to fast-forward the current MIDI/MP3 playback.
|
SFCError |
GetInfo(
AEESoundPlayerInfo* info
)
Get either the current audio source of SFBSoundPlayer or the state of SFBSoundPlayer.
The status of the function is returned immediately.
|
Void |
GetTotalTime( Void ) Issue a command to request the calculation of the total playback time of the specified MP3/MIDI input source.
|
Void |
GetVolume( Void ) Get the volume for the current playback device and method.
|
static SFBSoundPlayerSmp |
NewInstance(
SFCErrorPtr exception = null
) Create a new SFBSoundPlayer instance.
|
static SFBSoundPlayerSmp |
NewInstance(
AEECLSID id
, SFCErrorPtr exception = null
) Create a new SFBSoundPlayer instance.
|
Void |
Pause( Void ) Issue a command to pause the current MIDI/MP3 playback.
|
Void |
Play( Void ) This function issues a command to play a MIDI/MP3/QCP audio from the input source
specified in the call to SFBSoundPlayer::Set().
|
Void |
RegisterNotify(
PFNSOUNDPLAYERSTATUS notify
, VoidPtr data = null
) Register the status event callback function.
|
SFCError |
ResetInfo( Void )
Reset the audio source of ISoundPlayer. The status of the function is returned immediately.
|
Void |
Resume( Void ) Issue a command to resume the current MIDI/MP3 playback.
|
Void |
Rewind(
UInt32 time
) Issue a command to rewind the current MIDI/MP3 playback.
|
Void |
Set(
AEESoundPlayerInput input
, VoidPtr data
) Free the memory associated with previous input data buffer,
if any, and sets the current input data buffer as the source of the MIDI/MP3/QCP audio.
|
Void |
Set(
AEESoundPlayerInput input
, SFXBufferPtr data
) Free the memory associated with previous input data buffer,
if any, and sets the current input data buffer as the source of the MIDI/MP3/QCP audio.
|
SFCError |
SetInfo(
AEESoundPlayerInfo* info
) Set or reset the audio source of ISoundPlayer.
The status of the function is returned immediately.
|
Void |
SetSoundDevice(
AEESoundDevice device
, AEESoundMuteCtl ear
, AEESoundMuteCtl mic
) Connect the device to a specific audio device.
|
Void |
SetStream(
SFBAStreamSmpConstRef s
)
Allow an SFBAStream Interface to be associated with an SFBSoundPlayer instance to allow audio source data to be streamed from SFBAStream (like file or socket).
|
SFCError |
SetStream(
SFXStorageConstRef storage
)
Allow an SFBAStream Interface to be associated with an SFBSoundPlayer instance to allow audio source data to be streamed from SFBAStream (like file or socket).
|
Void |
SetTempo(
UInt32 factor
) Issue a command to modify the playback tempo of the
current MIDI playback as a percentage of the normal playback tempo.
|
Void |
SetTune(
UInt08 step
) Issue a command to modify the tune (pitch level) of the current MIDI playback in half-step increments.
|
Void |
SetVolume(
UInt16 volume
) Set the volume for the current playback device.
|
Void |
Stop( Void ) Issue a command to stop the current MIDI/MP3/QCP playback.
|
Void |
UnregisterNotify( Void )
Unregister the status event callback function.
|
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.
|
[ public ] Void FastForward( UInt32 time // this function issues a command to fast-forward the current MIDI/MP3 playback );
[ public ] SFCError GetInfo( AEESoundPlayerInfo* info // audio source of SFBSoundPlayer );
[ public ] Void GetTotalTime(Void);
[ public ] Void GetVolume(Void);
[ public, static ] SFBSoundPlayerSmp NewInstance( SFCErrorPtr exception = null // Error );
[ public, static ] SFBSoundPlayerSmp NewInstance( AEECLSID id // Class ID SFCErrorPtr exception = null // Error );
[ public ] Void Pause(Void);
[ public ] Void Play(Void);
[ public ] Void RegisterNotify( PFNSOUNDPLAYERSTATUS notify // pointer to the user callback (null to deregister) VoidPtr data = null // user data for unique correlation/identification of the transaction. // this piece of information is not retrieved or processed by SFBSoundPlayer // and can be null if no identifying data is required. // this same data pointer is passed back to the client along with status callback to correlate the transactions );
[ public ] SFCError ResetInfo(Void);
Calling this function is as same as calling SFBSoundPlayer::SetInfo(null)
[ public ] Void Resume(Void);
[ public ] Void Rewind( UInt32 time // amount of time, in milliseconds, to rewind the current playback );
[ public ] Void Set( AEESoundPlayerInput input // source type of Data // the values below are supported: // SDT_FILE : The specified data is file name. // SDT_BUFFER : The specified data is unprocessed buffer VoidPtr data // pointer to the data of specified type );
[ public ] Void Set( AEESoundPlayerInput input // source type of Data // the values below are supported: // SDT_FILE : The specified data is file name. // SDT_BUFFER : The specified data is unprocessed buffer SFXBufferPtr data // pointer to the data of specified type, // if null, return null as user data );
[ public ] SFCError SetInfo( AEESoundPlayerInfo* info // audio source of SFBSoundPlayer );
[ public ] Void SetSoundDevice( AEESoundDevice device // audio device to be connected AEESoundMuteCtl ear // mute or unmute the ear piece AEESoundMuteCtl mic // mute or unmute the microphone );
[ public ] Void SetStream( SFBAStreamSmpConstRef s // SFBAStream class // pointer to the instance of SFBFile interface or SFBSocket class );
[ public ] SFCError SetStream( SFXStorageConstRef storage // storage class );
[ public ] Void SetTempo( UInt32 factor // this parameter is used to modify the playback tempo as a percentage of the normal playback tempo. // possibly, playback is not active or another command is active. // a dwTempoFactor of 50 means half of the normal playback tempo. // the maximum supported tempo factor is 500% or five times of the normal playback tempo. // the minimum tempo factor is 1% of the normal playback tempo. // the tempo factor is initially 100% when the SFBSoundPlayer::Play() function is called );
[ public ] Void SetTune( UInt08 step // this parameter is used to modify the tune of the playback in half-step increments. // 0 indicates normal playback. // -1 indicates 1 half-step lower than the normal playback. // +1 indicates 1 half-step higher than the normal playback. // -12 indicates 12 half-steps, or 1 octave lower than the normal playback. // +12 indicates 12 half-steps, or 1 octave higher than the normal playback );
[ public ] Void Stop(Void);
[ public ] Void UnregisterNotify(Void);
Calling this function is as same as calling SFBSoundPlayer::RegisterNotify( null , null )
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |