CRI ADX
Last Updated: 2024-07-17 10:48 p
|
结构体 | |
struct | CriAtomExFaderConfigTag |
Configuration structure used to attach a fader 更多... | |
宏定义 | |
#define | CRIATOMEX_IGNORE_FADE_OUT (-1) |
Value used to disable the fade-out process 更多... | |
#define | criAtomExFader_SetDefaultConfig(p_config) |
Assign the default values to the configuration structure used to attach a Fader 更多... | |
类型定义 | |
typedef struct CriAtomExFaderConfigTag | CriAtomExFaderConfig |
Configuration structure used to attach a fader 更多... | |
函数 | |
CriSint32 | criAtomExPlayer_CalculateWorkSizeForFader (const CriAtomExFaderConfig *config) |
Calculate the size of the work buffer required to attach a fader 更多... | |
void | criAtomExPlayer_AttachFader (CriAtomExPlayerHn player, const CriAtomExFaderConfig *config, void *work, CriSint32 work_size) |
Attach a fader to a player 更多... | |
void | criAtomExPlayer_DetachFader (CriAtomExPlayerHn player) |
Detach a fader from a player 更多... | |
void | criAtomExPlayer_SetFadeOutTime (CriAtomExPlayerHn player, CriSint32 ms) |
Set the fade-out time 更多... | |
CriSint32 | criAtomExPlayer_GetFadeOutTime (CriAtomExPlayerHn player) |
Get the fade-out time 更多... | |
void | criAtomExPlayer_SetFadeInTime (CriAtomExPlayerHn player, CriSint32 ms) |
Set the fade-in time 更多... | |
CriSint32 | criAtomExPlayer_GetFadeInTime (CriAtomExPlayerHn player) |
Get the fade-in time 更多... | |
void | criAtomExPlayer_SetFadeInStartOffset (CriAtomExPlayerHn player, CriSint32 ms) |
Set the fade-in start offset 更多... | |
CriSint32 | criAtomExPlayer_GetFadeInStartOffset (CriAtomExPlayerHn player) |
Get the fade-in start offset 更多... | |
void | criAtomExPlayer_SetFadeOutEndDelay (CriAtomExPlayerHn player, CriSint32 ms) |
Set the delay time after the fade-out 更多... | |
CriSint32 | criAtomExPlayer_GetFadeOutEndDelay (CriAtomExPlayerHn player) |
Get the delay time after the fade-out 更多... | |
CriBool | criAtomExPlayer_IsFading (CriAtomExPlayerHn player) |
Check whether fading is in process or not 更多... | |
void | criAtomExPlayer_ResetFaderParameters (CriAtomExPlayerHn player) |
Initialize the fader parameters 更多... | |
#define CRIATOMEX_IGNORE_FADE_OUT (-1) |
Value used to disable the fade-out process
#define criAtomExFader_SetDefaultConfig | ( | p_config | ) |
Assign the default values to the configuration structure used to attach a Fader
[out] | p_config | pointer to the configuration structure used to attach a Fader |
typedef struct CriAtomExFaderConfigTag CriAtomExFaderConfig |
Configuration structure used to attach a fader
CriSint32 criAtomExPlayer_CalculateWorkSizeForFader | ( | const CriAtomExFaderConfig * | config | ) |
Calculate the size of the work buffer required to attach a fader
[in] | config | configuration structure used to attach a fader |
>= | 0 successfully completed |
-1 | error occurred |
void criAtomExPlayer_AttachFader | ( | CriAtomExPlayerHn | player, |
const CriAtomExFaderConfig * | config, | ||
void * | work, | ||
CriSint32 | work_size | ||
) |
Attach a fader to a player
[in] | player | AtomEx player |
[in] | config | configuration structure used to attach a fader |
[in] | work | work buffer |
[in] | work_size | work buffer size |
When criAtomExPlayer_Stop is called, the following happens:
When attaching a fader to a player, you must pass a memory buffer.
The size of the work buffer required is calculated with the criAtomExPlayer_CalculateWorkSizeForFader function.
(If a user-allocator has already been registered by using the criAtomEx_SetUserAllocator macro, you do not need to pass a work buffer to this function.)
If the function fails to attach a fader, an error callback will occur.
To know the reason of the failure, refer to the error callback message.
(If you use the criAtomExPlayer_Prepare function instead of the criAtomExPlayer_Start function, the above happens when the pause is canceled.)
void criAtomExPlayer_DetachFader | ( | CriAtomExPlayerHn | player | ) |
Detach a fader from a player
[in] | player | AtomEx player |
void criAtomExPlayer_SetFadeOutTime | ( | CriAtomExPlayerHn | player, |
CriSint32 | ms | ||
) |
Set the fade-out time
[in] | player | AtomEx player handle |
[in] | ms | fade-out time (in milliseconds) |
The volume control for fade-out is performed before the audio playback is stopped.
Therefore, the release time of an envelope specified in a waveform data in advance is ignored.
(Strictly speaking, the release process of the envelope is applied after the volume is 0.)
Depending on whether the second argument (ms) is set to 0 or CRIATOMEX_IGNORE_FADE_OUT , the behavior of the function is different:
If, when the playback is stopped, you want to enable the release process of the envelope (as specified for the waveform beforehand, without performing the fade-out process) specify CRIATOMEX_IGNORE_FADE_OUT for the second argument (ms).
Specifying CRIATOMEX_IGNORE_FADE_OUT disables volume control by the fade-out process. After the criAtomExPlayer_Stop function is called, the standard stopping process is performed (after the delay time has passed).
(If the release of the envelope has been set in the waveform data, a release process will be performed.)
CriSint32 criAtomExPlayer_GetFadeOutTime | ( | CriAtomExPlayerHn | player | ) |
Get the fade-out time
[in] | player | AtomEx player handle |
void criAtomExPlayer_SetFadeInTime | ( | CriAtomExPlayerHn | player, |
CriSint32 | ms | ||
) |
Set the fade-in time
[in] | player | AtomEx player handle |
[in] | ms | fade-in time (in milliseconds) |
CriSint32 criAtomExPlayer_GetFadeInTime | ( | CriAtomExPlayerHn | player | ) |
Get the fade-in time
[in] | player | AtomEx player handle |
void criAtomExPlayer_SetFadeInStartOffset | ( | CriAtomExPlayerHn | player, |
CriSint32 | ms | ||
) |
Set the fade-in start offset
[in] | player | AtomEx player handle |
[in] | ms | fade-in start offset (in milliseconds) |
CriSint32 criAtomExPlayer_GetFadeInStartOffset | ( | CriAtomExPlayerHn | player | ) |
Get the fade-in start offset
[in] | player | AtomEx player handle |
void criAtomExPlayer_SetFadeOutEndDelay | ( | CriAtomExPlayerHn | player, |
CriSint32 | ms | ||
) |
Set the delay time after the fade-out
[in] | player | AtomEx player handle |
[in] | ms | delay time after fade-out (in milliseconds) |
CriSint32 criAtomExPlayer_GetFadeOutEndDelay | ( | CriAtomExPlayerHn | player | ) |
Get the delay time after the fade-out
[in] | player | AtomEx player handle |
CriBool criAtomExPlayer_IsFading | ( | CriAtomExPlayerHn | player | ) |
Check whether fading is in process or not
[in] | player | AtomEx player handle |
void criAtomExPlayer_ResetFaderParameters | ( | CriAtomExPlayerHn | player | ) |
Initialize the fader parameters
[in] | player | AtomEx player handle |