My Project
|
Audio Engine functions. More...
#include <ParaScriptingAudio1.h>
Static Public Member Functions | |
static bool | IsAudioEngineEnabled () |
-------------— Audio Engine Functions -------------— get is audio engine enabled | |
static void | EnableAudioEngine () |
enable Audio Engine | |
static void | DisableAudioEngine () |
disable Audio Engine | |
static void | SetVolume (float fVolume) |
Set the volume of all categories and all currently playing wave files. More... | |
static float | GetVolume () |
Get the volume of average if all categories. More... | |
static void | PauseCategory (const char *strCategoryName) |
pause certain category in Audio Engine More... | |
static void | ResumeCategory (const char *strCategoryName) |
resume certain category in Audio Engine More... | |
static void | StopCategory (const char *strCategoryName) |
stop certain category in Audio Engine More... | |
static void | EnableAudioBank (const char *strBankName) |
initialize the audio banks needed in Audio Engine This function is only for backward compatible, use LoadSoundBank(), LoadInMemoryWaveBank(), and LoadStreamWaveBank() instead. More... | |
static void | DisableAudioBank (const char *strBankName) |
clean up the audio banks needed in Audio Engine More... | |
static int | LoadSoundBank (const char *filename) |
Load a sound bank. More... | |
static int | UnLoadSoundBank (const char *filename) |
unload a sound bank | |
static int | LoadInMemoryWaveBank (const char *filename) |
Load an in memory wave bank. More... | |
static int | UnLoadInMemoryWaveBank (const char *filename) |
unload a wave bank | |
static int | LoadStreamWaveBank (const char *filename) |
Load an stream wave bank. More... | |
static int | UnLoadStreamWaveBank (const char *filename) |
unload a wave bank | |
static string | GetCurrentAudioBankName () |
get the current audio bank name More... | |
static void | SetAudioStereo () |
set listener's sound output format to stereo | |
static void | SetAudio5Point1 () |
set listener's sound output format to 5.1 sound | |
static int | GetAudioFormat () |
get listener's sound output format More... | |
static void | PlayBGMusic (const char *strBGMusicName) |
-------------— Background Functions -------------— play background music More... | |
static void | PauseBGMusic () |
pause background music More... | |
static void | ResumeBGMusic () |
resume background music More... | |
static void | StopBGMusic () |
stop background music More... | |
static bool | IsBGMusicEnabled () |
get is background music enabled | |
static void | EnableBGMusic () |
enable background music | |
static void | DisableBGMusic () |
disable background music | |
static float | GetBGMusicVolume () |
Get background music volume. More... | |
static void | SetBGMusicVolume (const float fVolume) |
set background music volume More... | |
static void | PlayDialog (const char *strDialogName, const char *strScript) |
-------------— Dialog Functions -------------— play dialog music More... | |
static void | SkipDialog () |
skip dialog music to the next marker | |
static void | PauseDialog () |
pause dialog music | |
static void | ResumeDialog () |
resume dialog music | |
static void | StopDialog () |
stop dialog music | |
static bool | IsDialogEnabled () |
get is dialog music enabled | |
static void | EnableDialog () |
enable dialog music | |
static void | DisableDialog () |
disable dialog music | |
static float | GetDialogVolume () |
get dialog volume More... | |
static void | SetDialogVolume (const float fVolume) |
set dialog volume More... | |
static void | PlayAmbientSound (const char *strAmbientSoundName) |
-------------— Ambient Sound Functions -------------— play ambient sound More... | |
static void | PauseAmbientSound (const char *strAmbientSoundName) |
pause ambient sound More... | |
static void | ResumeAmbientSound (const char *strAmbientSoundName) |
resume ambient sound More... | |
static void | StopAmbientSound (const char *strAmbientSoundName) |
stop ambient sound More... | |
static bool | IsAmbientSoundEnabled () |
get is ambient sound enabled | |
static void | EnableAmbientSound () |
enable ambient sound music | |
static void | DisableAmbientSound () |
disable ambient sound music | |
static float | GetAmbientSoundVolume () |
get ambient sound volume More... | |
static void | SetAmbientSoundVolume (const float fVolume) |
set ambient sound volume More... | |
static void | PlayUISound (const char *strUISoundName) |
-------------— UserInterface Sound Functions -------------— play UI sound More... | |
static float | GetUISoundVolume () |
get UI sound volume More... | |
static void | SetUISoundVolume (const float fVolume) |
set UI sound volume More... | |
static void | PlayStatic3DSound (const char *str3DSoundName, const char *assetName, float x, float y, float z) |
-------------— 3D Sound Functions -------------— play 3D sound in static position More... | |
static void | PauseStatic3DSound (const char *assetName) |
pause 3D sound in static position More... | |
static void | ResumeStatic3DSound (const char *assetName) |
Resume 3D sound in static position. More... | |
static void | StopStatic3DSound (const char *assetName) |
stop 3D sound in static position More... | |
static void | PlayDynamic3DSound (const char *str3DSoundName, const char *objectName) |
play 3D sound to dynamic object More... | |
static float | Get3DSoundVolume () |
get 3D sound volume More... | |
static void | Set3DSoundVolume (const float fVolume) |
set 3D sound volume More... | |
static void | PlayInteractiveSound (const char *strInteractiveSoundName) |
-------------— Interactive Sound Functions -------------— play Interactive sound More... | |
static float | GetInteractiveSoundVolume () |
get interactive sound volume More... | |
static void | SetInteractiveSoundVolume (const float fVolume) |
set interactive sound volume More... | |
static bool | PlayWaveFile (const char *szWavePath, int nLoopCount) |
Prepare and play a wave object from a standard PCM, XMA (Xbox 360) file. More... | |
static bool | PlayWaveFile1 (const char *szWavePath) |
static bool | StopWaveFile (const char *szWavePath, bool bImmediateStop) |
stop a wave file More... | |
static bool | StopWaveFile1 (const char *szWavePath) |
static bool | ReleaseWaveFile (const char *szWavePath) |
release a wave file More... | |
static const char * | GetRecordingDeviceEnum () |
enumerate the available recording devices in this machine. More... | |
static const char * | GetRecordingFormatEnum () |
enumerate the available recording formats on this machine. More... | |
static bool | SetRecordingOutput (const char *sOutputFile, int nDeviceIndex, int nWaveFormatIndex) |
set the recording output properties for recording with BeginRecording() and StopRecording() function. More... | |
static bool | BeginRecording () |
start recording to the current recording output | |
static bool | PauseOrResumeRecording (int nState) |
static bool | StopRecording () |
stop recording and save output to the current recording output | |
static bool | IsRecording () |
whether it is recording sound. More... | |
static bool | IsRecordingPaused () |
whether it is recording is paused. More... | |
static const char * | GetLastRecordedData (int nTimeLength) |
try return a snapshot of the recorded wave data in the last nTimeLength time. More... | |
static bool | IsAudioEngineEnabled () |
-------------— Audio Engine Functions -------------— get is audio engine enabled | |
static void | EnableAudioEngine (bool bEnable) |
enable Audio Engine | |
static void | SetVolume (float fVolume) |
Set the volume of all categories and all currently playing wave files. More... | |
static float | GetVolume () |
Get the volume of average if all categories. More... | |
static ParaAudioSource | Create (const char *sName, const char *sWavePath, bool bStream) |
create a given audio source by name. More... | |
static ParaAudioSource | Get (const char *sName) |
get audio source by name. More... | |
static ParaAudioSource | CreateGet (const char *sName, const char *sWavePath, bool bStream) |
get a given audio source by name. More... | |
static void | SetDistanceModel (int eDistModel) |
set the audio distance model. More... | |
static bool | PlayWaveFile (const char *szWavePath, int nLoop) |
Prepare and play a wave object from a standard wave file (wav, mp3, ogg/vorbis). More... | |
static bool | PlayWaveFile1 (const char *szWavePath) |
static int | PlayMidiMsg (DWORD dwMsg) |
more information, please see: midiOutShortMsg More... | |
static bool | StopWaveFile (const char *szWavePath, bool bImmediateStop) |
stop a wave file More... | |
static bool | StopWaveFile1 (const char *szWavePath) |
static bool | ReleaseWaveFile (const char *szWavePath) |
release a wave file More... | |
Audio Engine functions.
|
static |
create a given audio source by name.
If no audio source with the name is loaded before, we will create one new; otherwise we will overwrite the previous one.
sName | the audio source name. Usually same as the audio file path, however it can be any string. |
sWavePath | if NULL, it will defaults to sName. Please note, in order to play the same music at the same time, they must be created with different names. |
bStream | whether to stream the music once created. |
|
static |
get a given audio source by name.
If no audio source with the name is loaded before, we will create one.
sName | the audio source name. Usually same as the audio file path, however it can be any string. |
sWavePath | if NULL, it will defaults to sName. Please note, in order to play the same music at the same time, they must be created with different names. |
bStream | whether to stream the music once created. |
|
static |
clean up the audio banks needed in Audio Engine
strBankName | sound and wave bank name |
|
static |
initialize the audio banks needed in Audio Engine This function is only for backward compatible, use LoadSoundBank(), LoadInMemoryWaveBank(), and LoadStreamWaveBank() instead.
strBankName | sound and wave bank name. If the name is Name, then the following files are loaded automatically. in memory wave bank: "audio/Name/Name-InMemory.xwb" stream wave bank: "audio/Name/Name-Stream.xwb" sound bank: "audio/Name/Haqi.xsb" |
|
static |
get audio source by name.
The source should be created by Create() function.
|
static |
get 3D sound volume
fVolume | 3D sound volume |
|
static |
get ambient sound volume
fVolume | ambient sound volume |
|
static |
get listener's sound output format
|
static |
Get background music volume.
fVolume | background music volume |
|
static |
get the current audio bank name
|
static |
get dialog volume
fVolume | dialog volume |
|
static |
get interactive sound volume
fVolume | interactive sound volume |
|
static |
try return a snapshot of the recorded wave data in the last nTimeLength time.
just turn the music to strings to be displayed by the GUI.
|
static |
enumerate the available recording devices in this machine.
returned as strings separated by ';' this function is not thread safe
|
static |
enumerate the available recording formats on this machine.
returned as strings separated by ';' this function is not thread safe
|
static |
get UI sound volume
fVolume | UI sound volume |
|
static |
Get the volume of average if all categories.
|
static |
Get the volume of average if all categories.
|
static |
whether it is recording sound.
|
static |
whether it is recording is paused.
|
static |
Load an in memory wave bank.
note: Currently only one can be loaded at a time, future version may support many.
filename | the logical "*-InMemory.xwb". It can be an asset file. such as "audio/name/name-InMemory.xwb" |
|
static |
Load a sound bank.
note: Currently only one can be loaded at a time, future version may support many.
filename | the logical *.xsb sound bank file path. It can be an asset file. such as "audio/name/name.xsb" |
|
static |
Load an stream wave bank.
note: Currently only one can be loaded at a time, future version may support many.
filename | the logical "*-Stream.xwb". It can be an asset file. such as "audio/name/name-Stream.xwb" |
|
static |
pause ambient sound
strAmbientSoundName | ambient sound name |
|
static |
pause background music
strBGMusicName | background music name |
|
static |
pause certain category in Audio Engine
strCategoryName | category name |
|
static |
nState | 0 for toggle pause and resume. -1 for pause, 1 for resume. |
|
static |
pause 3D sound in static position
assetName | 3D sound asset name, this is the KEY to the 3D Sound |
|
static |
-------------— Ambient Sound Functions -------------— play ambient sound
strAmbientSoundName | ambient sound name |
|
static |
-------------— Background Functions -------------— play background music
strBGMusicName | background music name |
|
static |
-------------— Dialog Functions -------------— play dialog music
strDialogName | dialog music name |
|
static |
play 3D sound to dynamic object
str3DSoundName | 3D sound name |
objectName | 3D sound object name, this is the KEY to the 3D Sound this is the name of the base class BaseObject |
|
static |
-------------— Interactive Sound Functions -------------— play Interactive sound
strInteractiveSoundName | interactive sound name NOTE: Interactive sound is now behave like UI sound, and it don't promise Zero-Latency |
|
static |
more information, please see: midiOutShortMsg
dwMsg | MIDI message. The message is packed into a DWORD value with the first byte of the message in the low-order byte. The message is packed into this parameter as follows. |
|
static |
-------------— 3D Sound Functions -------------— play 3D sound in static position
str3DSoundName | 3D sound name |
assetName | 3D sound asset name, this is the KEY to the 3D Sound |
x,y,z | 3D sound position |
|
static |
-------------— UserInterface Sound Functions -------------— play UI sound
strUISoundName | UI sound name |
|
static |
Prepare and play a wave object from a standard PCM, XMA (Xbox 360) file.
If a wave file is already prepared before. It will be reused.
szWavePath | Path to the wave file. |
nLoopCount | Number of times to loop this file. If there is no loop region, but the loop count is nonzero, the entire wave is looped. |
|
static |
Prepare and play a wave object from a standard wave file (wav, mp3, ogg/vorbis).
If a wave file is already prepared before. It will be reused.
szWavePath | Path to the wave file. It can be from asset_manifest or relative to current directory path. |
nLoop | 0 means non-looping. 1 means looping. |
|
static |
release a wave file
szWavePath | Path to the wave file. |
|
static |
release a wave file
szWavePath | Path to the wave file. |
|
static |
resume ambient sound
strAmbientSoundName | ambient sound name |
|
static |
resume background music
strBGMusicName | background music name |
|
static |
resume certain category in Audio Engine
strCategoryName | category name |
|
static |
Resume 3D sound in static position.
assetName | 3D sound asset name, this is the KEY to the 3D Sound |
|
static |
set 3D sound volume
fVolume | 3D sound volume |
|
static |
set ambient sound volume
fVolume | ambient sound volume |
|
static |
set background music volume
fVolume | background music volume |
|
static |
set dialog volume
fVolume | dialog volume |
|
static |
set the audio distance model.
see: http://connect.creativelabs.com/openal/Documentation/OpenAL%201.1%20Specification.htm
eDistModel | int of following. enum ParaAudioDistanceModelEnum { Audio_DistModel_NONE = 0, Audio_DistModel_INVERSE_DISTANCE, Audio_DistModel_INVERSE_DISTANCE_CLAMPED, Audio_DistModel_LINEAR_DISTANCE, Audio_DistModel_LINEAR_DISTANCE_CLAMPED, Audio_DistModel_EXPONENT_DISTANCE, Audio_DistModel_EXPONENT_DISTANCE_CLAMPED, }; |
|
static |
set interactive sound volume
fVolume | interactive sound volume |
|
static |
set the recording output properties for recording with BeginRecording() and StopRecording() function.
sOutputFile | the output file. it can be nil. Default is "temp/soundcapture.wav", |
nDeviceIndex | -1 to use the current one. or it should be a valid index as in GetRecordingDeviceEnum(); |
nWaveFormatIndex | -1 to use the current one. or it should be a valid index as in GetRecordingFormatEnum(); |
|
static |
set UI sound volume
fVolume | UI sound volume |
|
static |
Set the volume of all categories and all currently playing wave files.
fVolume | usually between [0,1], where 0 is silent and 1 is full. value larger than 1 is also possible. |
|
static |
Set the volume of all categories and all currently playing wave files.
fVolume | usually between [0,1], where 0 is silent and 1 is full. value larger than 1 is also possible. |
|
static |
stop ambient sound
strAmbientSoundName | ambient sound name |
|
static |
stop background music
strBGMusicName | background music name |
|
static |
stop certain category in Audio Engine
strCategoryName | category name |
|
static |
stop 3D sound in static position
assetName | 3D sound asset name, this is the KEY to the 3D Sound |
|
static |
stop a wave file
szWavePath | Path to the wave file. |
bImmediateStop | if false, it plays the wave to completion, then stops. For looping waves, this flag plays the current iteration to completion, then stops (ignoring any subsequent iterations). In either case, any release (or tail) is played. To stop the wave immediately, use true. |
|
static |
stop a wave file
szWavePath | Path to the wave file. |
bImmediateStop | if false, it plays the wave to completion, then stops. For looping waves, this flag plays the current iteration to completion, then stops (ignoring any subsequent iterations). In either case, any release (or tail) is played. To stop the wave immediately, use true. |