mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
1174 lines
45 KiB
C#
1174 lines
45 KiB
C#
// <auto-generated/>
|
|
// Generated by Brutal.Fmod.Generate; do not edit by hand.
|
|
#nullable enable
|
|
|
|
namespace Brutal.FmodApi
|
|
{
|
|
public static partial class Fmod
|
|
{
|
|
/// Channel::getSystemObject
|
|
public static unsafe Result TryGetSystemObject(this Channel channel, out FmodSystem system)
|
|
{
|
|
fixed (FmodSystem* systemPtr = &system)
|
|
return PInvoke.ChannelGetSystemObject(channel, systemPtr);
|
|
}
|
|
|
|
/// Channel::getSystemObject
|
|
public static FmodSystem GetSystemObject(this Channel channel)
|
|
{
|
|
TryGetSystemObject(channel, out var system).Check();
|
|
return system;
|
|
}
|
|
|
|
/// Channel::stop
|
|
public static Result TryStop(this Channel channel) => PInvoke.ChannelStop(channel);
|
|
|
|
/// Channel::stop
|
|
public static void Stop(this Channel channel) => TryStop(channel).Check();
|
|
|
|
/// Channel::setPaused
|
|
public static Result TrySetPaused(this Channel channel, Bool32 paused) =>
|
|
PInvoke.ChannelSetPaused(channel, paused);
|
|
|
|
/// Channel::setPaused
|
|
public static void SetPaused(this Channel channel, Bool32 paused) => TrySetPaused(channel, paused).Check();
|
|
|
|
/// Channel::getPaused
|
|
public static unsafe Result TryGetPaused(this Channel channel, out Bool32 paused)
|
|
{
|
|
fixed (Bool32* pausedPtr = &paused)
|
|
return PInvoke.ChannelGetPaused(channel, pausedPtr);
|
|
}
|
|
|
|
/// Channel::getPaused
|
|
public static Bool32 GetPaused(this Channel channel)
|
|
{
|
|
TryGetPaused(channel, out var paused).Check();
|
|
return paused;
|
|
}
|
|
|
|
/// Channel::setVolume
|
|
public static Result TrySetVolume(this Channel channel, float volume) =>
|
|
PInvoke.ChannelSetVolume(channel, volume);
|
|
|
|
/// Channel::setVolume
|
|
public static void SetVolume(this Channel channel, float volume) => TrySetVolume(channel, volume).Check();
|
|
|
|
/// Channel::getVolume
|
|
public static unsafe Result TryGetVolume(this Channel channel, out float volume)
|
|
{
|
|
fixed (float* volumePtr = &volume)
|
|
return PInvoke.ChannelGetVolume(channel, volumePtr);
|
|
}
|
|
|
|
/// Channel::getVolume
|
|
public static float GetVolume(this Channel channel)
|
|
{
|
|
TryGetVolume(channel, out var volume).Check();
|
|
return volume;
|
|
}
|
|
|
|
/// Channel::setVolumeRamp
|
|
public static Result TrySetVolumeRamp(this Channel channel, Bool32 ramp) =>
|
|
PInvoke.ChannelSetVolumeRamp(channel, ramp);
|
|
|
|
/// Channel::setVolumeRamp
|
|
public static void SetVolumeRamp(this Channel channel, Bool32 ramp) => TrySetVolumeRamp(channel, ramp).Check();
|
|
|
|
/// Channel::getVolumeRamp
|
|
public static unsafe Result TryGetVolumeRamp(this Channel channel, out Bool32 ramp)
|
|
{
|
|
fixed (Bool32* rampPtr = &ramp)
|
|
return PInvoke.ChannelGetVolumeRamp(channel, rampPtr);
|
|
}
|
|
|
|
/// Channel::getVolumeRamp
|
|
public static Bool32 GetVolumeRamp(this Channel channel)
|
|
{
|
|
TryGetVolumeRamp(channel, out var ramp).Check();
|
|
return ramp;
|
|
}
|
|
|
|
/// Channel::getAudibility
|
|
public static unsafe Result TryGetAudibility(this Channel channel, out float audibility)
|
|
{
|
|
fixed (float* audibilityPtr = &audibility)
|
|
return PInvoke.ChannelGetAudibility(channel, audibilityPtr);
|
|
}
|
|
|
|
/// Channel::getAudibility
|
|
public static float GetAudibility(this Channel channel)
|
|
{
|
|
TryGetAudibility(channel, out var audibility).Check();
|
|
return audibility;
|
|
}
|
|
|
|
/// Channel::setPitch
|
|
public static Result TrySetPitch(this Channel channel, float pitch) => PInvoke.ChannelSetPitch(channel, pitch);
|
|
|
|
/// Channel::setPitch
|
|
public static void SetPitch(this Channel channel, float pitch) => TrySetPitch(channel, pitch).Check();
|
|
|
|
/// Channel::getPitch
|
|
public static unsafe Result TryGetPitch(this Channel channel, out float pitch)
|
|
{
|
|
fixed (float* pitchPtr = &pitch)
|
|
return PInvoke.ChannelGetPitch(channel, pitchPtr);
|
|
}
|
|
|
|
/// Channel::getPitch
|
|
public static float GetPitch(this Channel channel)
|
|
{
|
|
TryGetPitch(channel, out var pitch).Check();
|
|
return pitch;
|
|
}
|
|
|
|
/// Channel::setMute
|
|
public static Result TrySetMute(this Channel channel, Bool32 mute) => PInvoke.ChannelSetMute(channel, mute);
|
|
|
|
/// Channel::setMute
|
|
public static void SetMute(this Channel channel, Bool32 mute) => TrySetMute(channel, mute).Check();
|
|
|
|
/// Channel::getMute
|
|
public static unsafe Result TryGetMute(this Channel channel, out Bool32 mute)
|
|
{
|
|
fixed (Bool32* mutePtr = &mute)
|
|
return PInvoke.ChannelGetMute(channel, mutePtr);
|
|
}
|
|
|
|
/// Channel::getMute
|
|
public static Bool32 GetMute(this Channel channel)
|
|
{
|
|
TryGetMute(channel, out var mute).Check();
|
|
return mute;
|
|
}
|
|
|
|
/// Channel::setReverbProperties
|
|
public static Result TrySetReverbProperties(this Channel channel, int instance, float wet) =>
|
|
PInvoke.ChannelSetReverbProperties(channel, instance, wet);
|
|
|
|
/// Channel::setReverbProperties
|
|
public static void SetReverbProperties(this Channel channel, int instance, float wet) =>
|
|
TrySetReverbProperties(channel, instance, wet).Check();
|
|
|
|
/// Channel::getReverbProperties
|
|
public static unsafe Result TryGetReverbProperties(this Channel channel, int instance, out float wet)
|
|
{
|
|
fixed (float* wetPtr = &wet)
|
|
return PInvoke.ChannelGetReverbProperties(channel, instance, wetPtr);
|
|
}
|
|
|
|
/// Channel::getReverbProperties
|
|
public static float GetReverbProperties(this Channel channel, int instance)
|
|
{
|
|
TryGetReverbProperties(channel, instance, out var wet).Check();
|
|
return wet;
|
|
}
|
|
|
|
/// Channel::setLowPassGain
|
|
public static Result TrySetLowPassGain(this Channel channel, float gain) =>
|
|
PInvoke.ChannelSetLowPassGain(channel, gain);
|
|
|
|
/// Channel::setLowPassGain
|
|
public static void SetLowPassGain(this Channel channel, float gain) => TrySetLowPassGain(channel, gain).Check();
|
|
|
|
/// Channel::getLowPassGain
|
|
public static unsafe Result TryGetLowPassGain(this Channel channel, out float gain)
|
|
{
|
|
fixed (float* gainPtr = &gain)
|
|
return PInvoke.ChannelGetLowPassGain(channel, gainPtr);
|
|
}
|
|
|
|
/// Channel::getLowPassGain
|
|
public static float GetLowPassGain(this Channel channel)
|
|
{
|
|
TryGetLowPassGain(channel, out var gain).Check();
|
|
return gain;
|
|
}
|
|
|
|
/// Channel::setMode
|
|
public static Result TrySetMode(this Channel channel, Mode mode) => PInvoke.ChannelSetMode(channel, mode);
|
|
|
|
/// Channel::setMode
|
|
public static void SetMode(this Channel channel, Mode mode) => TrySetMode(channel, mode).Check();
|
|
|
|
/// Channel::getMode
|
|
public static unsafe Result TryGetMode(this Channel channel, out Mode mode)
|
|
{
|
|
fixed (Mode* modePtr = &mode)
|
|
return PInvoke.ChannelGetMode(channel, modePtr);
|
|
}
|
|
|
|
/// Channel::getMode
|
|
public static Mode GetMode(this Channel channel)
|
|
{
|
|
TryGetMode(channel, out var mode).Check();
|
|
return mode;
|
|
}
|
|
|
|
/// Channel::setCallback
|
|
public static Result TrySetCallback(this Channel channel, ChannelControlCallbackPtr callback) =>
|
|
PInvoke.ChannelSetCallback(channel, callback);
|
|
|
|
/// Channel::setCallback
|
|
public static void SetCallback(this Channel channel, ChannelControlCallbackPtr callback) =>
|
|
TrySetCallback(channel, callback).Check();
|
|
|
|
/// Channel::isPlaying
|
|
public static unsafe Result TryIsPlaying(this Channel channel, out Bool32 isPlaying)
|
|
{
|
|
fixed (Bool32* isPlayingPtr = &isPlaying)
|
|
return PInvoke.ChannelIsPlaying(channel, isPlayingPtr);
|
|
}
|
|
|
|
/// Channel::isPlaying
|
|
public static Bool32 IsPlaying(this Channel channel)
|
|
{
|
|
TryIsPlaying(channel, out var isPlaying).Check();
|
|
return isPlaying;
|
|
}
|
|
|
|
/// Channel::setPan
|
|
public static Result TrySetPan(this Channel channel, float pan) => PInvoke.ChannelSetPan(channel, pan);
|
|
|
|
/// Channel::setPan
|
|
public static void SetPan(this Channel channel, float pan) => TrySetPan(channel, pan).Check();
|
|
|
|
/// Channel::setMixLevelsOutput
|
|
public static Result TrySetMixLevelsOutput(
|
|
this Channel channel,
|
|
float frontLeft,
|
|
float frontRight,
|
|
float center,
|
|
float lfe,
|
|
float surroundLeft,
|
|
float surroundRight,
|
|
float backLeft,
|
|
float backRight
|
|
) =>
|
|
PInvoke.ChannelSetMixLevelsOutput(
|
|
channel,
|
|
frontLeft,
|
|
frontRight,
|
|
center,
|
|
lfe,
|
|
surroundLeft,
|
|
surroundRight,
|
|
backLeft,
|
|
backRight
|
|
);
|
|
|
|
/// Channel::setMixLevelsOutput
|
|
public static void SetMixLevelsOutput(
|
|
this Channel channel,
|
|
float frontLeft,
|
|
float frontRight,
|
|
float center,
|
|
float lfe,
|
|
float surroundLeft,
|
|
float surroundRight,
|
|
float backLeft,
|
|
float backRight
|
|
) =>
|
|
TrySetMixLevelsOutput(
|
|
channel,
|
|
frontLeft,
|
|
frontRight,
|
|
center,
|
|
lfe,
|
|
surroundLeft,
|
|
surroundRight,
|
|
backLeft,
|
|
backRight
|
|
)
|
|
.Check();
|
|
|
|
/// Channel::setMixLevelsInput
|
|
public static unsafe Result TrySetMixLevelsInput(this Channel channel, float* levels, int numLevels) =>
|
|
PInvoke.ChannelSetMixLevelsInput(channel, levels, numLevels);
|
|
|
|
/// Channel::setMixLevelsInput
|
|
public static unsafe void SetMixLevelsInput(this Channel channel, float* levels, int numLevels) =>
|
|
TrySetMixLevelsInput(channel, levels, numLevels).Check();
|
|
|
|
/// Channel::setMixMatrix
|
|
public static unsafe Result TrySetMixMatrix(
|
|
this Channel channel,
|
|
float* matrix,
|
|
int outChannels,
|
|
int inChannels,
|
|
int inChannelHop
|
|
) => PInvoke.ChannelSetMixMatrix(channel, matrix, outChannels, inChannels, inChannelHop);
|
|
|
|
/// Channel::setMixMatrix
|
|
public static unsafe void SetMixMatrix(
|
|
this Channel channel,
|
|
float* matrix,
|
|
int outChannels,
|
|
int inChannels,
|
|
int inChannelHop
|
|
) => TrySetMixMatrix(channel, matrix, outChannels, inChannels, inChannelHop).Check();
|
|
|
|
/// Channel::getMixMatrix
|
|
public static unsafe Result TryGetMixMatrix(
|
|
this Channel channel,
|
|
float* matrix,
|
|
out int outChannels,
|
|
out int inChannels,
|
|
int inChannelHop
|
|
)
|
|
{
|
|
fixed (int* outChannelsPtr = &outChannels)
|
|
fixed (int* inChannelsPtr = &inChannels)
|
|
return PInvoke.ChannelGetMixMatrix(channel, matrix, outChannelsPtr, inChannelsPtr, inChannelHop);
|
|
}
|
|
|
|
/// Channel::getMixMatrix
|
|
public static unsafe void GetMixMatrix(
|
|
this Channel channel,
|
|
float* matrix,
|
|
out int outChannels,
|
|
out int inChannels,
|
|
int inChannelHop
|
|
) => TryGetMixMatrix(channel, matrix, out outChannels, out inChannels, inChannelHop).Check();
|
|
|
|
/// Channel::getDSPClock
|
|
public static unsafe Result TryGetDspClock(this Channel channel, out ulong dspClock, out ulong parentClock)
|
|
{
|
|
fixed (ulong* dspClockPtr = &dspClock)
|
|
fixed (ulong* parentClockPtr = &parentClock)
|
|
return PInvoke.ChannelGetDspClock(channel, dspClockPtr, parentClockPtr);
|
|
}
|
|
|
|
/// Channel::getDSPClock
|
|
public static void GetDspClock(this Channel channel, out ulong dspClock, out ulong parentClock) =>
|
|
TryGetDspClock(channel, out dspClock, out parentClock).Check();
|
|
|
|
/// Channel::setDelay
|
|
public static Result TrySetDelay(
|
|
this Channel channel,
|
|
ulong dspClockStart,
|
|
ulong dspClockEnd,
|
|
Bool32 stopChannels
|
|
) => PInvoke.ChannelSetDelay(channel, dspClockStart, dspClockEnd, stopChannels);
|
|
|
|
/// Channel::setDelay
|
|
public static void SetDelay(
|
|
this Channel channel,
|
|
ulong dspClockStart,
|
|
ulong dspClockEnd,
|
|
Bool32 stopChannels
|
|
) => TrySetDelay(channel, dspClockStart, dspClockEnd, stopChannels).Check();
|
|
|
|
/// Channel::getDelay
|
|
public static unsafe Result TryGetDelay(
|
|
this Channel channel,
|
|
out ulong dspClockStart,
|
|
out ulong dspClockEnd,
|
|
out Bool32 stopChannels
|
|
)
|
|
{
|
|
fixed (ulong* dspClockStartPtr = &dspClockStart)
|
|
fixed (ulong* dspClockEndPtr = &dspClockEnd)
|
|
fixed (Bool32* stopChannelsPtr = &stopChannels)
|
|
return PInvoke.ChannelGetDelay(channel, dspClockStartPtr, dspClockEndPtr, stopChannelsPtr);
|
|
}
|
|
|
|
/// Channel::getDelay
|
|
public static void GetDelay(
|
|
this Channel channel,
|
|
out ulong dspClockStart,
|
|
out ulong dspClockEnd,
|
|
out Bool32 stopChannels
|
|
) => TryGetDelay(channel, out dspClockStart, out dspClockEnd, out stopChannels).Check();
|
|
|
|
/// Channel::addFadePoint
|
|
public static Result TryAddFadePoint(this Channel channel, ulong dspClock, float volume) =>
|
|
PInvoke.ChannelAddFadePoint(channel, dspClock, volume);
|
|
|
|
/// Channel::addFadePoint
|
|
public static void AddFadePoint(this Channel channel, ulong dspClock, float volume) =>
|
|
TryAddFadePoint(channel, dspClock, volume).Check();
|
|
|
|
/// Channel::setFadePointRamp
|
|
public static Result TrySetFadePointRamp(this Channel channel, ulong dspClock, float volume) =>
|
|
PInvoke.ChannelSetFadePointRamp(channel, dspClock, volume);
|
|
|
|
/// Channel::setFadePointRamp
|
|
public static void SetFadePointRamp(this Channel channel, ulong dspClock, float volume) =>
|
|
TrySetFadePointRamp(channel, dspClock, volume).Check();
|
|
|
|
/// Channel::removeFadePoints
|
|
public static Result TryRemoveFadePoints(this Channel channel, ulong dspClockStart, ulong dspClockEnd) =>
|
|
PInvoke.ChannelRemoveFadePoints(channel, dspClockStart, dspClockEnd);
|
|
|
|
/// Channel::removeFadePoints
|
|
public static void RemoveFadePoints(this Channel channel, ulong dspClockStart, ulong dspClockEnd) =>
|
|
TryRemoveFadePoints(channel, dspClockStart, dspClockEnd).Check();
|
|
|
|
/// Channel::getFadePoints
|
|
public static unsafe Result TryGetFadePoints(
|
|
this Channel channel,
|
|
uint* numPoints,
|
|
ulong* pointDspClock,
|
|
float* pointVolume
|
|
) => PInvoke.ChannelGetFadePoints(channel, numPoints, pointDspClock, pointVolume);
|
|
|
|
/// Channel::getFadePoints
|
|
public static unsafe void GetFadePoints(
|
|
this Channel channel,
|
|
uint* numPoints,
|
|
ulong* pointDspClock,
|
|
float* pointVolume
|
|
) => TryGetFadePoints(channel, numPoints, pointDspClock, pointVolume).Check();
|
|
|
|
/// Channel::getDSP
|
|
public static unsafe Result TryGetDsp(this Channel channel, int index, out Dsp dsp)
|
|
{
|
|
fixed (Dsp* dspPtr = &dsp)
|
|
return PInvoke.ChannelGetDsp(channel, index, dspPtr);
|
|
}
|
|
|
|
/// Channel::getDSP
|
|
public static Dsp GetDsp(this Channel channel, int index)
|
|
{
|
|
TryGetDsp(channel, index, out var dsp).Check();
|
|
return dsp;
|
|
}
|
|
|
|
/// Channel::addDSP
|
|
public static Result TryAddDsp(this Channel channel, int index, Dsp dsp) =>
|
|
PInvoke.ChannelAddDsp(channel, index, dsp);
|
|
|
|
/// Channel::addDSP
|
|
public static void AddDsp(this Channel channel, int index, Dsp dsp) => TryAddDsp(channel, index, dsp).Check();
|
|
|
|
/// Channel::removeDSP
|
|
public static Result TryRemoveDsp(this Channel channel, Dsp dsp) => PInvoke.ChannelRemoveDsp(channel, dsp);
|
|
|
|
/// Channel::removeDSP
|
|
public static void RemoveDsp(this Channel channel, Dsp dsp) => TryRemoveDsp(channel, dsp).Check();
|
|
|
|
/// Channel::getNumDSPs
|
|
public static unsafe Result TryGetNumDsps(this Channel channel, out int numDsps)
|
|
{
|
|
fixed (int* numDspsPtr = &numDsps)
|
|
return PInvoke.ChannelGetNumDsps(channel, numDspsPtr);
|
|
}
|
|
|
|
/// Channel::getNumDSPs
|
|
public static int GetNumDsps(this Channel channel)
|
|
{
|
|
TryGetNumDsps(channel, out var numDsps).Check();
|
|
return numDsps;
|
|
}
|
|
|
|
/// Channel::setDSPIndex
|
|
public static Result TrySetDspIndex(this Channel channel, Dsp dsp, int index) =>
|
|
PInvoke.ChannelSetDspIndex(channel, dsp, index);
|
|
|
|
/// Channel::setDSPIndex
|
|
public static void SetDspIndex(this Channel channel, Dsp dsp, int index) =>
|
|
TrySetDspIndex(channel, dsp, index).Check();
|
|
|
|
/// Channel::getDSPIndex
|
|
public static unsafe Result TryGetDspIndex(this Channel channel, Dsp dsp, out int index)
|
|
{
|
|
fixed (int* indexPtr = &index)
|
|
return PInvoke.ChannelGetDspIndex(channel, dsp, indexPtr);
|
|
}
|
|
|
|
/// Channel::getDSPIndex
|
|
public static int GetDspIndex(this Channel channel, Dsp dsp)
|
|
{
|
|
TryGetDspIndex(channel, dsp, out var index).Check();
|
|
return index;
|
|
}
|
|
|
|
/// Channel::set3DAttributes
|
|
public static unsafe Result TrySet3dAttributes(this Channel channel, in float3 pos, in float3 vel)
|
|
{
|
|
fixed (float3* posPtr = &pos)
|
|
fixed (float3* velPtr = &vel)
|
|
return PInvoke.ChannelSet3dAttributes(channel, posPtr, velPtr);
|
|
}
|
|
|
|
/// Channel::set3DAttributes
|
|
public static void Set3dAttributes(this Channel channel, in float3 pos, in float3 vel) =>
|
|
TrySet3dAttributes(channel, pos, vel).Check();
|
|
|
|
/// Channel::get3DAttributes
|
|
public static unsafe Result TryGet3dAttributes(this Channel channel, out float3 pos, out float3 vel)
|
|
{
|
|
fixed (float3* posPtr = &pos)
|
|
fixed (float3* velPtr = &vel)
|
|
return PInvoke.ChannelGet3dAttributes(channel, posPtr, velPtr);
|
|
}
|
|
|
|
/// Channel::get3DAttributes
|
|
public static void Get3dAttributes(this Channel channel, out float3 pos, out float3 vel) =>
|
|
TryGet3dAttributes(channel, out pos, out vel).Check();
|
|
|
|
/// Channel::set3DMinMaxDistance
|
|
public static Result TrySet3dMinMaxDistance(this Channel channel, float minDistance, float maxDistance) =>
|
|
PInvoke.ChannelSet3dMinMaxDistance(channel, minDistance, maxDistance);
|
|
|
|
/// Channel::set3DMinMaxDistance
|
|
public static void Set3dMinMaxDistance(this Channel channel, float minDistance, float maxDistance) =>
|
|
TrySet3dMinMaxDistance(channel, minDistance, maxDistance).Check();
|
|
|
|
/// Channel::get3DMinMaxDistance
|
|
public static unsafe Result TryGet3dMinMaxDistance(
|
|
this Channel channel,
|
|
out float minDistance,
|
|
out float maxDistance
|
|
)
|
|
{
|
|
fixed (float* minDistancePtr = &minDistance)
|
|
fixed (float* maxDistancePtr = &maxDistance)
|
|
return PInvoke.ChannelGet3dMinMaxDistance(channel, minDistancePtr, maxDistancePtr);
|
|
}
|
|
|
|
/// Channel::get3DMinMaxDistance
|
|
public static void Get3dMinMaxDistance(this Channel channel, out float minDistance, out float maxDistance) =>
|
|
TryGet3dMinMaxDistance(channel, out minDistance, out maxDistance).Check();
|
|
|
|
/// Channel::set3DConeSettings
|
|
public static Result TrySet3dConeSettings(
|
|
this Channel channel,
|
|
float insideConeAngle,
|
|
float outsideConeAngle,
|
|
float outsideVolume
|
|
) => PInvoke.ChannelSet3dConeSettings(channel, insideConeAngle, outsideConeAngle, outsideVolume);
|
|
|
|
/// Channel::set3DConeSettings
|
|
public static void Set3dConeSettings(
|
|
this Channel channel,
|
|
float insideConeAngle,
|
|
float outsideConeAngle,
|
|
float outsideVolume
|
|
) => TrySet3dConeSettings(channel, insideConeAngle, outsideConeAngle, outsideVolume).Check();
|
|
|
|
/// Channel::get3DConeSettings
|
|
public static unsafe Result TryGet3dConeSettings(
|
|
this Channel channel,
|
|
out float insideConeAngle,
|
|
out float outsideConeAngle,
|
|
out float outsideVolume
|
|
)
|
|
{
|
|
fixed (float* insideConeAnglePtr = &insideConeAngle)
|
|
fixed (float* outsideConeAnglePtr = &outsideConeAngle)
|
|
fixed (float* outsideVolumePtr = &outsideVolume)
|
|
return PInvoke.ChannelGet3dConeSettings(
|
|
channel,
|
|
insideConeAnglePtr,
|
|
outsideConeAnglePtr,
|
|
outsideVolumePtr
|
|
);
|
|
}
|
|
|
|
/// Channel::get3DConeSettings
|
|
public static void Get3dConeSettings(
|
|
this Channel channel,
|
|
out float insideConeAngle,
|
|
out float outsideConeAngle,
|
|
out float outsideVolume
|
|
) => TryGet3dConeSettings(channel, out insideConeAngle, out outsideConeAngle, out outsideVolume).Check();
|
|
|
|
/// Channel::set3DConeOrientation
|
|
public static unsafe Result TrySet3dConeOrientation(this Channel channel, in float3 orientation)
|
|
{
|
|
fixed (float3* orientationPtr = &orientation)
|
|
return PInvoke.ChannelSet3dConeOrientation(channel, orientationPtr);
|
|
}
|
|
|
|
/// Channel::set3DConeOrientation
|
|
public static void Set3dConeOrientation(this Channel channel, in float3 orientation) =>
|
|
TrySet3dConeOrientation(channel, orientation).Check();
|
|
|
|
/// Channel::get3DConeOrientation
|
|
public static unsafe Result TryGet3dConeOrientation(this Channel channel, out float3 orientation)
|
|
{
|
|
fixed (float3* orientationPtr = &orientation)
|
|
return PInvoke.ChannelGet3dConeOrientation(channel, orientationPtr);
|
|
}
|
|
|
|
/// Channel::get3DConeOrientation
|
|
public static float3 Get3dConeOrientation(this Channel channel)
|
|
{
|
|
TryGet3dConeOrientation(channel, out var orientation).Check();
|
|
return orientation;
|
|
}
|
|
|
|
/// Channel::set3DCustomRolloff
|
|
public static unsafe Result TrySet3dCustomRolloff(this Channel channel, float3* points, int numPoints) =>
|
|
PInvoke.ChannelSet3dCustomRolloff(channel, points, numPoints);
|
|
|
|
/// Channel::set3DCustomRolloff
|
|
public static unsafe void Set3dCustomRolloff(this Channel channel, float3* points, int numPoints) =>
|
|
TrySet3dCustomRolloff(channel, points, numPoints).Check();
|
|
|
|
/// Channel::get3DCustomRolloff
|
|
public static unsafe Result TryGet3dCustomRolloff(this Channel channel, out float3* points, out int numPoints)
|
|
{
|
|
fixed (float3** pointsPtr = &points)
|
|
fixed (int* numPointsPtr = &numPoints)
|
|
return PInvoke.ChannelGet3dCustomRolloff(channel, pointsPtr, numPointsPtr);
|
|
}
|
|
|
|
/// Channel::get3DCustomRolloff
|
|
public static unsafe void Get3dCustomRolloff(this Channel channel, out float3* points, out int numPoints) =>
|
|
TryGet3dCustomRolloff(channel, out points, out numPoints).Check();
|
|
|
|
/// Channel::set3DOcclusion
|
|
public static Result TrySet3dOcclusion(this Channel channel, float directOcclusion, float reverbOcclusion) =>
|
|
PInvoke.ChannelSet3dOcclusion(channel, directOcclusion, reverbOcclusion);
|
|
|
|
/// Channel::set3DOcclusion
|
|
public static void Set3dOcclusion(this Channel channel, float directOcclusion, float reverbOcclusion) =>
|
|
TrySet3dOcclusion(channel, directOcclusion, reverbOcclusion).Check();
|
|
|
|
/// Channel::get3DOcclusion
|
|
public static unsafe Result TryGet3dOcclusion(
|
|
this Channel channel,
|
|
out float directOcclusion,
|
|
out float reverbOcclusion
|
|
)
|
|
{
|
|
fixed (float* directOcclusionPtr = &directOcclusion)
|
|
fixed (float* reverbOcclusionPtr = &reverbOcclusion)
|
|
return PInvoke.ChannelGet3dOcclusion(channel, directOcclusionPtr, reverbOcclusionPtr);
|
|
}
|
|
|
|
/// Channel::get3DOcclusion
|
|
public static void Get3dOcclusion(this Channel channel, out float directOcclusion, out float reverbOcclusion) =>
|
|
TryGet3dOcclusion(channel, out directOcclusion, out reverbOcclusion).Check();
|
|
|
|
/// Channel::set3DSpread
|
|
public static Result TrySet3dSpread(this Channel channel, float angle) =>
|
|
PInvoke.ChannelSet3dSpread(channel, angle);
|
|
|
|
/// Channel::set3DSpread
|
|
public static void Set3dSpread(this Channel channel, float angle) => TrySet3dSpread(channel, angle).Check();
|
|
|
|
/// Channel::get3DSpread
|
|
public static unsafe Result TryGet3dSpread(this Channel channel, out float angle)
|
|
{
|
|
fixed (float* anglePtr = &angle)
|
|
return PInvoke.ChannelGet3dSpread(channel, anglePtr);
|
|
}
|
|
|
|
/// Channel::get3DSpread
|
|
public static float Get3dSpread(this Channel channel)
|
|
{
|
|
TryGet3dSpread(channel, out var angle).Check();
|
|
return angle;
|
|
}
|
|
|
|
/// Channel::set3DLevel
|
|
public static Result TrySet3dLevel(this Channel channel, float level) =>
|
|
PInvoke.ChannelSet3dLevel(channel, level);
|
|
|
|
/// Channel::set3DLevel
|
|
public static void Set3dLevel(this Channel channel, float level) => TrySet3dLevel(channel, level).Check();
|
|
|
|
/// Channel::get3DLevel
|
|
public static unsafe Result TryGet3dLevel(this Channel channel, out float level)
|
|
{
|
|
fixed (float* levelPtr = &level)
|
|
return PInvoke.ChannelGet3dLevel(channel, levelPtr);
|
|
}
|
|
|
|
/// Channel::get3DLevel
|
|
public static float Get3dLevel(this Channel channel)
|
|
{
|
|
TryGet3dLevel(channel, out var level).Check();
|
|
return level;
|
|
}
|
|
|
|
/// Channel::set3DDopplerLevel
|
|
public static Result TrySet3dDopplerLevel(this Channel channel, float level) =>
|
|
PInvoke.ChannelSet3dDopplerLevel(channel, level);
|
|
|
|
/// Channel::set3DDopplerLevel
|
|
public static void Set3dDopplerLevel(this Channel channel, float level) =>
|
|
TrySet3dDopplerLevel(channel, level).Check();
|
|
|
|
/// Channel::get3DDopplerLevel
|
|
public static unsafe Result TryGet3dDopplerLevel(this Channel channel, out float level)
|
|
{
|
|
fixed (float* levelPtr = &level)
|
|
return PInvoke.ChannelGet3dDopplerLevel(channel, levelPtr);
|
|
}
|
|
|
|
/// Channel::get3DDopplerLevel
|
|
public static float Get3dDopplerLevel(this Channel channel)
|
|
{
|
|
TryGet3dDopplerLevel(channel, out var level).Check();
|
|
return level;
|
|
}
|
|
|
|
/// Channel::set3DDistanceFilter
|
|
public static Result TrySet3dDistanceFilter(
|
|
this Channel channel,
|
|
Bool32 custom,
|
|
float customLevel,
|
|
float centerFreq
|
|
) => PInvoke.ChannelSet3dDistanceFilter(channel, custom, customLevel, centerFreq);
|
|
|
|
/// Channel::set3DDistanceFilter
|
|
public static void Set3dDistanceFilter(
|
|
this Channel channel,
|
|
Bool32 custom,
|
|
float customLevel,
|
|
float centerFreq
|
|
) => TrySet3dDistanceFilter(channel, custom, customLevel, centerFreq).Check();
|
|
|
|
/// Channel::get3DDistanceFilter
|
|
public static unsafe Result TryGet3dDistanceFilter(
|
|
this Channel channel,
|
|
out Bool32 custom,
|
|
out float customLevel,
|
|
out float centerFreq
|
|
)
|
|
{
|
|
fixed (Bool32* customPtr = &custom)
|
|
fixed (float* customLevelPtr = &customLevel)
|
|
fixed (float* centerFreqPtr = ¢erFreq)
|
|
return PInvoke.ChannelGet3dDistanceFilter(channel, customPtr, customLevelPtr, centerFreqPtr);
|
|
}
|
|
|
|
/// Channel::get3DDistanceFilter
|
|
public static void Get3dDistanceFilter(
|
|
this Channel channel,
|
|
out Bool32 custom,
|
|
out float customLevel,
|
|
out float centerFreq
|
|
) => TryGet3dDistanceFilter(channel, out custom, out customLevel, out centerFreq).Check();
|
|
|
|
/// Channel::setUserData
|
|
public static Result TrySetUserData(this Channel channel, nint userData) =>
|
|
PInvoke.ChannelSetUserData(channel, userData);
|
|
|
|
/// Channel::setUserData
|
|
public static void SetUserData(this Channel channel, nint userData) =>
|
|
TrySetUserData(channel, userData).Check();
|
|
|
|
/// Channel::getUserData
|
|
public static unsafe Result TryGetUserData(this Channel channel, out nint userData)
|
|
{
|
|
fixed (nint* userDataPtr = &userData)
|
|
return PInvoke.ChannelGetUserData(channel, userDataPtr);
|
|
}
|
|
|
|
/// Channel::getUserData
|
|
public static nint GetUserData(this Channel channel)
|
|
{
|
|
TryGetUserData(channel, out var userData).Check();
|
|
return userData;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the frequency or playback rate.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_setfrequency">Channel::setFrequency</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetFrequency(this Channel channel, float frequency) =>
|
|
PInvoke.ChannelSetFrequency(channel, frequency);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the frequency or playback rate.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_setfrequency">Channel::setFrequency</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetFrequency(this Channel channel, float frequency) =>
|
|
TrySetFrequency(channel, frequency).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the playback frequency or playback rate.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_getfrequency">Channel::getFrequency</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetFrequency(this Channel channel, out float frequency)
|
|
{
|
|
fixed (float* frequencyPtr = &frequency)
|
|
return PInvoke.ChannelGetFrequency(channel, frequencyPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the playback frequency or playback rate.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_getfrequency">Channel::getFrequency</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static float GetFrequency(this Channel channel)
|
|
{
|
|
TryGetFrequency(channel, out var frequency).Check();
|
|
return frequency;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the priority used for virtual voice ordering.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_setpriority">Channel::setPriority</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetPriority(this Channel channel, int priority) =>
|
|
PInvoke.ChannelSetPriority(channel, priority);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the priority used for virtual voice ordering.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_setpriority">Channel::setPriority</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetPriority(this Channel channel, int priority) => TrySetPriority(channel, priority).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the priority used for virtual voice ordering.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_getpriority">Channel::getPriority</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetPriority(this Channel channel, out int priority)
|
|
{
|
|
fixed (int* priorityPtr = &priority)
|
|
return PInvoke.ChannelGetPriority(channel, priorityPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the priority used for virtual voice ordering.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_getpriority">Channel::getPriority</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static int GetPriority(this Channel channel)
|
|
{
|
|
TryGetPriority(channel, out var priority).Check();
|
|
return priority;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the current playback position.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_setposition">Channel::setPosition</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetPosition(this Channel channel, uint position, TimeUnit posType) =>
|
|
PInvoke.ChannelSetPosition(channel, position, posType);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the current playback position.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_setposition">Channel::setPosition</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetPosition(this Channel channel, uint position, TimeUnit posType) =>
|
|
TrySetPosition(channel, position, posType).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the current playback position.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_getposition">Channel::getPosition</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetPosition(this Channel channel, out uint position, TimeUnit posType)
|
|
{
|
|
fixed (uint* positionPtr = &position)
|
|
return PInvoke.ChannelGetPosition(channel, positionPtr, posType);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the current playback position.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_getposition">Channel::getPosition</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static uint GetPosition(this Channel channel, TimeUnit posType)
|
|
{
|
|
TryGetPosition(channel, out var position, posType).Check();
|
|
return position;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the ChannelGroup this object outputs to.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_setchannelgroup">Channel::setChannelGroup</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetChannelGroup(this Channel channel, ChannelGroup channelGroup) =>
|
|
PInvoke.ChannelSetChannelGroup(channel, channelGroup);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the ChannelGroup this object outputs to.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_setchannelgroup">Channel::setChannelGroup</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetChannelGroup(this Channel channel, ChannelGroup channelGroup) =>
|
|
TrySetChannelGroup(channel, channelGroup).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the ChannelGroup this object outputs to.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_getchannelgroup">Channel::getChannelGroup</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetChannelGroup(this Channel channel, out ChannelGroup channelGroup)
|
|
{
|
|
fixed (ChannelGroup* channelGroupPtr = &channelGroup)
|
|
return PInvoke.ChannelGetChannelGroup(channel, channelGroupPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the ChannelGroup this object outputs to.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_getchannelgroup">Channel::getChannelGroup</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static ChannelGroup GetChannelGroup(this Channel channel)
|
|
{
|
|
TryGetChannelGroup(channel, out var channelGroup).Check();
|
|
return channelGroup;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the number of times to loop before stopping.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_setloopcount">Channel::setLoopCount</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetLoopCount(this Channel channel, int loopCount) =>
|
|
PInvoke.ChannelSetLoopCount(channel, loopCount);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the number of times to loop before stopping.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_setloopcount">Channel::setLoopCount</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetLoopCount(this Channel channel, int loopCount) =>
|
|
TrySetLoopCount(channel, loopCount).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the number of times to loop before stopping.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_getloopcount">Channel::getLoopCount</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetLoopCount(this Channel channel, out int loopCount)
|
|
{
|
|
fixed (int* loopCountPtr = &loopCount)
|
|
return PInvoke.ChannelGetLoopCount(channel, loopCountPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the number of times to loop before stopping.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_getloopcount">Channel::getLoopCount</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static int GetLoopCount(this Channel channel)
|
|
{
|
|
TryGetLoopCount(channel, out var loopCount).Check();
|
|
return loopCount;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the loop start and end points.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_setlooppoints">Channel::setLoopPoints</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetLoopPoints(
|
|
this Channel channel,
|
|
uint loopStart,
|
|
TimeUnit loopStartType,
|
|
uint loopEnd,
|
|
TimeUnit loopEndType
|
|
) => PInvoke.ChannelSetLoopPoints(channel, loopStart, loopStartType, loopEnd, loopEndType);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the loop start and end points.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_setlooppoints">Channel::setLoopPoints</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetLoopPoints(
|
|
this Channel channel,
|
|
uint loopStart,
|
|
TimeUnit loopStartType,
|
|
uint loopEnd,
|
|
TimeUnit loopEndType
|
|
) => TrySetLoopPoints(channel, loopStart, loopStartType, loopEnd, loopEndType).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the loop start and end points.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_getlooppoints">Channel::getLoopPoints</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetLoopPoints(
|
|
this Channel channel,
|
|
out uint loopStart,
|
|
TimeUnit loopStartType,
|
|
out uint loopEnd,
|
|
TimeUnit loopEndType
|
|
)
|
|
{
|
|
fixed (uint* loopStartPtr = &loopStart)
|
|
fixed (uint* loopEndPtr = &loopEnd)
|
|
return PInvoke.ChannelGetLoopPoints(channel, loopStartPtr, loopStartType, loopEndPtr, loopEndType);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the loop start and end points.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_getlooppoints">Channel::getLoopPoints</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void GetLoopPoints(
|
|
this Channel channel,
|
|
out uint loopStart,
|
|
TimeUnit loopStartType,
|
|
out uint loopEnd,
|
|
TimeUnit loopEndType
|
|
) => TryGetLoopPoints(channel, out loopStart, loopStartType, out loopEnd, loopEndType).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves whether the Channel is being emulated by the virtual voice system.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_isvirtual">Channel::isVirtual</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryIsVirtual(this Channel channel, out Bool32 isVirtual)
|
|
{
|
|
fixed (Bool32* isVirtualPtr = &isVirtual)
|
|
return PInvoke.ChannelIsVirtual(channel, isVirtualPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves whether the Channel is being emulated by the virtual voice system.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_isvirtual">Channel::isVirtual</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Bool32 IsVirtual(this Channel channel)
|
|
{
|
|
TryIsVirtual(channel, out var isVirtual).Check();
|
|
return isVirtual;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the currently playing Sound.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_getcurrentsound">Channel::getCurrentSound</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetCurrentSound(this Channel channel, out Sound sound)
|
|
{
|
|
fixed (Sound* soundPtr = &sound)
|
|
return PInvoke.ChannelGetCurrentSound(channel, soundPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the currently playing Sound.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_getcurrentsound">Channel::getCurrentSound</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Sound GetCurrentSound(this Channel channel)
|
|
{
|
|
TryGetCurrentSound(channel, out var sound).Check();
|
|
return sound;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the index of this object in the System Channel pool.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_getindex">Channel::getIndex</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetIndex(this Channel channel, out int index)
|
|
{
|
|
fixed (int* indexPtr = &index)
|
|
return PInvoke.ChannelGetIndex(channel, indexPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the index of this object in the System Channel pool.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-channel.html#channel_getindex">Channel::getIndex</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static int GetIndex(this Channel channel)
|
|
{
|
|
TryGetIndex(channel, out var index).Check();
|
|
return index;
|
|
}
|
|
}
|
|
}
|