-
首页
-
C4D R23.110 C++ SDK
SoundEffectorData Class Reference
#include <customgui_soundeffector.h>
详细描述
Sound effector data type (
CUSTOMDATATYPE_SOUNDEFFECTOR
) for
SoundEffectorCustomGui
.
-
注意
-
Has to be created with
Alloc()
and destroyed with
Free()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
-
由于
-
R19
Sample
|
Bool
|
Sample
(
Int
index,
Int
count,
Float
&value,
向量
&color)
|
Bool
|
SampleArray
(
Int
offset,
Int
count,
Int
totalCount,
Float
*values,
向量
*colors)
|
Bool
|
SampleArray
(
Int
offset,
Int
count,
Int
totalCount,
Float
*values,
向量
*colors) const
|
构造函数 & 析构函数文档编制
◆
SoundEffectorData()
◆
~SoundEffectorData()
成员函数文档编制
◆
Alloc()
Allocates a
SoundEffectorData
. Destroy the allocated
SoundEffectorData
with
Free()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
-
返回
-
The allocated sound effector data, or
nullptr
if the allocation failed.
◆
Free()
Destructs SoundEffectorDatas allocated with
Alloc()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
-
参数
-
[in,out]
|
pData
|
The sound effector data to destruct. If the pointer is
nullptr
nothing happens. The pointer is assigned
nullptr
afterwards.
|
◆
InitSampling()
Initializes the sampling functionality of the sound effector data.
-
警告
-
Must be called before either
Sample()
of
SampleArray()
函数。
FreeSampling()
must be invoked afterwards.
-
参数
-
-
返回
-
true
if successful, otherwise
false
.
◆
FreeSampling()
Frees the memory used for sampling.
-
警告
-
Must be invoked after
InitSampling()
has been called.
-
返回
-
true
if successful, otherwise
false
.
◆
CopyTo()
Copies the sound effector data values into the destination sound effector data.
-
参数
-
[in]
|
pDest
|
The destination sound effector data data. The caller owns the pointed
SoundEffectorData
..
|
-
返回
-
true
if successful, otherwise
false
.
◆
Sample()
Samples the sound file using the probes.
-
参数
-
[in]
|
index
|
The index of the element to sample.
|
[in]
|
count
|
The number of elements in the array being sampled.
|
[out]
|
value
|
The output value.
|
[out]
|
color
|
The output color.
|
-
返回
-
true
if successful, otherwise
false
.
◆
SampleArray()
[1/2]
Samples a subset portion or whole array of elements simultaneously.
-
参数
-
[in]
|
offset
|
The offset from the start of the array that sampling start at.
|
[in]
|
count
|
The number of elements in this subset.
|
[in]
|
totalCount
|
The total number of elements being sampled.
|
[out]
|
values
|
The values, should be the same size as
count
.
|
[out]
|
colors
|
The colors, should be the same size as
count
.
|
-
返回
-
true
if successful, otherwise
false
.
◆
SampleArray()
[2/2]
Samples a subset portion or whole array of elements simultaneously (const version).
-
参数
-
[in]
|
offset
|
The offset from the start of the array that sampling start at.
|
[in]
|
count
|
The number of elements in this subset.
|
[in]
|
totalCount
|
The total number of elements being sampled.
|
[out]
|
values
|
The values, should be the same size as
count
.
|
[out]
|
colors
|
The colors, should be the same size as
count
.
|
-
返回
-
true
if successful, otherwise
false
.
◆
CreateProbe()
Creates a probe.
-
参数
-
[in]
|
left
|
The left side of the probe in Hertz
[1...22050].
|
[in]
|
right
|
The right side of the probe in Hertz
[1...22050].
|
[in]
|
top
|
The top edge of the probe in the range
[0...1].
|
[in]
|
bottom
|
The bottom edge of the probe in the range
[0...1].
|
[in]
|
selected
|
pass
true
to select the created probe (other probes are not deselected in the operation).
|
-
返回
-
The created probe's index.
◆
CreateDefaultProbe()
Bool
CreateDefaultProbe
|
(
|
|
)
|
|
Create default probe
-
返回
-
true
if successful, otherwise
false
.
◆
GetProbeCount()
Int
GetProbeCount
|
(
|
|
)
|
const
|
Retrieves the number of probes owned by the sound effector data.
-
返回
-
The probe count.
◆
GetProbe()
Retrieves the probe at the specified
index
.
-
参数
-
[in]
|
index
|
The probe index.
|
-
返回
-
The probe, or
nullptr
if the function fails. The
SoundEffectorData
owns the pointed probe.
◆
DeleteProbe()
Deletes the probe at the specified
index
.
-
参数
-
[in]
|
index
|
The index of the probe to delete.
|
-
返回
-
true
if successful, otherwise
false
.
◆
UpdateProbeOrder()
void UpdateProbeOrder
|
(
|
|
)
|
|
Updates the probes.
-
注意
-
Must be called after adjusting any probes left or right values to update the order that the probes are calculated in.
◆
GetRange()
Retrieves the range of the sound effector data.
-
警告
-
Only valid if the sound effector data is shown in the sound data GUI.
-
参数
-
[out]
|
xmin
|
Assigned the minimum X value.
|
[out]
|
xmax
|
Assigned the maximum X value.
|
[out]
|
ymin
|
Assigned the minimum Y value.
|
[out]
|
ymax
|
Assigned the maximum Y value.
|
◆
SetRange()
Sets the range of the sound effector data.
-
警告
-
Only valid if the sound effector data is shown in the sound data GUI.
-
参数
-
[in]
|
xmin
|
The minimum X value.
|
[in]
|
xmax
|
The maximum X value.
|
[in]
|
ymin
|
The minimum Y value.
|
[in]
|
ymax
|
The maximum Y value.
|
◆
GetLinLog()
Float
GetLinLog
|
(
|
|
)
|
const
|
Retrieves the blend value for the linear/logarithmic slider.
-
返回
-
The blend percentage:
0%
= linear,
100%
= log10.
◆
SetLinLog()
void SetLinLog
|
(
|
Float
|
value
|
)
|
|
Sets the the blend value for the linear/logarithmic slider.
-
参数
-
[in]
|
value
|
The blend percentage to set:
0%
= linear,
100%
= log10.
|
◆
GetFreeze()
Retrieves the freeze state.
-
返回
-
true
if freeze is enabled, otherwise
false
.
◆
SetFreeze()
void SetFreeze
|
(
|
Bool
|
freeze
|
)
|
|
Sets the freeze state.
-
参数
-
[in]
|
freeze
|
true
to enable freeze, otherwise
false
.
|
◆
GetGradient()
渐变
* GetGradient
|
(
|
|
)
|
const
|
Retrieves the global gradient.
-
返回
-
The global gradient, or
nullptr
if the function fails. The
SoundEffectorData
owns the pointed gradient.
◆
GetGradientDirection()
Int32
GetGradientDirection
|
(
|
|
)
|
const
|
Retrieves the global gradient direction.
-
返回
-
The global gradient direction:
0
for vertical (volume),
1
for horizontal (frequency).
◆
SetGradientDirection()
void SetGradientDirection
|
(
|
Int32
|
direction
|
)
|
|
Sets the global gradient direction.
-
参数
-
[in]
|
direction
|
The global gradient direction to set:
0
for vertical (volume),
1
for horizontal (frequency).
|
◆
IsFFTSamplingCacheDirty()
Check if an FFT Cache is currently up to date.
-
参数
-
-
返回
-
true
if successful, otherwise
false
.
◆
SetActiveSoundTrack()
Sets the active sound track
-
参数
-
[in]
|
track
|
Sound track.
|
[in]
|
doc
|
The document.
|
-
返回
-
true
if successful, otherwise
false
.
◆
GetActiveSoundTrack()
Retrieves the active sound track.
-
参数
-
-
返回
-
The active sound track, or
nullptr
if the function fails. The
SoundEffectorData
owns the pointed
CTrack
.