![]() |
CriWare Unreal Engine
Plug-ins for CriWare solutions.
|
In this article, we will introduce how to start playing audio at the player's arbitrary timing.
Gets the AtomComponent that controls audio playback processing.
There are roughly two ways to obtain it.
Before starting playback, you need to set the sound Cue (UAtomSoundCue) to be played.
There is also a method for setting from the editor's outer screen (./Tutorials/ADX/PlaySounds/PlaySounds.INT.udn), but
This time I will introduce how to set it on BP.
The sound Cue passed to the UAtomComponent::SetSound() function argument is set for playback.
To obtain a sound Cue, you can obtain it from the following API of sound Cue Sheet (UAtomCueSheet) .
Additionally, the currently set sound Cue can be obtained by referencing the UAtomComponent::Sound variable.
Make sure that the obtained sound Cue is valid (non-NULL) before starting playback.
Playback is started by calling the UAtomComponent::Play() function.
You can check whether it is being played using the following method.
We have described a Sample implementation that starts playback if the audio is Stop at the timing you press the space Key , and starts Stop if the audio is playing.
THIS SERVICE MAY CONTAIN TRANSLATIONS POWERED BY GOOGLE. GOOGLE DISCLAIMS ALL WARRANTIES RELATED TO THE TRANSLATIONS, EXPRESS OR IMPLIED, INCLUDING ANY WARRANTIES OF ACCURACY, RELIABILITY, AND ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.