nn::snd::CTR::Voice Classclass Voice
A class used to control Voice objects.
Use this to control valid voice objects obtained with the nn::snd::CTR::AllocVoice function. Behavior is not guaranteed if you attempt to control any other voice object.
Since not all of the functions that control Voice objects are thread-safe, exclusive control is necessary using functions like nn::os::CriticalSection when calling those functions in threads other than threads (sound threads) that are calling the nn::snd::CTR::WaitForDspSync and nn::snd::CTR::SendParameterToDsp functions. However, the nn::snd::CTR::AllocVoice and nn::snd::CTR::FreeVoice functions are thread-safe and can be called safely outside of sound threads.
State
|
Enumerated type that indicates the voice states. |
|---|
| Adding Buffers | ||
|---|---|---|
AppendWaveBuffer
|
Appends sample data information corresponding to a voice. | |
| Setting Parameters | ||
SetChannelCount
|
Sets the number of voice channels. | |
SetSampleFormat
|
Sets the format of the samples to link to a voice. | |
SetFrontBypassFlag
|
Sets whether to bypass the front channels when 3D surround sound is enabled. | |
SetStartFrameFadeInFlag
|
Specifies whether to use a short fade-in starting at volume 0 when playback starts. | |
SetSampleRate
|
Sets the sampling rate of a voice. | |
SetPitch
|
Sets the pitch of a voice. | |
SetAdpcmParam
|
Sets ADPCM coefficients. | |
SetPriority
|
Sets the priority of a voice. | |
SetState
|
Sets the current state of a voice. | |
SetMixParam
|
Sets the gain for each voice channel. | |
SetVolume
|
Sets the volume of a voice. | |
SetInterpolationType
|
Sets the interpolation method of a voice. | |
SetFilterType
|
Sets the filter type. | |
| EnableMonoFilter | Enables/disables the monopole filter. | |
SetMonoFilterCoefficients
|
Sets the coefficients for a monopole filter. | |
| EnableBiquadFilter | Enables/disables the biquad filter. | |
SetBiquadFilterCoefficients
|
Sets the coefficients for a biquad filter. | |
| Get parameters | ||
GetPitch
|
Gets the pitch of a voice. | |
GetPriority
|
Gets the priority of a voice. | |
GetState
|
Gets the state of a voice. | |
GetMixParam
|
Gets the gain for each voice channel. | |
GetVolume
|
Gets the volume of a voice. | |
GetInterpolationType
|
Gets the interpolation method of a voice. | |
GetFilterType
|
Gets the usage status of a filter. | |
GetMonoFilterCoefficients
|
Gets the coefficients for a monopole filter. | |
GetBiquadFilterCoefficients
|
Gets the coefficients for a biquad filter. | |
| Getting the Playback Status | ||
GetPlayPosition
|
Gets the playback position within the buffer that is currently in use. | |
IsPlaying
|
Gets the playback state of a voice. | |
| Bcwav-related | ||
SetupBcwav
|
Parses a BCWAV file and prepares for playback. | |
CONFIDENTIAL