Compare commits
No commits in common. "mastering_effects" and "main" have entirely different histories.
mastering_
...
main
|
@ -0,0 +1,166 @@
|
||||||
|
---
|
||||||
|
Language: Cpp
|
||||||
|
# BasedOnStyle: LLVM
|
||||||
|
AccessModifierOffset: -2
|
||||||
|
AlignAfterOpenBracket: AlwaysBreak
|
||||||
|
AlignConsecutiveMacros: None
|
||||||
|
AlignConsecutiveAssignments: None
|
||||||
|
AlignConsecutiveBitFields: None
|
||||||
|
AlignConsecutiveDeclarations: None
|
||||||
|
AlignEscapedNewlines: Right
|
||||||
|
AlignOperands: Align
|
||||||
|
AlignTrailingComments: true
|
||||||
|
AllowAllArgumentsOnNextLine: false
|
||||||
|
AllowAllConstructorInitializersOnNextLine: true
|
||||||
|
AllowAllParametersOfDeclarationOnNextLine: false
|
||||||
|
AllowShortEnumsOnASingleLine: true
|
||||||
|
AllowShortBlocksOnASingleLine: Never
|
||||||
|
AllowShortCaseLabelsOnASingleLine: false
|
||||||
|
AllowShortFunctionsOnASingleLine: All
|
||||||
|
AllowShortLambdasOnASingleLine: All
|
||||||
|
AllowShortIfStatementsOnASingleLine: Never
|
||||||
|
AllowShortLoopsOnASingleLine: false
|
||||||
|
AlwaysBreakAfterDefinitionReturnType: None
|
||||||
|
AlwaysBreakAfterReturnType: None
|
||||||
|
AlwaysBreakBeforeMultilineStrings: false
|
||||||
|
AlwaysBreakTemplateDeclarations: MultiLine
|
||||||
|
AttributeMacros:
|
||||||
|
- __capability
|
||||||
|
BinPackArguments: false
|
||||||
|
BinPackParameters: false
|
||||||
|
BraceWrapping:
|
||||||
|
AfterCaseLabel: false
|
||||||
|
AfterClass: false
|
||||||
|
AfterControlStatement: Never
|
||||||
|
AfterEnum: false
|
||||||
|
AfterFunction: false
|
||||||
|
AfterNamespace: false
|
||||||
|
AfterObjCDeclaration: false
|
||||||
|
AfterStruct: false
|
||||||
|
AfterUnion: false
|
||||||
|
AfterExternBlock: false
|
||||||
|
BeforeCatch: false
|
||||||
|
BeforeElse: false
|
||||||
|
BeforeLambdaBody: false
|
||||||
|
BeforeWhile: false
|
||||||
|
IndentBraces: false
|
||||||
|
SplitEmptyFunction: true
|
||||||
|
SplitEmptyRecord: true
|
||||||
|
SplitEmptyNamespace: true
|
||||||
|
BreakBeforeBinaryOperators: None
|
||||||
|
BreakBeforeConceptDeclarations: true
|
||||||
|
BreakBeforeBraces: Allman
|
||||||
|
BreakBeforeInheritanceComma: false
|
||||||
|
BreakInheritanceList: BeforeColon
|
||||||
|
BreakBeforeTernaryOperators: true
|
||||||
|
BreakConstructorInitializersBeforeComma: false
|
||||||
|
BreakConstructorInitializers: BeforeColon
|
||||||
|
BreakAfterJavaFieldAnnotations: false
|
||||||
|
BreakStringLiterals: true
|
||||||
|
ColumnLimit: 100
|
||||||
|
CommentPragmas: '^ IWYU pragma:'
|
||||||
|
CompactNamespaces: false
|
||||||
|
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||||
|
ConstructorInitializerIndentWidth: 4
|
||||||
|
ContinuationIndentWidth: 4
|
||||||
|
Cpp11BracedListStyle: true
|
||||||
|
DeriveLineEnding: true
|
||||||
|
DerivePointerAlignment: false
|
||||||
|
DisableFormat: false
|
||||||
|
EmptyLineBeforeAccessModifier: LogicalBlock
|
||||||
|
ExperimentalAutoDetectBinPacking: false
|
||||||
|
FixNamespaceComments: true
|
||||||
|
ForEachMacros:
|
||||||
|
- foreach
|
||||||
|
- Q_FOREACH
|
||||||
|
- BOOST_FOREACH
|
||||||
|
StatementAttributeLikeMacros:
|
||||||
|
- Q_EMIT
|
||||||
|
IncludeBlocks: Preserve
|
||||||
|
IncludeCategories:
|
||||||
|
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
|
||||||
|
Priority: 2
|
||||||
|
SortPriority: 0
|
||||||
|
CaseSensitive: false
|
||||||
|
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
|
||||||
|
Priority: 3
|
||||||
|
SortPriority: 0
|
||||||
|
CaseSensitive: false
|
||||||
|
- Regex: '.*'
|
||||||
|
Priority: 1
|
||||||
|
SortPriority: 0
|
||||||
|
CaseSensitive: false
|
||||||
|
IncludeIsMainRegex: '(Test)?$'
|
||||||
|
IncludeIsMainSourceRegex: ''
|
||||||
|
IndentCaseLabels: false
|
||||||
|
IndentCaseBlocks: false
|
||||||
|
IndentGotoLabels: true
|
||||||
|
IndentPPDirectives: None
|
||||||
|
IndentExternBlock: NoIndent
|
||||||
|
IndentRequires: false
|
||||||
|
IndentWidth: 4
|
||||||
|
IndentWrappedFunctionNames: false
|
||||||
|
InsertTrailingCommas: None
|
||||||
|
JavaScriptQuotes: Leave
|
||||||
|
JavaScriptWrapImports: true
|
||||||
|
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||||
|
MacroBlockBegin: ''
|
||||||
|
MacroBlockEnd: ''
|
||||||
|
MaxEmptyLinesToKeep: 1
|
||||||
|
NamespaceIndentation: None
|
||||||
|
ObjCBinPackProtocolList: Auto
|
||||||
|
ObjCBlockIndentWidth: 4
|
||||||
|
ObjCBreakBeforeNestedBlockParam: true
|
||||||
|
ObjCSpaceAfterProperty: false
|
||||||
|
ObjCSpaceBeforeProtocolList: true
|
||||||
|
PenaltyBreakAssignment: 2
|
||||||
|
PenaltyBreakBeforeFirstCallParameter: 19
|
||||||
|
PenaltyBreakComment: 300
|
||||||
|
PenaltyBreakFirstLessLess: 120
|
||||||
|
PenaltyBreakString: 1000
|
||||||
|
PenaltyBreakTemplateDeclaration: 10
|
||||||
|
PenaltyExcessCharacter: 1000000
|
||||||
|
PenaltyReturnTypeOnItsOwnLine: 1000000
|
||||||
|
PenaltyIndentedWhitespace: 0
|
||||||
|
PointerAlignment: Right
|
||||||
|
ReflowComments: true
|
||||||
|
SortIncludes: true
|
||||||
|
SortJavaStaticImport: Before
|
||||||
|
SortUsingDeclarations: true
|
||||||
|
SpaceAfterCStyleCast: false
|
||||||
|
SpaceAfterLogicalNot: false
|
||||||
|
SpaceAfterTemplateKeyword: true
|
||||||
|
SpaceBeforeAssignmentOperators: true
|
||||||
|
SpaceBeforeCaseColon: false
|
||||||
|
SpaceBeforeCpp11BracedList: false
|
||||||
|
SpaceBeforeCtorInitializerColon: true
|
||||||
|
SpaceBeforeInheritanceColon: true
|
||||||
|
SpaceBeforeParens: ControlStatements
|
||||||
|
SpaceAroundPointerQualifiers: Default
|
||||||
|
SpaceBeforeRangeBasedForLoopColon: true
|
||||||
|
SpaceInEmptyBlock: false
|
||||||
|
SpaceInEmptyParentheses: false
|
||||||
|
SpacesBeforeTrailingComments: 1
|
||||||
|
SpacesInAngles: false
|
||||||
|
SpacesInConditionalStatement: false
|
||||||
|
SpacesInContainerLiterals: true
|
||||||
|
SpacesInCStyleCastParentheses: false
|
||||||
|
SpacesInParentheses: false
|
||||||
|
SpacesInSquareBrackets: false
|
||||||
|
SpaceBeforeSquareBrackets: false
|
||||||
|
BitFieldColonSpacing: Both
|
||||||
|
Standard: Latest
|
||||||
|
StatementMacros:
|
||||||
|
- Q_UNUSED
|
||||||
|
- QT_REQUIRE_VERSION
|
||||||
|
TabWidth: 8
|
||||||
|
UseCRLF: false
|
||||||
|
UseTab: Never
|
||||||
|
WhitespaceSensitiveMacros:
|
||||||
|
- STRINGIZE
|
||||||
|
- PP_STRINGIZE
|
||||||
|
- BOOST_PP_STRINGIZE
|
||||||
|
- NS_SWIFT_NAME
|
||||||
|
- CF_SWIFT_NAME
|
||||||
|
...
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
*.dll filter=lfs diff=lfs merge=lfs -text
|
*.dll filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.so filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.so.0 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
|
|
@ -21,6 +21,8 @@ Make sure the `AUDIO` object is created once at the start of your game.
|
||||||
You can use the documented wrapper functions included in the `.yymps` to control audio,
|
You can use the documented wrapper functions included in the `.yymps` to control audio,
|
||||||
or you can just use the C API directly and wrap it yourself.
|
or you can just use the C API directly and wrap it yourself.
|
||||||
|
|
||||||
|
Detailed API documentation can be found [here](http://moonside.games/docs/FAudioGMS/#/latest/).
|
||||||
|
|
||||||
## Platforms
|
## Platforms
|
||||||
|
|
||||||
FAudio itself is cross-platform and has been deployed by hundreds of games across many platforms.
|
FAudio itself is cross-platform and has been deployed by hundreds of games across many platforms.
|
||||||
|
|
|
@ -63,6 +63,7 @@ LOCAL_MODULE := FAudioGMS
|
||||||
# Tell ndk-build we rely on these two fellas:
|
# Tell ndk-build we rely on these two fellas:
|
||||||
LOCAL_SHARED_LIBRARIES := SDL2 FAudio_static
|
LOCAL_SHARED_LIBRARIES := SDL2 FAudio_static
|
||||||
LOCAL_C_INCLUDES := $(SDL_PATH)/include $(FAUDIO_PATH)/include $(FAUDIOGMS_PATH)/src
|
LOCAL_C_INCLUDES := $(SDL_PATH)/include $(FAUDIO_PATH)/include $(FAUDIOGMS_PATH)/src
|
||||||
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
|
||||||
LOCAL_SRC_FILES := $(FAUDIOGMS_PATH)/src/FAudioGMS.c $(LOCAL_PATH)/FAudioGMS_JNI.c
|
LOCAL_SRC_FILES := $(FAUDIOGMS_PATH)/src/FAudioGMS.c $(LOCAL_PATH)/FAudioGMS_JNI.c
|
||||||
|
|
||||||
include $(BUILD_SHARED_LIBRARY)
|
include $(BUILD_SHARED_LIBRARY)
|
||||||
|
|
|
@ -27,6 +27,11 @@
|
||||||
/* These are the Native -> JNI conv wrappers, they must only be built for Android */
|
/* These are the Native -> JNI conv wrappers, they must only be built for Android */
|
||||||
#ifdef __ANDROID__
|
#ifdef __ANDROID__
|
||||||
|
|
||||||
|
/* no mangling please */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
#include <jni.h>
|
#include <jni.h>
|
||||||
#include <FAudioGMS.h>
|
#include <FAudioGMS.h>
|
||||||
|
|
||||||
|
@ -89,23 +94,23 @@ Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1StaticSound_1Destroy
|
||||||
|
|
||||||
JNIEXPORT jdouble JNICALL
|
JNIEXPORT jdouble JNICALL
|
||||||
Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1StreamingSound_1LoadOGG
|
Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1StreamingSound_1LoadOGG
|
||||||
(JNIEnv* jniEnv, jclass jniThis, jstring _filepath)
|
(JNIEnv* jniEnv, jclass jniThis, jstring _filepath, jdouble _bufferSizeInBytes)
|
||||||
{
|
{
|
||||||
jboolean isCopy;
|
jboolean isCopy;
|
||||||
const char* filepath;
|
const char* filepath;
|
||||||
jdouble ret;
|
jdouble ret;
|
||||||
|
|
||||||
filepath = (*jniEnv)->GetStringUTFChars(jniEnv, _filepath, &isCopy);
|
filepath = (*jniEnv)->GetStringUTFChars(jniEnv, _filepath, &isCopy);
|
||||||
ret = FAudioGMS_StreamingSound_LoadOGG((char *)filepath);
|
ret = FAudioGMS_StreamingSound_LoadOGG((char *)filepath, _bufferSizeInBytes);
|
||||||
(*jniEnv)->ReleaseStringUTFChars(jniEnv, _filepath, filepath);
|
(*jniEnv)->ReleaseStringUTFChars(jniEnv, _filepath, filepath);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jdouble JNICALL
|
JNIEXPORT jdouble JNICALL
|
||||||
Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1SoundInstance_1Play
|
Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1SoundInstance_1Play
|
||||||
(JNIEnv* jniEnv, jclass jniThis, jdouble _soundInstanceID, jdouble _loop)
|
(JNIEnv* jniEnv, jclass jniThis, jdouble _soundInstanceID)
|
||||||
{
|
{
|
||||||
FAudioGMS_SoundInstance_Play(_soundInstanceID, _loop);
|
FAudioGMS_SoundInstance_Play(_soundInstanceID);
|
||||||
return NOTHING;
|
return NOTHING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,6 +130,38 @@ Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1SoundInstance_1Stop
|
||||||
return NOTHING;
|
return NOTHING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JNIEXPORT jdouble JNICALL
|
||||||
|
Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1SoundInstance_1QueueSyncPlay
|
||||||
|
(JNIEnv* jniEnv, jclass jniThis, jdouble _soundInstanceID)
|
||||||
|
{
|
||||||
|
FAudioGMS_SoundInstance_QueueSyncPlay(_soundInstanceID);
|
||||||
|
return NOTHING;
|
||||||
|
}
|
||||||
|
|
||||||
|
JNIEXPORT jdouble JNICALL
|
||||||
|
Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1SoundInstance_1SyncPlay
|
||||||
|
(JNIEnv* jniEnv, jclass jniThis)
|
||||||
|
{
|
||||||
|
FAudioGMS_SoundInstance_SyncPlay();
|
||||||
|
return NOTHING;
|
||||||
|
}
|
||||||
|
|
||||||
|
JNIEXPORT jdouble JNICALL
|
||||||
|
Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1SoundInstance_1SetPlayRegion
|
||||||
|
(JNIEnv* jniEnv, jclass jniThis, jdouble _soundInstanceID, jdouble _startInMilliseconds, jdouble _endInMilliseconds)
|
||||||
|
{
|
||||||
|
FAudioGMS_SoundInstance_SetPlayRegion(_soundInstanceID, _startInMilliseconds, _endInMilliseconds);
|
||||||
|
return NOTHING;
|
||||||
|
}
|
||||||
|
|
||||||
|
JNIEXPORT jdouble JNICALL
|
||||||
|
Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1SoundInstance_1SetLoop
|
||||||
|
(JNIEnv* jniEnv, jclass jniThis, jdouble _soundInstanceID, jdouble _loop)
|
||||||
|
{
|
||||||
|
FAudioGMS_SoundInstance_SetLoop(_soundInstanceID, _loop);
|
||||||
|
return NOTHING;
|
||||||
|
}
|
||||||
|
|
||||||
JNIEXPORT jdouble JNICALL
|
JNIEXPORT jdouble JNICALL
|
||||||
Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1SoundInstance_1SetPan
|
Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1SoundInstance_1SetPan
|
||||||
(JNIEnv* jniEnv, jclass jniThis, jdouble _soundInstanceID, jdouble _pan)
|
(JNIEnv* jniEnv, jclass jniThis, jdouble _soundInstanceID, jdouble _pan)
|
||||||
|
@ -165,6 +202,14 @@ Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1SoundInstance_1Set3DVelo
|
||||||
return NOTHING;
|
return NOTHING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JNIEXPORT jdouble JNICALL
|
||||||
|
Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1SoundInstance_1Set3DOrientation
|
||||||
|
(JNIEnv* jniEnv, jclass jniThis, jdouble _soundInstanceID, jdouble _xFront, jdouble _yFront, jdouble _zFront, jdouble _xTop, jdouble _yTop, jdouble _zTop)
|
||||||
|
{
|
||||||
|
FAudioGMS_SoundInstance_Set3DOrientation(_soundInstanceID, _xFront, _yFront, _zFront, _xTop, _yTop, _zTop);
|
||||||
|
return NOTHING;
|
||||||
|
}
|
||||||
|
|
||||||
JNIEXPORT jdouble JNICALL
|
JNIEXPORT jdouble JNICALL
|
||||||
Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1SoundInstance_1SetTrackPositionInSeconds
|
Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1SoundInstance_1SetTrackPositionInSeconds
|
||||||
(JNIEnv* jniEnv, jclass jniThis, jdouble _soundInstanceID, jdouble _trackPositionInSeconds)
|
(JNIEnv* jniEnv, jclass jniThis, jdouble _soundInstanceID, jdouble _trackPositionInSeconds)
|
||||||
|
@ -205,6 +250,14 @@ Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1SoundInstance_1SetBandPa
|
||||||
return NOTHING;
|
return NOTHING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JNIEXPORT jdouble JNICALL
|
||||||
|
Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1SoundInstance_1QueueSoundInstance
|
||||||
|
(JNIEnv* jniEnv, jclass jniThis, jdouble _soundInstanceID, jdouble _queueSoundInstanceID)
|
||||||
|
{
|
||||||
|
FAudioGMS_SoundInstance_QueueSoundInstance(_soundInstanceID, _queueSoundInstanceID);
|
||||||
|
return NOTHING;
|
||||||
|
}
|
||||||
|
|
||||||
JNIEXPORT jdouble JNICALL
|
JNIEXPORT jdouble JNICALL
|
||||||
Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1SoundInstance_1GetPitch
|
Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1SoundInstance_1GetPitch
|
||||||
(JNIEnv* jniEnv, jclass jniThis, jdouble _soundInstanceID)
|
(JNIEnv* jniEnv, jclass jniThis, jdouble _soundInstanceID)
|
||||||
|
@ -298,8 +351,7 @@ Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1EffectChain_1AddReverb
|
||||||
_reverbGain,
|
_reverbGain,
|
||||||
_decayTime,
|
_decayTime,
|
||||||
_density,
|
_density,
|
||||||
_roomSize
|
_roomSize);
|
||||||
);
|
|
||||||
return NOTHING;
|
return NOTHING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -327,6 +379,22 @@ Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1SoundInstance_1SetEffect
|
||||||
return NOTHING;
|
return NOTHING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JNIEXPORT jdouble JNICALL
|
||||||
|
Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1SetMasteringEffectChain
|
||||||
|
(JNIEnv* jniEnv, jclass jniThis, jdouble _effectChainID, double _effectGain)
|
||||||
|
{
|
||||||
|
FAudioGMS_SetMasteringEffectChain(_effectChainID, _effectGain);
|
||||||
|
return NOTHING;
|
||||||
|
}
|
||||||
|
|
||||||
|
JNIEXPORT jdouble JNICALL
|
||||||
|
Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1SetMasteringEffectGain
|
||||||
|
(JNIEnv* jniEnv, jclass jniThis, jdouble _effectGain)
|
||||||
|
{
|
||||||
|
FAudioGMS_SetMasteringEffectGain(_effectGain);
|
||||||
|
return NOTHING;
|
||||||
|
}
|
||||||
|
|
||||||
JNIEXPORT jdouble JNICALL
|
JNIEXPORT jdouble JNICALL
|
||||||
Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1SetListenerPosition
|
Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1SetListenerPosition
|
||||||
(JNIEnv* jniEnv, jclass jniThis, jdouble _x, jdouble _y, jdouble _z)
|
(JNIEnv* jniEnv, jclass jniThis, jdouble _x, jdouble _y, jdouble _z)
|
||||||
|
@ -343,6 +411,14 @@ Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1SetListenerVelocity
|
||||||
return NOTHING;
|
return NOTHING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JNIEXPORT jdouble JNICALL
|
||||||
|
Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1SetListenerOrientation
|
||||||
|
(JNIEnv* jniEnv, jclass jniThis, jdouble _xFront, jdouble _yFront, jdouble _zFront, jdouble _xTop, jdouble _yTop, jdouble _zTop)
|
||||||
|
{
|
||||||
|
FAudioGMS_SetListenerOrientation(_xFront, _yFront, _zFront, _xTop, _yTop, _zTop);
|
||||||
|
return NOTHING;
|
||||||
|
}
|
||||||
|
|
||||||
JNIEXPORT jdouble JNICALL
|
JNIEXPORT jdouble JNICALL
|
||||||
Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1PauseAll
|
Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1PauseAll
|
||||||
(JNIEnv* jniEnv, jclass jniThis)
|
(JNIEnv* jniEnv, jclass jniThis)
|
||||||
|
@ -383,6 +459,10 @@ Java_org_screwyoyo_faudiogms_FAudioGMSNative_FAudioGMS_1Destroy
|
||||||
return NOTHING;
|
return NOTHING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
#endif /* __ANDROID__ */
|
#endif /* __ANDROID__ */
|
||||||
|
|
||||||
/* Do nothing for other platforms, because they, thankly, do not require JNI bindings... */
|
/* Do nothing for other platforms, because they, thankly, do not require JNI bindings... */
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
|
||||||
|
cd /d %~dp0
|
||||||
|
mkdir buildandroid
|
||||||
|
|
||||||
|
call ndk-build NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=Android.mk APP_ABI="armeabi-v7a arm64-v8a x86 x86_64" APP_PLATFORM=android-16 APP_MODULES="SDL2 FAudio_static FAudioGMS" NDK_OUT=buildandroid\obj NDK_LIBS_OUT=buildandroid\lib
|
||||||
|
|
||||||
|
xcopy /e /r /y buildandroid\lib ..\gamemaker\extensions\FAudioGMS\AndroidSource\libs
|
||||||
|
rd /s /q buildandroid
|
|
@ -22,12 +22,14 @@ import android.content.res.AssetManager;
|
||||||
public class FAudioGMSBridge extends FAudioGMSNative implements IExtensionBase
|
public class FAudioGMSBridge extends FAudioGMSNative implements IExtensionBase
|
||||||
{
|
{
|
||||||
public SDLActivity sdl;
|
public SDLActivity sdl;
|
||||||
public boolean paused;
|
public boolean handlenativepause; /* automatically pause all sounds on onPause or not? */
|
||||||
|
public boolean paused; /* are we currently paused */
|
||||||
|
|
||||||
public FAudioGMSBridge()
|
public FAudioGMSBridge()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
paused = false;
|
handlenativepause = true; /* set this to false if you wish to handle pauses manually */
|
||||||
|
paused = false; /* this one must be false at initialization */
|
||||||
SDL.setContext(RunnerJNILib.GetApplicationContext());
|
SDL.setContext(RunnerJNILib.GetApplicationContext());
|
||||||
sdl = new SDLActivity();
|
sdl = new SDLActivity();
|
||||||
}
|
}
|
||||||
|
@ -62,7 +64,7 @@ public class FAudioGMSBridge extends FAudioGMSNative implements IExtensionBase
|
||||||
public void onPause()
|
public void onPause()
|
||||||
{
|
{
|
||||||
sdl.onPause();
|
sdl.onPause();
|
||||||
if (!paused)
|
if (handlenativepause && !paused)
|
||||||
{
|
{
|
||||||
paused = true;
|
paused = true;
|
||||||
FAudioGMS_PauseAll();
|
FAudioGMS_PauseAll();
|
||||||
|
@ -72,7 +74,7 @@ public class FAudioGMSBridge extends FAudioGMSNative implements IExtensionBase
|
||||||
public void onResume()
|
public void onResume()
|
||||||
{
|
{
|
||||||
sdl.onResume();
|
sdl.onResume();
|
||||||
if (paused)
|
if (handlenativepause && paused)
|
||||||
{
|
{
|
||||||
paused = false;
|
paused = false;
|
||||||
FAudioGMS_ResumeAll();
|
FAudioGMS_ResumeAll();
|
||||||
|
|
|
@ -12,27 +12,74 @@ public class FAudioGMSNative
|
||||||
/* exactly as in FAudioGMS_JNI.c: */
|
/* exactly as in FAudioGMS_JNI.c: */
|
||||||
public native double FAudioGMS_Init(double spatialDistanceScale, double timestep);
|
public native double FAudioGMS_Init(double spatialDistanceScale, double timestep);
|
||||||
|
|
||||||
public native double FAudioGMS_StaticSound_LoadWAV(String filePath);
|
public native double FAudioGMS_StaticSound_LoadWAV(
|
||||||
public native double FAudioGMS_StaticSound_CreateSoundInstance(double staticSoundID);
|
String filePath); /* returns a static sound ID */
|
||||||
|
public native double FAudioGMS_StaticSound_CreateSoundInstance(
|
||||||
|
double staticSoundID); /* returns a sound instance ID */
|
||||||
public native double FAudioGMS_StaticSound_Destroy(double staticSoundID);
|
public native double FAudioGMS_StaticSound_Destroy(double staticSoundID);
|
||||||
|
|
||||||
public native double FAudioGMS_StreamingSound_LoadOGG(String filepath);
|
/* returns a sound instance ID */
|
||||||
|
public native double FAudioGMS_StreamingSound_LoadOGG(
|
||||||
|
String filepath,
|
||||||
|
double bufferSizeInBytes); /* if 0 is passed we will use a sensible default*/
|
||||||
|
|
||||||
public native double FAudioGMS_SoundInstance_Play(double soundInstanceID, double loop);
|
public native double FAudioGMS_SoundInstance_Play(double soundInstanceID);
|
||||||
public native double FAudioGMS_SoundInstance_Pause(double soundInstanceID);
|
public native double FAudioGMS_SoundInstance_Pause(double soundInstanceID);
|
||||||
public native double FAudioGMS_SoundInstance_Stop(double soundInstanceID);
|
public native double FAudioGMS_SoundInstance_Stop(double soundInstanceID);
|
||||||
|
|
||||||
|
public native double FAudioGMS_SoundInstance_QueueSyncPlay(double soundInstanceID);
|
||||||
|
public native double FAudioGMS_SoundInstance_SyncPlay();
|
||||||
|
|
||||||
|
public native double FAudioGMS_SoundInstance_SetPlayRegion(
|
||||||
|
double soundInstanceID,
|
||||||
|
double startInMilliseconds,
|
||||||
|
double endInMilliseconds);
|
||||||
|
public native double FAudioGMS_SoundInstance_SetLoop(double soundInstanceID, double loop);
|
||||||
public native double FAudioGMS_SoundInstance_SetPan(double soundInstanceID, double pan);
|
public native double FAudioGMS_SoundInstance_SetPan(double soundInstanceID, double pan);
|
||||||
public native double FAudioGMS_SoundInstance_SetPitch(double soundInstanceID, double pitch);
|
public native double FAudioGMS_SoundInstance_SetPitch(double soundInstanceID, double pitch);
|
||||||
public native double FAudioGMS_SoundInstance_SetVolume(double soundInstanceID, double volume);
|
public native double FAudioGMS_SoundInstance_SetVolume(double soundInstanceID, double volume);
|
||||||
public native double FAudioGMS_SoundInstance_Set3DPosition(double soundInstanceID, double x, double y, double z);
|
public native double FAudioGMS_SoundInstance_Set3DPosition(
|
||||||
public native double FAudioGMS_SoundInstance_Set3DVelocity(double soundInstanceID, double xVelocity, double yVelocity, double zVelocity);
|
double soundInstanceID,
|
||||||
public native double FAudioGMS_SoundInstance_SetTrackPositionInSeconds(double soundInstanceID, double trackPositionInSeconds);
|
double x,
|
||||||
public native double FAudioGMS_SoundInstance_SetVolumeOverTime(double soundInstanceID, double volume, double milliseconds);
|
double y,
|
||||||
public native double FAudioGMS_SoundInstance_SetLowPassFilter(double soundInstanceID, double lowPassFilter, double Q);
|
double z);
|
||||||
public native double FAudioGMS_SoundInstance_SetHighPassFilter(double soundInstanceID, double highPassFilter, double Q);
|
public native double FAudioGMS_SoundInstance_Set3DVelocity(
|
||||||
public native double FAudioGMS_SoundInstance_SetBandPassFilter(double soundInstanceID, double bandPassFilter, double Q);
|
double soundInstanceID,
|
||||||
|
double xVelocity,
|
||||||
|
double yVelocity,
|
||||||
|
double zVelocity);
|
||||||
|
public native double FAudioGMS_SoundInstance_Set3DOrientation(
|
||||||
|
double soundInstanceID,
|
||||||
|
double xFront,
|
||||||
|
double yFront,
|
||||||
|
double zFront,
|
||||||
|
double xTop,
|
||||||
|
double yTop,
|
||||||
|
double zTop);
|
||||||
|
public native double FAudioGMS_SoundInstance_SetTrackPositionInSeconds(
|
||||||
|
double soundInstanceID,
|
||||||
|
double trackPositionInSeconds);
|
||||||
|
public native double FAudioGMS_SoundInstance_SetVolumeOverTime(
|
||||||
|
double soundInstanceID,
|
||||||
|
double volume,
|
||||||
|
double milliseconds);
|
||||||
|
public native double FAudioGMS_SoundInstance_SetLowPassFilter(
|
||||||
|
double soundInstanceID,
|
||||||
|
double lowPassFilter,
|
||||||
|
double Q);
|
||||||
|
public native double FAudioGMS_SoundInstance_SetHighPassFilter(
|
||||||
|
double soundInstanceID,
|
||||||
|
double highPassFilter,
|
||||||
|
double Q);
|
||||||
|
public native double FAudioGMS_SoundInstance_SetBandPassFilter(
|
||||||
|
double soundInstanceID,
|
||||||
|
double bandPassFilter,
|
||||||
|
double Q);
|
||||||
|
|
||||||
|
public native double FAudioGMS_SoundInstance_QueueSoundInstance(
|
||||||
|
double soundInstanceID,
|
||||||
|
double queueSoundInstanceID);
|
||||||
|
|
||||||
public native double FAudioGMS_SoundInstance_GetPitch(double soundInstanceID);
|
public native double FAudioGMS_SoundInstance_GetPitch(double soundInstanceID);
|
||||||
public native double FAudioGMS_SoundInstance_GetVolume(double soundInstanceID);
|
public native double FAudioGMS_SoundInstance_GetVolume(double soundInstanceID);
|
||||||
public native double FAudioGMS_SoundInstance_GetTrackLengthInSeconds(double soundInstanceID);
|
public native double FAudioGMS_SoundInstance_GetTrackLengthInSeconds(double soundInstanceID);
|
||||||
|
@ -58,22 +105,41 @@ public class FAudioGMSNative
|
||||||
double reverbGain,
|
double reverbGain,
|
||||||
double decayTime,
|
double decayTime,
|
||||||
double density,
|
double density,
|
||||||
double roomSize
|
double roomSize);
|
||||||
);
|
|
||||||
public native double FAudioGMS_EffectChain_Destroy(double effectChainID);
|
public native double FAudioGMS_EffectChain_Destroy(double effectChainID);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NOTE: Any changes to the effect chain will NOT apply after this is set!
|
* NOTE: Any changes to the effect chain will NOT apply after this is set!
|
||||||
* You MUST call SetEffectChain again if you make changes to the effect chain parameters!
|
* You MUST call SetEffectChain again if you make changes to the effect
|
||||||
|
* chain parameters!
|
||||||
*/
|
*/
|
||||||
public native double FAudioGMS_SoundInstance_SetEffectChain(double soundInstanceID, double effectChainID, double effectGain);
|
public native double FAudioGMS_SoundInstance_SetEffectChain(
|
||||||
public native double FAudioGMS_SoundInstance_SetEffectGain(double soundInstanceID, double effectGain);
|
double soundInstanceID,
|
||||||
|
double effectChainID,
|
||||||
|
double effectGain);
|
||||||
|
public native double FAudioGMS_SoundInstance_SetEffectGain(
|
||||||
|
double soundInstanceID,
|
||||||
|
double effectGain);
|
||||||
|
|
||||||
|
public native double FAudioGMS_SetMasteringEffectChain(double effectChainID, double effectGain);
|
||||||
|
public native double FAudioGMS_SetMasteringEffectGain(double effectGain);
|
||||||
|
|
||||||
public native double FAudioGMS_SetListenerPosition(double x, double y, double z);
|
public native double FAudioGMS_SetListenerPosition(double x, double y, double z);
|
||||||
public native double FAudioGMS_SetListenerVelocity(double xVelocity, double yVelocity, double zVelocity);
|
public native double FAudioGMS_SetListenerVelocity(
|
||||||
|
double xVelocity,
|
||||||
|
double yVelocity,
|
||||||
|
double zVelocity);
|
||||||
|
public native double FAudioGMS_SetListenerOrientation(
|
||||||
|
double xFront,
|
||||||
|
double yFront,
|
||||||
|
double zFront,
|
||||||
|
double xTop,
|
||||||
|
double yTop,
|
||||||
|
double zTop);
|
||||||
|
|
||||||
public native double FAudioGMS_PauseAll(); /* mobile platforms, man... */
|
public native double FAudioGMS_PauseAll(); /* useful for mobile platforms, etc
|
||||||
public native double FAudioGMS_ResumeAll(); /* same thing here */
|
*/
|
||||||
|
public native double FAudioGMS_ResumeAll(); /* same as above */
|
||||||
public native double FAudioGMS_StopAll();
|
public native double FAudioGMS_StopAll();
|
||||||
|
|
||||||
public native double FAudioGMS_Update();
|
public native double FAudioGMS_Update();
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
gamemaker/extensions/FAudioGMS/FAudioGMS.dll (Stored with Git LFS)
BIN
gamemaker/extensions/FAudioGMS/FAudioGMS.dll (Stored with Git LFS)
Binary file not shown.
|
@ -7,7 +7,7 @@
|
||||||
"packageId": "",
|
"packageId": "",
|
||||||
"productId": "",
|
"productId": "",
|
||||||
"author": "",
|
"author": "",
|
||||||
"date": "2021-10-22T04:46:44.6241287+05:00",
|
"date": "2021-10-21T16:46:44.6241287-07:00",
|
||||||
"license": "",
|
"license": "",
|
||||||
"description": "",
|
"description": "",
|
||||||
"helpfile": "",
|
"helpfile": "",
|
||||||
|
@ -25,8 +25,7 @@
|
||||||
{"externalName":"FAudioGMS_StaticSound_LoadWAV","kind":1,"help":"FAudioGMS_StaticSound_LoadWAV(filePath)","hidden":false,"returnType":2,"argCount":0,"args":[
|
{"externalName":"FAudioGMS_StaticSound_LoadWAV","kind":1,"help":"FAudioGMS_StaticSound_LoadWAV(filePath)","hidden":false,"returnType":2,"argCount":0,"args":[
|
||||||
1,
|
1,
|
||||||
],"resourceVersion":"1.0","name":"FAudioGMS_StaticSound_LoadWAV","tags":[],"resourceType":"GMExtensionFunction",},
|
],"resourceVersion":"1.0","name":"FAudioGMS_StaticSound_LoadWAV","tags":[],"resourceType":"GMExtensionFunction",},
|
||||||
{"externalName":"FAudioGMS_SoundInstance_Play","kind":1,"help":"FAudioGMS_SoundInstance_Play(id, loop)","hidden":false,"returnType":2,"argCount":0,"args":[
|
{"externalName":"FAudioGMS_SoundInstance_Play","kind":1,"help":"FAudioGMS_SoundInstance_Play(id)","hidden":false,"returnType":2,"argCount":0,"args":[
|
||||||
2,
|
|
||||||
2,
|
2,
|
||||||
],"resourceVersion":"1.0","name":"FAudioGMS_SoundInstance_Play","tags":[],"resourceType":"GMExtensionFunction",},
|
],"resourceVersion":"1.0","name":"FAudioGMS_SoundInstance_Play","tags":[],"resourceType":"GMExtensionFunction",},
|
||||||
{"externalName":"FAudioGMS_SoundInstance_Pause","kind":1,"help":"FAudioGMS_SoundInstance_Pause(id)","hidden":false,"returnType":2,"argCount":0,"args":[
|
{"externalName":"FAudioGMS_SoundInstance_Pause","kind":1,"help":"FAudioGMS_SoundInstance_Pause(id)","hidden":false,"returnType":2,"argCount":0,"args":[
|
||||||
|
@ -56,8 +55,9 @@
|
||||||
2,
|
2,
|
||||||
2,
|
2,
|
||||||
],"resourceVersion":"1.0","name":"FAudioGMS_SetListenerPosition","tags":[],"resourceType":"GMExtensionFunction",},
|
],"resourceVersion":"1.0","name":"FAudioGMS_SetListenerPosition","tags":[],"resourceType":"GMExtensionFunction",},
|
||||||
{"externalName":"FAudioGMS_StreamingSound_LoadOGG","kind":1,"help":"FAudioGMS_StreamingSound_LoadOGG(filePath)","hidden":false,"returnType":2,"argCount":0,"args":[
|
{"externalName":"FAudioGMS_StreamingSound_LoadOGG","kind":1,"help":"FAudioGMS_StreamingSound_LoadOGG(filePath, bufferSizeInBytes)","hidden":false,"returnType":2,"argCount":0,"args":[
|
||||||
1,
|
1,
|
||||||
|
2,
|
||||||
],"resourceVersion":"1.0","name":"FAudioGMS_StreamingSound_LoadOGG","tags":[],"resourceType":"GMExtensionFunction",},
|
],"resourceVersion":"1.0","name":"FAudioGMS_StreamingSound_LoadOGG","tags":[],"resourceType":"GMExtensionFunction",},
|
||||||
{"externalName":"FAudioGMS_SoundInstance_SetPan","kind":1,"help":"FAudioGMS_SoundInstance_SetPan(soundInstanceID, pan)","hidden":false,"returnType":2,"argCount":0,"args":[
|
{"externalName":"FAudioGMS_SoundInstance_SetPan","kind":1,"help":"FAudioGMS_SoundInstance_SetPan(soundInstanceID, pan)","hidden":false,"returnType":2,"argCount":0,"args":[
|
||||||
2,
|
2,
|
||||||
|
@ -77,10 +77,10 @@
|
||||||
2,
|
2,
|
||||||
],"resourceVersion":"1.0","name":"FAudioGMS_SoundInstance_SetVolumeOverTime","tags":[],"resourceType":"GMExtensionFunction",},
|
],"resourceVersion":"1.0","name":"FAudioGMS_SoundInstance_SetVolumeOverTime","tags":[],"resourceType":"GMExtensionFunction",},
|
||||||
{"externalName":"FAudioGMS_StopAll","kind":1,"help":"FAudioGMS_StopAll()","hidden":false,"returnType":2,"argCount":0,"args":[],"resourceVersion":"1.0","name":"FAudioGMS_StopAll","tags":[],"resourceType":"GMExtensionFunction",},
|
{"externalName":"FAudioGMS_StopAll","kind":1,"help":"FAudioGMS_StopAll()","hidden":false,"returnType":2,"argCount":0,"args":[],"resourceVersion":"1.0","name":"FAudioGMS_StopAll","tags":[],"resourceType":"GMExtensionFunction",},
|
||||||
{"externalName":"FAudioGMS_SoundInstance_SetTrackPosition","kind":1,"help":"FAudioGMS_SoundInstance_SetTrackPosition(soundInstanceID, trackPositionInSeconds)","hidden":false,"returnType":2,"argCount":0,"args":[
|
{"externalName":"FAudioGMS_SoundInstance_SetTrackPositionInSeconds","kind":1,"help":"FAudioGMS_SoundInstance_SetTrackPositionInSeconds(soundInstanceID, trackPositionInSeconds)","hidden":false,"returnType":2,"argCount":0,"args":[
|
||||||
2,
|
2,
|
||||||
2,
|
2,
|
||||||
],"resourceVersion":"1.0","name":"FAudioGMS_SoundInstance_SetTrackPosition","tags":[],"resourceType":"GMExtensionFunction",},
|
],"resourceVersion":"1.0","name":"FAudioGMS_SoundInstance_SetTrackPositionInSeconds","tags":[],"resourceType":"GMExtensionFunction",},
|
||||||
{"externalName":"FAudioGMS_SoundInstance_GetTrackLengthInSeconds","kind":1,"help":"FAudioGMS_SoundInstance_GetTrackLengthInSeconds(soundInstanceID)","hidden":false,"returnType":2,"argCount":0,"args":[
|
{"externalName":"FAudioGMS_SoundInstance_GetTrackLengthInSeconds","kind":1,"help":"FAudioGMS_SoundInstance_GetTrackLengthInSeconds(soundInstanceID)","hidden":false,"returnType":2,"argCount":0,"args":[
|
||||||
2,
|
2,
|
||||||
],"resourceVersion":"1.0","name":"FAudioGMS_SoundInstance_GetTrackLengthInSeconds","tags":[],"resourceType":"GMExtensionFunction",},
|
],"resourceVersion":"1.0","name":"FAudioGMS_SoundInstance_GetTrackLengthInSeconds","tags":[],"resourceType":"GMExtensionFunction",},
|
||||||
|
@ -157,10 +157,51 @@
|
||||||
],"resourceVersion":"1.0","name":"FAudioGMS_SetListenerVelocity","tags":[],"resourceType":"GMExtensionFunction",},
|
],"resourceVersion":"1.0","name":"FAudioGMS_SetListenerVelocity","tags":[],"resourceType":"GMExtensionFunction",},
|
||||||
{"externalName":"FAudioGMS_PauseAll","kind":1,"help":"FAudioGMS_PauseAll()","hidden":false,"returnType":2,"argCount":0,"args":[],"resourceVersion":"1.0","name":"FAudioGMS_PauseAll","tags":[],"resourceType":"GMExtensionFunction",},
|
{"externalName":"FAudioGMS_PauseAll","kind":1,"help":"FAudioGMS_PauseAll()","hidden":false,"returnType":2,"argCount":0,"args":[],"resourceVersion":"1.0","name":"FAudioGMS_PauseAll","tags":[],"resourceType":"GMExtensionFunction",},
|
||||||
{"externalName":"FAudioGMS_ResumeAll","kind":1,"help":"FAudioGMS_ResumeAll()","hidden":false,"returnType":2,"argCount":0,"args":[],"resourceVersion":"1.0","name":"FAudioGMS_ResumeAll","tags":[],"resourceType":"GMExtensionFunction",},
|
{"externalName":"FAudioGMS_ResumeAll","kind":1,"help":"FAudioGMS_ResumeAll()","hidden":false,"returnType":2,"argCount":0,"args":[],"resourceVersion":"1.0","name":"FAudioGMS_ResumeAll","tags":[],"resourceType":"GMExtensionFunction",},
|
||||||
|
{"externalName":"FAudioGMS_SoundInstance_SetPlayRegion","kind":1,"help":"FAudioGMS_SoundInstance_SetPlayRegion(soundInstanceID, startInMilliseconds, endInMilliseconds)","hidden":false,"returnType":2,"argCount":0,"args":[
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
],"resourceVersion":"1.0","name":"FAudioGMS_SoundInstance_SetPlayRegion","tags":[],"resourceType":"GMExtensionFunction",},
|
||||||
|
{"externalName":"FAudioGMS_SetMasteringEffectChain","kind":1,"help":"FAudioGMS_SetMasteringEffectChain(effectChainID, effectGain)","hidden":false,"returnType":2,"argCount":0,"args":[
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
],"resourceVersion":"1.0","name":"FAudioGMS_SetMasteringEffectChain","tags":[],"resourceType":"GMExtensionFunction",},
|
||||||
|
{"externalName":"FAudioGMS_SetMasteringEffectGain","kind":1,"help":"FAudioGMS_SetMasteringEffectGain(effectGain)","hidden":false,"returnType":2,"argCount":0,"args":[
|
||||||
|
2,
|
||||||
|
],"resourceVersion":"1.0","name":"FAudioGMS_SetMasteringEffectGain","tags":[],"resourceType":"GMExtensionFunction",},
|
||||||
|
{"externalName":"FAudioGMS_SoundInstance_SetLoop","kind":1,"help":"FAudioGMS_SoundInstance_SetLoop(soundInstanceID, loop)","hidden":false,"returnType":2,"argCount":0,"args":[
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
],"resourceVersion":"1.0","name":"FAudioGMS_SoundInstance_SetLoop","tags":[],"resourceType":"GMExtensionFunction",},
|
||||||
|
{"externalName":"FAudioGMS_SoundInstance_QueueSoundInstance","kind":1,"help":"FAudioGMS_SoundInstance_QueueSoundInstance(soundInstanceID, queueSoundInstanceID)","hidden":false,"returnType":2,"argCount":0,"args":[
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
],"resourceVersion":"1.0","name":"FAudioGMS_SoundInstance_QueueSoundInstance","tags":[],"resourceType":"GMExtensionFunction",},
|
||||||
|
{"externalName":"FAudioGMS_SoundInstance_QueueSyncPlay","kind":1,"help":"FAudioGMS_SoundInstance_QueueSyncPlay(soundInstanceID)","hidden":false,"returnType":2,"argCount":0,"args":[
|
||||||
|
2,
|
||||||
|
],"resourceVersion":"1.0","name":"FAudioGMS_SoundInstance_QueueSyncPlay","tags":[],"resourceType":"GMExtensionFunction",},
|
||||||
|
{"externalName":"FAudioGMS_SoundInstance_SyncPlay","kind":1,"help":"FAudioGMS_SoundInstance_SyncPlay()","hidden":false,"returnType":2,"argCount":0,"args":[],"resourceVersion":"1.0","name":"FAudioGMS_SoundInstance_SyncPlay","tags":[],"resourceType":"GMExtensionFunction",},
|
||||||
|
{"externalName":"FAudioGMS_SoundInstance_Set3DOrientation","kind":1,"help":"FAudioGMS_SoundInstance_Set3DOrientation(soundInstanceID, xFront, yFront, zFront, xTop, yTop, zTop)","hidden":false,"returnType":2,"argCount":0,"args":[
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
],"resourceVersion":"1.0","name":"FAudioGMS_SoundInstance_Set3DOrientation","tags":[],"resourceType":"GMExtensionFunction",},
|
||||||
|
{"externalName":"FAudioGMS_SetListenerOrientation","kind":1,"help":"FAudioGMS_SetListenerOrientation(xFront, yFront, zFront, xTop, yTop, zTop)","hidden":false,"returnType":2,"argCount":0,"args":[
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
],"resourceVersion":"1.0","name":"FAudioGMS_SetListenerOrientation","tags":[],"resourceType":"GMExtensionFunction",},
|
||||||
],"constants":[],"ProxyFiles":[
|
],"constants":[],"ProxyFiles":[
|
||||||
{"TargetMask":7,"resourceVersion":"1.0","name":"libFAudioGMS.so","tags":[],"resourceType":"GMProxyFile",},
|
{"TargetMask":7,"resourceVersion":"1.0","name":"libFAudioGMS.so","tags":[],"resourceType":"GMProxyFile",},
|
||||||
{"TargetMask":7,"resourceVersion":"1.0","name":"libSDL2.so","tags":[],"resourceType":"GMProxyFile",},
|
|
||||||
{"TargetMask":3,"resourceVersion":"1.0","name":"FAudioGMSAndroidDummy.ext","tags":[],"resourceType":"GMProxyFile",},
|
{"TargetMask":3,"resourceVersion":"1.0","name":"FAudioGMSAndroidDummy.ext","tags":[],"resourceType":"GMProxyFile",},
|
||||||
|
{"TargetMask":7,"resourceVersion":"1.0","name":"libSDL2-2.0.so.0","tags":[],"resourceType":"GMProxyFile",},
|
||||||
],"copyToTargets":200,"order":[
|
],"copyToTargets":200,"order":[
|
||||||
{"name":"FAudioGMS_Init","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_Init","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
{"name":"FAudioGMS_StaticSound_LoadWAV","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_StaticSound_LoadWAV","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
|
@ -170,12 +211,17 @@
|
||||||
{"name":"FAudioGMS_SoundInstance_Play","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_SoundInstance_Play","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
{"name":"FAudioGMS_SoundInstance_Pause","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_SoundInstance_Pause","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
{"name":"FAudioGMS_SoundInstance_Stop","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_SoundInstance_Stop","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
|
{"name":"FAudioGMS_SoundInstance_QueueSyncPlay","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
|
{"name":"FAudioGMS_SoundInstance_SyncPlay","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
|
{"name":"FAudioGMS_SoundInstance_SetLoop","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
{"name":"FAudioGMS_SoundInstance_SetPan","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_SoundInstance_SetPan","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
{"name":"FAudioGMS_SoundInstance_SetPitch","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_SoundInstance_SetPitch","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
{"name":"FAudioGMS_SoundInstance_SetVolume","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_SoundInstance_SetVolume","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
{"name":"FAudioGMS_SoundInstance_Set3DPosition","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_SoundInstance_Set3DPosition","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
{"name":"FAudioGMS_SoundInstance_Set3DVelocity","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_SoundInstance_Set3DVelocity","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
{"name":"FAudioGMS_SoundInstance_SetTrackPosition","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_SoundInstance_Set3DOrientation","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
|
{"name":"FAudioGMS_SoundInstance_SetTrackPositionInSeconds","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
|
{"name":"FAudioGMS_SoundInstance_SetPlayRegion","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
{"name":"FAudioGMS_SoundInstance_SetVolumeOverTime","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_SoundInstance_SetVolumeOverTime","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
{"name":"FAudioGMS_SoundInstance_SetLowPassFilter","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_SoundInstance_SetLowPassFilter","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
{"name":"FAudioGMS_SoundInstance_SetHighPassFilter","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_SoundInstance_SetHighPassFilter","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
|
@ -184,6 +230,7 @@
|
||||||
{"name":"FAudioGMS_SoundInstance_GetVolume","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_SoundInstance_GetVolume","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
{"name":"FAudioGMS_SoundInstance_GetTrackLengthInSeconds","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_SoundInstance_GetTrackLengthInSeconds","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
{"name":"FAudioGMS_SoundInstance_GetTrackPositionInSeconds","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_SoundInstance_GetTrackPositionInSeconds","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
|
{"name":"FAudioGMS_SoundInstance_QueueSoundInstance","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
{"name":"FAudioGMS_SoundInstance_Destroy","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_SoundInstance_Destroy","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
{"name":"FAudioGMS_SoundInstance_DestroyWhenFinished","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_SoundInstance_DestroyWhenFinished","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
{"name":"FAudioGMS_EffectChain_Create","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_EffectChain_Create","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
|
@ -192,8 +239,11 @@
|
||||||
{"name":"FAudioGMS_EffectChain_Destroy","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_EffectChain_Destroy","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
{"name":"FAudioGMS_SoundInstance_SetEffectChain","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_SoundInstance_SetEffectChain","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
{"name":"FAudioGMS_SoundInstance_SetEffectGain","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_SoundInstance_SetEffectGain","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
|
{"name":"FAudioGMS_SetMasteringEffectChain","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
|
{"name":"FAudioGMS_SetMasteringEffectGain","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
{"name":"FAudioGMS_SetListenerPosition","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_SetListenerPosition","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
{"name":"FAudioGMS_SetListenerVelocity","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_SetListenerVelocity","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
|
{"name":"FAudioGMS_SetListenerOrientation","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
{"name":"FAudioGMS_ResumeAll","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_ResumeAll","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
{"name":"FAudioGMS_PauseAll","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_PauseAll","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
{"name":"FAudioGMS_StopAll","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
{"name":"FAudioGMS_StopAll","path":"extensions/FAudioGMS/FAudioGMS.yy",},
|
||||||
|
@ -242,4 +292,4 @@
|
||||||
"name": "FAudioGMS",
|
"name": "FAudioGMS",
|
||||||
"tags": [],
|
"tags": [],
|
||||||
"resourceType": "GMExtension",
|
"resourceType": "GMExtension",
|
||||||
}
|
}
|
Binary file not shown.
Binary file not shown.
|
@ -1 +1,17 @@
|
||||||
|
/// @description Clean up all resources when the game is about to end.
|
||||||
|
|
||||||
|
/* Destroy sound instances first: */
|
||||||
|
// sndInst.Stop();
|
||||||
|
// sndInst.Destroy();
|
||||||
|
// sndInst = undefined;
|
||||||
|
|
||||||
|
/* Only then destroy static sounds: */
|
||||||
|
// snd.Destroy();
|
||||||
|
// snd = undefined;
|
||||||
|
|
||||||
|
/* And only then, destroy effect chains */
|
||||||
|
effChain.Destroy();
|
||||||
|
effChain = undefined;
|
||||||
|
|
||||||
|
/* Finish up the system */
|
||||||
FAudioGMS_Destroy();
|
FAudioGMS_Destroy();
|
||||||
|
|
|
@ -1,6 +1,15 @@
|
||||||
|
/// @description Initialize audio.
|
||||||
|
|
||||||
|
/* First initialize the system: */
|
||||||
var spatialDistanceScale = 50; // makes "3D" audio louder
|
var spatialDistanceScale = 50; // makes "3D" audio louder
|
||||||
FAudioGMS_Init(spatialDistanceScale, 1 / 60);
|
var timestep = game_get_speed(gamespeed_microseconds) / 1000000; // default, autodetect from GM timestep.
|
||||||
|
FAudioGMS_Init(spatialDistanceScale, timestep);
|
||||||
|
|
||||||
/* Init Effects Chains Here */
|
/* Init Effects Chains Here */
|
||||||
|
effChain = new EffectChain();
|
||||||
|
effChain.AddDefaultReverb();
|
||||||
|
|
||||||
/* Load Audio Assets Here */
|
/* Load Audio Assets Here */
|
||||||
|
// snd = LoadStaticSound("go-go-go-tigerblood.wav");
|
||||||
|
// sndInst = snd.Play();
|
||||||
|
// sndInst.SetEffectChain(effChain, 1); // apply default reverb to the instance.
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
FAudioGMS_Update();
|
/// @description MUST be called once per frame!
|
||||||
|
FAudioGMS_Update();
|
||||||
|
|
|
@ -18,20 +18,33 @@ function LoadStaticSound(filename)
|
||||||
function StaticSound(_staticSoundID) constructor
|
function StaticSound(_staticSoundID) constructor
|
||||||
{
|
{
|
||||||
staticSoundID = _staticSoundID;
|
staticSoundID = _staticSoundID;
|
||||||
|
|
||||||
// Returns a sound instance!
|
// Create a sound instance from this static sound.
|
||||||
// MUST be destroyed when you aren't referencing it any more or you will leak memory!
|
static CreateSoundInstance = function()
|
||||||
static Play = function(pan = 0, pitch = 1, volume = 1, loop = false)
|
|
||||||
{
|
{
|
||||||
var instanceID = FAudioGMS_StaticSound_CreateSoundInstance(staticSoundID);
|
var instanceID = FAudioGMS_StaticSound_CreateSoundInstance(staticSoundID);
|
||||||
var instance = new SoundInstance(instanceID);
|
var instance = new SoundInstance(instanceID);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Plays and returns a sound instance!
|
||||||
|
// MUST be destroyed when you aren't referencing it any more or you will leak memory!
|
||||||
|
static Play = function(pan = 0, pitch = 1, volume = 1, loop = false, loopStartInMilliseconds = 0, loopEndInMilliseconds = 0)
|
||||||
|
{
|
||||||
|
var instanceID = FAudioGMS_StaticSound_CreateSoundInstance(staticSoundID);
|
||||||
|
var instance = new SoundInstance(instanceID);
|
||||||
|
instance.SetLoop(loop);
|
||||||
|
if (loop)
|
||||||
|
{
|
||||||
|
instance.SetPlayRegion(loopStartInMilliseconds, loopEndInMilliseconds);
|
||||||
|
}
|
||||||
instance.SetPan(pan);
|
instance.SetPan(pan);
|
||||||
instance.SetPitch(pitch);
|
instance.SetPitch(pitch);
|
||||||
instance.SetVolume(volume);
|
instance.SetVolume(volume);
|
||||||
instance.Play(loop);
|
instance.Play();
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Automatically destroys the SoundInstance when playback is finished.
|
// Automatically destroys the SoundInstance when playback is finished.
|
||||||
// Does NOT return an instance!
|
// Does NOT return an instance!
|
||||||
static PlayOneOff = function(pan = 0, pitch = 1, volume = 1)
|
static PlayOneOff = function(pan = 0, pitch = 1, volume = 1)
|
||||||
|
@ -39,20 +52,21 @@ function StaticSound(_staticSoundID) constructor
|
||||||
var instance = Play(pan, pitch, volume, false);
|
var instance = Play(pan, pitch, volume, false);
|
||||||
instance.DestroyWhenFinished();
|
instance.DestroyWhenFinished();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns a sound instance!
|
// Plays and returns a sound instance!
|
||||||
// MUST be destroyed when you aren't referencing it any more or you will leak memory!
|
// MUST be destroyed when you aren't referencing it any more or you will leak memory!
|
||||||
static PlaySpatial = function(xPosition, yPosition, zPosition, pitch = 1, volume = 1, loop = false)
|
static PlaySpatial = function(xPosition, yPosition, zPosition, pitch = 1, volume = 1, loop = false)
|
||||||
{
|
{
|
||||||
var instanceID = FAudioGMS_StaticSound_CreateSoundInstance(staticSoundID);
|
var instanceID = FAudioGMS_StaticSound_CreateSoundInstance(staticSoundID);
|
||||||
var instance = new SoundInstance(instanceID);
|
var instance = new SoundInstance(instanceID);
|
||||||
|
instance.SetLoop(loop);
|
||||||
instance.Set3DPosition(xPosition, yPosition, zPosition);
|
instance.Set3DPosition(xPosition, yPosition, zPosition);
|
||||||
instance.SetPitch(pitch);
|
instance.SetPitch(pitch);
|
||||||
instance.SetVolume(volume);
|
instance.SetVolume(volume);
|
||||||
instance.Play(loop);
|
instance.Play(loop);
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Automatically destroys the SoundInstance when playback is finished.
|
// Automatically destroys the SoundInstance when playback is finished.
|
||||||
// Does NOT return an instance!
|
// Does NOT return an instance!
|
||||||
static PlaySpatialOneOff = function(xPosition, yPosition, zPosition, pitch = 1, volume = 1)
|
static PlaySpatialOneOff = function(xPosition, yPosition, zPosition, pitch = 1, volume = 1)
|
||||||
|
@ -66,7 +80,7 @@ function StaticSound(_staticSoundID) constructor
|
||||||
// If you call this while there are still instances of the StaticSound, you are going to have a bad time.
|
// If you call this while there are still instances of the StaticSound, you are going to have a bad time.
|
||||||
static Destroy = function()
|
static Destroy = function()
|
||||||
{
|
{
|
||||||
FAudioGMS_StaticSound_Destroy(staticSoundID);
|
FAudioGMS_StaticSound_Destroy(staticSoundID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,10 +88,10 @@ function StaticSound(_staticSoundID) constructor
|
||||||
// The audio is streamed off the disk, so only a small amount of memory is used at a time.
|
// The audio is streamed off the disk, so only a small amount of memory is used at a time.
|
||||||
// Good for things like music or voiceover playback.
|
// Good for things like music or voiceover playback.
|
||||||
// Note that StreamingSounds are SoundInstances.
|
// Note that StreamingSounds are SoundInstances.
|
||||||
function LoadStreamingSound(filename)
|
function LoadStreamingSound(filename, bufferSizeInBytes = 0)
|
||||||
{
|
{
|
||||||
var filePath = GetPathPrepend() + "audio/streaming/" + filename;
|
var filePath = GetPathPrepend() + "audio/streaming/" + filename;
|
||||||
soundInstanceID = FAudioGMS_StreamingSound_LoadOGG(filePath);
|
soundInstanceID = FAudioGMS_StreamingSound_LoadOGG(filePath, bufferSizeInBytes);
|
||||||
return new SoundInstance(soundInstanceID);
|
return new SoundInstance(soundInstanceID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,48 +100,60 @@ function SoundInstance(_soundInstanceID) constructor
|
||||||
soundInstanceID = _soundInstanceID;
|
soundInstanceID = _soundInstanceID;
|
||||||
|
|
||||||
// Plays the sound or resumes from pause.
|
// Plays the sound or resumes from pause.
|
||||||
static Play = function(loop = false)
|
static Play = function()
|
||||||
{
|
{
|
||||||
FAudioGMS_SoundInstance_Play(soundInstanceID, loop);
|
FAudioGMS_SoundInstance_Play(soundInstanceID);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pauses playback.
|
// Pauses playback.
|
||||||
static Pause = function()
|
static Pause = function()
|
||||||
{
|
{
|
||||||
FAudioGMS_SoundInstance_Pause(soundInstanceID);
|
FAudioGMS_SoundInstance_Pause(soundInstanceID);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stops playback completely. If Play is called it will resume from the beginning of the sound.
|
// Stops playback completely. If Play is called it will resume from the beginning of the sound.
|
||||||
static Stop = function()
|
static Stop = function()
|
||||||
{
|
{
|
||||||
FAudioGMS_SoundInstance_Stop(soundInstanceID);
|
FAudioGMS_SoundInstance_Stop(soundInstanceID);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets the 3-dimensional position of the sound. You probably want to use SetListenerPosition too.
|
// Sets the 3-dimensional position of the sound. You probably want to use SetListenerPosition too.
|
||||||
static Set3DPosition = function(xPosition, yPosition, zPosition)
|
static Set3DPosition = function(xPosition, yPosition, zPosition)
|
||||||
{
|
{
|
||||||
FAudioGMS_SoundInstance_Set3DPosition(soundInstanceID, xPosition, yPosition, zPosition);
|
FAudioGMS_SoundInstance_Set3DPosition(soundInstanceID, xPosition, yPosition, zPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets the 3-dimensional velocity of the sound. You probably want to use SetListenerVelocity too.
|
// Sets the 3-dimensional velocity of the sound. You probably want to use SetListenerVelocity too.
|
||||||
static Set3DVelocity = function(xVelocity, yVelocity, zVelocity)
|
static Set3DVelocity = function(xVelocity, yVelocity, zVelocity)
|
||||||
{
|
{
|
||||||
FAudioGMS_SoundInstance_Set3DVelocity(soundInstanceID, xVelocity, yVelocity, zVelocity);
|
FAudioGMS_SoundInstance_Set3DVelocity(soundInstanceID, xVelocity, yVelocity, zVelocity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sets the 3-dimensional orientation of the sound.
|
||||||
|
static Set3DOrientation = function(xFront, yFront, zFront, xTop, yTop, zTop)
|
||||||
|
{
|
||||||
|
FAudioGMS_SoundInstance_Set3DOrientation(soundInstanceID, xFront, yFront, zFront, xTop, yTop, zTop);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sets whether the sound instance loops (true) or does not (false).
|
||||||
|
static SetLoop = function(loop)
|
||||||
|
{
|
||||||
|
FAudioGMS_SoundInstance_SetLoop(soundInstanceID, loop);
|
||||||
|
}
|
||||||
|
|
||||||
// Sets the panning value of the sound. -1 is farthest left, 1 is farthest right, 0 is center.
|
// Sets the panning value of the sound. -1 is farthest left, 1 is farthest right, 0 is center.
|
||||||
// NOTE: This is ignored if you have called Set3DPosition.
|
// NOTE: This is ignored if you have called Set3DPosition.
|
||||||
static SetPan = function(pan)
|
static SetPan = function(pan)
|
||||||
{
|
{
|
||||||
FAudioGMS_SoundInstance_SetPan(soundInstanceID, pan);
|
FAudioGMS_SoundInstance_SetPan(soundInstanceID, pan);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets the pitch of the sound. Default is 1. Lower than 1 is pitched down, higher than 1 is pitched up.
|
// Sets the pitch of the sound. Default is 1. Lower than 1 is pitched down, higher than 1 is pitched up.
|
||||||
static SetPitch = function(pitch)
|
static SetPitch = function(pitch)
|
||||||
{
|
{
|
||||||
FAudioGMS_SoundInstance_SetPitch(soundInstanceID, pitch);
|
FAudioGMS_SoundInstance_SetPitch(soundInstanceID, pitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets the volume of the sound. Default is 1. Lower than 1 is quieter, greater than 1 is louder.
|
// Sets the volume of the sound. Default is 1. Lower than 1 is quieter, greater than 1 is louder.
|
||||||
// If you set the milliseconds value then this will fade over time.
|
// If you set the milliseconds value then this will fade over time.
|
||||||
static SetVolume = function(volume, milliseconds = 0)
|
static SetVolume = function(volume, milliseconds = 0)
|
||||||
|
@ -138,16 +164,28 @@ function SoundInstance(_soundInstanceID) constructor
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FAudioGMS_SoundInstance_SetVolume(soundInstanceID, volume);
|
FAudioGMS_SoundInstance_SetVolume(soundInstanceID, volume);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets the position of track playback.
|
// Sets the position of track playback.
|
||||||
static SetTrackPosition = function(seconds)
|
static SetTrackPosition = function(seconds)
|
||||||
{
|
{
|
||||||
FAudioGMS_SoundInstance_SetTrackPosition(soundInstanceID, seconds);
|
FAudioGMS_SoundInstance_SetTrackPositionInSeconds(soundInstanceID, seconds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Queues this sound instance for playing in sync.
|
||||||
|
static QueueSyncPlay = function()
|
||||||
|
{
|
||||||
|
FAudioGMS_SoundInstance_QueueSyncPlay(soundInstanceID);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sets the playback region for the sound instance.
|
||||||
|
static SetPlayRegion = function(loopStartInMilliseconds, loopEndInMilliseconds)
|
||||||
|
{
|
||||||
|
FAudioGMS_SoundInstance_SetPlayRegion(soundInstanceID, loopStartInMilliseconds, loopEndInMilliseconds);
|
||||||
|
}
|
||||||
|
|
||||||
// Sets a low pass filter on the sound.
|
// Sets a low pass filter on the sound.
|
||||||
// frequency: 0.0 <-> 1.0. 1.0 means all sound gets through.
|
// frequency: 0.0 <-> 1.0. 1.0 means all sound gets through.
|
||||||
// Q: set this to 1 unless you know what you're doing
|
// Q: set this to 1 unless you know what you're doing
|
||||||
|
@ -155,7 +193,7 @@ function SoundInstance(_soundInstanceID) constructor
|
||||||
{
|
{
|
||||||
FAudioGMS_SoundInstance_SetLowPassFilter(soundInstanceID, frequency, Q);
|
FAudioGMS_SoundInstance_SetLowPassFilter(soundInstanceID, frequency, Q);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets a high pass filter on the sound.
|
// Sets a high pass filter on the sound.
|
||||||
// frequency: 0.0 <-> 1.0. 0.0 means all sound gets through.
|
// frequency: 0.0 <-> 1.0. 0.0 means all sound gets through.
|
||||||
// Q: set this to 1 unless you know what you're doing
|
// Q: set this to 1 unless you know what you're doing
|
||||||
|
@ -163,7 +201,7 @@ function SoundInstance(_soundInstanceID) constructor
|
||||||
{
|
{
|
||||||
FAudioGMS_SoundInstance_SetHighPassFilter(soundInstanceID, frequency, Q);
|
FAudioGMS_SoundInstance_SetHighPassFilter(soundInstanceID, frequency, Q);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets a band pass filter ont he sound.
|
// Sets a band pass filter ont he sound.
|
||||||
// frequency: 0.0 <-> 1.0
|
// frequency: 0.0 <-> 1.0
|
||||||
// Q: set this to 1 unless you know what you're doing
|
// Q: set this to 1 unless you know what you're doing
|
||||||
|
@ -171,7 +209,7 @@ function SoundInstance(_soundInstanceID) constructor
|
||||||
{
|
{
|
||||||
FAudioGMS_SoundInstance_SetBandPassFilter(soundInstanceID, frequency, Q);
|
FAudioGMS_SoundInstance_SetBandPassFilter(soundInstanceID, frequency, Q);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets an effect chain on the sound.
|
// Sets an effect chain on the sound.
|
||||||
// Gain is how much the effect chain "affects" the sound. 1.0 is max.
|
// Gain is how much the effect chain "affects" the sound. 1.0 is max.
|
||||||
// NOTE: Any changes to the effect chain will NOT apply automatically after this is set!
|
// NOTE: Any changes to the effect chain will NOT apply automatically after this is set!
|
||||||
|
@ -180,64 +218,75 @@ function SoundInstance(_soundInstanceID) constructor
|
||||||
{
|
{
|
||||||
FAudioGMS_SoundInstance_SetEffectChain(soundInstanceID, effectChain.effectChainID, gain);
|
FAudioGMS_SoundInstance_SetEffectChain(soundInstanceID, effectChain.effectChainID, gain);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets the effect gain of the current effect chain.
|
// Sets the effect gain of the current effect chain.
|
||||||
// Does nothing if no effect chain is set.
|
// Does nothing if no effect chain is set.
|
||||||
static SetEffectGain = function(gain)
|
static SetEffectGain = function(gain)
|
||||||
{
|
{
|
||||||
FAudioGMS_SoundInstance_SetEffectGain(soundInstanceID, gain);
|
FAudioGMS_SoundInstance_SetEffectGain(soundInstanceID, gain);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static QueueSoundInstance = function(queueSoundInstance)
|
||||||
|
{
|
||||||
|
FAudioGMS_SoundInstance_QueueSoundInstance(soundInstanceID, queueSoundInstance.soundInstanceID);
|
||||||
|
}
|
||||||
|
|
||||||
// Gets the pitch of the sound.
|
// Gets the pitch of the sound.
|
||||||
static GetPitch = function()
|
static GetPitch = function()
|
||||||
{
|
{
|
||||||
return FAudioGMS_SoundInstance_GetPitch(soundInstanceID);
|
return FAudioGMS_SoundInstance_GetPitch(soundInstanceID);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gets the volume of the sound.
|
// Gets the volume of the sound.
|
||||||
static GetVolume = function()
|
static GetVolume = function()
|
||||||
{
|
{
|
||||||
return FAudioGMS_SoundInstance_GetVolume(soundInstanceID);
|
return FAudioGMS_SoundInstance_GetVolume(soundInstanceID);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gets the total length of the track.
|
// Gets the total length of the track.
|
||||||
static GetTrackLengthInSeconds = function()
|
static GetTrackLengthInSeconds = function()
|
||||||
{
|
{
|
||||||
return FAudioGMS_SoundInstance_GetTrackLengthInSeconds(soundInstanceID);
|
return FAudioGMS_SoundInstance_GetTrackLengthInSeconds(soundInstanceID);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gets the current track position.
|
// Gets the current track position.
|
||||||
static GetTrackPositionInSeconds = function()
|
static GetTrackPositionInSeconds = function()
|
||||||
{
|
{
|
||||||
return FAudioGMS_SoundInstance_GetTrackPositionInSeconds(soundInstanceID);
|
return FAudioGMS_SoundInstance_GetTrackPositionInSeconds(soundInstanceID);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Destroys the FAudioGMS sound instance.
|
// Destroys the FAudioGMS sound instance.
|
||||||
// If you use the SoundInstance after calling this you are going to have a bad time.
|
// If you use the SoundInstance after calling this you are going to have a bad time.
|
||||||
static Destroy = function()
|
static Destroy = function()
|
||||||
{
|
{
|
||||||
FAudioGMS_SoundInstance_Destroy(soundInstanceID);
|
FAudioGMS_SoundInstance_Destroy(soundInstanceID);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets the FAudioGMS sound instance to destroy itself when playback is done.
|
// Sets the FAudioGMS sound instance to destroy itself when playback is done.
|
||||||
// Calling this on a looping sound is not a good idea.
|
// Calling this on a looping sound is not a good idea.
|
||||||
// If you use the SoundInstance after calling this you might have a bad time.
|
// If you use the SoundInstance after calling this you might have a bad time.
|
||||||
static DestroyWhenFinished = function()
|
static DestroyWhenFinished = function()
|
||||||
{
|
{
|
||||||
FAudioGMS_SoundInstance_DestroyWhenFinished(soundInstanceID);
|
FAudioGMS_SoundInstance_DestroyWhenFinished(soundInstanceID);
|
||||||
}
|
}
|
||||||
|
|
||||||
SetPan(0);
|
SetPan(0);
|
||||||
SetPitch(1);
|
SetPitch(1);
|
||||||
SetVolume(1);
|
SetVolume(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Plays the sound instance queue.
|
||||||
|
function SyncPlay()
|
||||||
|
{
|
||||||
|
FAudioGMS_SoundInstance_SyncPlay();
|
||||||
|
}
|
||||||
|
|
||||||
// Effect chains allow you to modify sound playback using audio effects.
|
// Effect chains allow you to modify sound playback using audio effects.
|
||||||
// Right now only reverb is implemented, but more effects will probably come later.
|
// Right now only reverb is implemented, but more effects will probably come later.
|
||||||
function EffectChain() constructor
|
function EffectChain() constructor
|
||||||
{
|
{
|
||||||
effectChainID = FAudioGMS_EffectChain_Create();
|
effectChainID = FAudioGMS_EffectChain_Create();
|
||||||
|
|
||||||
// Adds a reverb effect to the effect chain.
|
// Adds a reverb effect to the effect chain.
|
||||||
static AddReverb = function(
|
static AddReverb = function(
|
||||||
wetDryMix,
|
wetDryMix,
|
||||||
|
@ -273,7 +322,7 @@ function EffectChain() constructor
|
||||||
roomSize
|
roomSize
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adds a default reverb effect to the effect chain.
|
// Adds a default reverb effect to the effect chain.
|
||||||
// This is a good place to start if you don't know what all the reverb params do.
|
// This is a good place to start if you don't know what all the reverb params do.
|
||||||
static AddDefaultReverb = function()
|
static AddDefaultReverb = function()
|
||||||
|
@ -296,12 +345,12 @@ function EffectChain() constructor
|
||||||
100
|
100
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Destroys the FAudioGMS effect chain.
|
// Destroys the FAudioGMS effect chain.
|
||||||
// If you use the EffectChain after calling this you are going to have a bad time.
|
// If you use the EffectChain after calling this you are going to have a bad time.
|
||||||
static Destroy = function()
|
static Destroy = function()
|
||||||
{
|
{
|
||||||
FAudioGMS_EffectChain_Destroy(effectChainID);
|
FAudioGMS_EffectChain_Destroy(effectChainID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -314,11 +363,17 @@ function SetListenerPosition(xPosition, yPosition, zPosition)
|
||||||
// Sets the velocity of the listener for 3D audio.
|
// Sets the velocity of the listener for 3D audio.
|
||||||
function SetListenerVelocity(xVelocity, yVelocity, zVelocity)
|
function SetListenerVelocity(xVelocity, yVelocity, zVelocity)
|
||||||
{
|
{
|
||||||
FAudioGMS_SetListenerVelocity(xVelocity, yVelocity, zVelocity);
|
FAudioGMS_SetListenerVelocity(xVelocity, yVelocity, zVelocity);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stops all audio playback.
|
// Sets the orientation of the listener for 3D audio.
|
||||||
|
function SetListenerOrientation(xFront, yFront, zFront, xTop, yTop, zTop)
|
||||||
|
{
|
||||||
|
FAudioGMS_SetListenerOrientation(xFront, yFront, zFront, xTop, yTop, zTop);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Stops all audio playback.
|
||||||
function StopAllAudio()
|
function StopAllAudio()
|
||||||
{
|
{
|
||||||
FAudioGMS_StopAll();
|
FAudioGMS_StopAll();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 28528bc885581bad58050517d78848cb206b2aa3
|
Subproject commit caf9754455b8ad0f6df5d024203940e9b6e3f47e
|
7954
lib/dr_wav.h
7954
lib/dr_wav.h
File diff suppressed because it is too large
Load Diff
1389
src/FAudioGMS.c
1389
src/FAudioGMS.c
File diff suppressed because it is too large
Load Diff
184
src/FAudioGMS.h
184
src/FAudioGMS.h
|
@ -36,80 +36,144 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C"
|
||||||
|
{
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
FAUDIOGMSAPI void FAudioGMS_Init(double spatialDistanceScale, double timestep);
|
FAUDIOGMSAPI void FAudioGMS_Init(double spatialDistanceScale, double timestep);
|
||||||
|
|
||||||
FAUDIOGMSAPI double FAudioGMS_StaticSound_LoadWAV(char *filePath); /* returns a static sound ID */
|
FAUDIOGMSAPI double FAudioGMS_StaticSound_LoadWAV(
|
||||||
FAUDIOGMSAPI double FAudioGMS_StaticSound_CreateSoundInstance(double staticSoundID); /* returns a sound instance ID */
|
char *filePath); /* returns a static sound ID */
|
||||||
FAUDIOGMSAPI void FAudioGMS_StaticSound_Destroy(double staticSoundID);
|
FAUDIOGMSAPI double FAudioGMS_StaticSound_CreateSoundInstance(
|
||||||
|
double staticSoundID); /* returns a sound instance ID */
|
||||||
|
FAUDIOGMSAPI void FAudioGMS_StaticSound_Destroy(double staticSoundID);
|
||||||
|
|
||||||
|
/* returns a sound instance ID */
|
||||||
|
FAUDIOGMSAPI double FAudioGMS_StreamingSound_LoadOGG(
|
||||||
|
char *filepath,
|
||||||
|
double bufferSizeInBytes); /* if 0 is passed we will use a sensible default*/
|
||||||
|
|
||||||
FAUDIOGMSAPI double FAudioGMS_StreamingSound_LoadOGG(char* filepath); /* returns a sound instance ID */
|
FAUDIOGMSAPI void FAudioGMS_SoundInstance_Play(double soundInstanceID);
|
||||||
|
FAUDIOGMSAPI void FAudioGMS_SoundInstance_Pause(double soundInstanceID);
|
||||||
|
FAUDIOGMSAPI void FAudioGMS_SoundInstance_Stop(double soundInstanceID);
|
||||||
|
|
||||||
FAUDIOGMSAPI void FAudioGMS_SoundInstance_Play(double soundInstanceID, double loop);
|
FAUDIOGMSAPI void FAudioGMS_SoundInstance_QueueSyncPlay(double soundInstanceID);
|
||||||
FAUDIOGMSAPI void FAudioGMS_SoundInstance_Pause(double soundInstanceID);
|
FAUDIOGMSAPI void FAudioGMS_SoundInstance_SyncPlay();
|
||||||
FAUDIOGMSAPI void FAudioGMS_SoundInstance_Stop(double soundInstanceID);
|
|
||||||
|
|
||||||
FAUDIOGMSAPI void FAudioGMS_SoundInstance_SetPan(double soundInstanceID, double pan);
|
FAUDIOGMSAPI void FAudioGMS_SoundInstance_SetPlayRegion(
|
||||||
FAUDIOGMSAPI void FAudioGMS_SoundInstance_SetPitch(double soundInstanceID, double pitch);
|
double soundInstanceID,
|
||||||
FAUDIOGMSAPI void FAudioGMS_SoundInstance_SetVolume(double soundInstanceID, double volume);
|
double startInMilliseconds,
|
||||||
FAUDIOGMSAPI void FAudioGMS_SoundInstance_Set3DPosition(double soundInstanceID, double x, double y, double z);
|
double endInMilliseconds);
|
||||||
FAUDIOGMSAPI void FAudioGMS_SoundInstance_Set3DVelocity(double soundInstanceID, double xVelocity, double yVelocity, double zVelocity);
|
FAUDIOGMSAPI void FAudioGMS_SoundInstance_SetLoop(double soundInstanceID, double loop);
|
||||||
FAUDIOGMSAPI void FAudioGMS_SoundInstance_SetTrackPositionInSeconds(double soundInstanceID, double trackPositionInSeconds);
|
FAUDIOGMSAPI void FAudioGMS_SoundInstance_SetPan(double soundInstanceID, double pan);
|
||||||
FAUDIOGMSAPI void FAudioGMS_SoundInstance_SetVolumeOverTime(double soundInstanceID, double volume, double milliseconds);
|
FAUDIOGMSAPI void FAudioGMS_SoundInstance_SetPitch(double soundInstanceID, double pitch);
|
||||||
FAUDIOGMSAPI void FAudioGMS_SoundInstance_SetLowPassFilter(double soundInstanceID, double lowPassFilter, double Q);
|
FAUDIOGMSAPI void FAudioGMS_SoundInstance_SetVolume(double soundInstanceID, double volume);
|
||||||
FAUDIOGMSAPI void FAudioGMS_SoundInstance_SetHighPassFilter(double soundInstanceID, double highPassFilter, double Q);
|
FAUDIOGMSAPI void FAudioGMS_SoundInstance_Set3DPosition(
|
||||||
FAUDIOGMSAPI void FAudioGMS_SoundInstance_SetBandPassFilter(double soundInstanceID, double bandPassFilter, double Q);
|
double soundInstanceID,
|
||||||
|
double x,
|
||||||
|
double y,
|
||||||
|
double z);
|
||||||
|
FAUDIOGMSAPI void FAudioGMS_SoundInstance_Set3DVelocity(
|
||||||
|
double soundInstanceID,
|
||||||
|
double xVelocity,
|
||||||
|
double yVelocity,
|
||||||
|
double zVelocity);
|
||||||
|
FAUDIOGMSAPI void FAudioGMS_SoundInstance_Set3DOrientation(
|
||||||
|
double soundInstanceID,
|
||||||
|
double xFront,
|
||||||
|
double yFront,
|
||||||
|
double zFront,
|
||||||
|
double xTop,
|
||||||
|
double yTop,
|
||||||
|
double zTop);
|
||||||
|
FAUDIOGMSAPI void FAudioGMS_SoundInstance_SetTrackPositionInSeconds(
|
||||||
|
double soundInstanceID,
|
||||||
|
double trackPositionInSeconds);
|
||||||
|
FAUDIOGMSAPI void FAudioGMS_SoundInstance_SetVolumeOverTime(
|
||||||
|
double soundInstanceID,
|
||||||
|
double volume,
|
||||||
|
double milliseconds);
|
||||||
|
FAUDIOGMSAPI void FAudioGMS_SoundInstance_SetLowPassFilter(
|
||||||
|
double soundInstanceID,
|
||||||
|
double lowPassFilter,
|
||||||
|
double Q);
|
||||||
|
FAUDIOGMSAPI void FAudioGMS_SoundInstance_SetHighPassFilter(
|
||||||
|
double soundInstanceID,
|
||||||
|
double highPassFilter,
|
||||||
|
double Q);
|
||||||
|
FAUDIOGMSAPI void FAudioGMS_SoundInstance_SetBandPassFilter(
|
||||||
|
double soundInstanceID,
|
||||||
|
double bandPassFilter,
|
||||||
|
double Q);
|
||||||
|
|
||||||
FAUDIOGMSAPI double FAudioGMS_SoundInstance_GetPitch(double soundInstanceID);
|
FAUDIOGMSAPI void FAudioGMS_SoundInstance_QueueSoundInstance(
|
||||||
FAUDIOGMSAPI double FAudioGMS_SoundInstance_GetVolume(double soundInstanceID);
|
double soundInstanceID,
|
||||||
FAUDIOGMSAPI double FAudioGMS_SoundInstance_GetTrackLengthInSeconds(double soundInstanceID);
|
double queueSoundInstanceID);
|
||||||
FAUDIOGMSAPI double FAudioGMS_SoundInstance_GetTrackPositionInSeconds(double soundInstanceID);
|
|
||||||
|
|
||||||
FAUDIOGMSAPI void FAudioGMS_SoundInstance_Destroy(double soundInstanceID);
|
FAUDIOGMSAPI double FAudioGMS_SoundInstance_GetPitch(double soundInstanceID);
|
||||||
FAUDIOGMSAPI void FAudioGMS_SoundInstance_DestroyWhenFinished(double soundInstanceID);
|
FAUDIOGMSAPI double FAudioGMS_SoundInstance_GetVolume(double soundInstanceID);
|
||||||
|
FAUDIOGMSAPI double FAudioGMS_SoundInstance_GetTrackLengthInSeconds(double soundInstanceID);
|
||||||
|
FAUDIOGMSAPI double FAudioGMS_SoundInstance_GetTrackPositionInSeconds(double soundInstanceID);
|
||||||
|
|
||||||
FAUDIOGMSAPI double FAudioGMS_EffectChain_Create();
|
FAUDIOGMSAPI void FAudioGMS_SoundInstance_Destroy(double soundInstanceID);
|
||||||
FAUDIOGMSAPI void FAudioGMS_EffectChain_AddDefaultReverb(double effectChainID);
|
FAUDIOGMSAPI void FAudioGMS_SoundInstance_DestroyWhenFinished(double soundInstanceID);
|
||||||
FAUDIOGMSAPI void FAudioGMS_EffectChain_AddReverb(
|
|
||||||
double effectChainID,
|
|
||||||
double wetDryMix,
|
|
||||||
double reflectionsDelay,
|
|
||||||
double reverbDelay,
|
|
||||||
double earlyDiffusion,
|
|
||||||
double lateDiffusion,
|
|
||||||
double lowEQGain,
|
|
||||||
double lowEQCutoff,
|
|
||||||
double highEQGain,
|
|
||||||
double highEQCutoff,
|
|
||||||
double reflectionsGain,
|
|
||||||
double reverbGain,
|
|
||||||
double decayTime,
|
|
||||||
double density,
|
|
||||||
double roomSize
|
|
||||||
);
|
|
||||||
FAUDIOGMSAPI void FAudioGMS_EffectChain_Destroy(double effectChainID);
|
|
||||||
|
|
||||||
/*
|
FAUDIOGMSAPI double FAudioGMS_EffectChain_Create();
|
||||||
* NOTE: Any changes to the effect chain will NOT apply after this is set!
|
FAUDIOGMSAPI void FAudioGMS_EffectChain_AddDefaultReverb(double effectChainID);
|
||||||
* You MUST call SetEffectChain again if you make changes to the effect chain parameters!
|
FAUDIOGMSAPI void FAudioGMS_EffectChain_AddReverb(
|
||||||
*/
|
double effectChainID,
|
||||||
FAUDIOGMSAPI void FAudioGMS_SoundInstance_SetEffectChain(double soundInstanceID, double effectChainID, double effectGain);
|
double wetDryMix,
|
||||||
FAUDIOGMSAPI void FAudioGMS_SoundInstance_SetEffectGain(double soundInstanceID, double effectGain);
|
double reflectionsDelay,
|
||||||
|
double reverbDelay,
|
||||||
|
double earlyDiffusion,
|
||||||
|
double lateDiffusion,
|
||||||
|
double lowEQGain,
|
||||||
|
double lowEQCutoff,
|
||||||
|
double highEQGain,
|
||||||
|
double highEQCutoff,
|
||||||
|
double reflectionsGain,
|
||||||
|
double reverbGain,
|
||||||
|
double decayTime,
|
||||||
|
double density,
|
||||||
|
double roomSize);
|
||||||
|
FAUDIOGMSAPI void FAudioGMS_EffectChain_Destroy(double effectChainID);
|
||||||
|
|
||||||
FAUDIOGMSAPI void FAudioGMS_SetMasteringEffectChain(double effectChainID, double effectGain);
|
/*
|
||||||
FAUDIOGMSAPI void FAudioGMS_SetMasteringEffectGain(double effectGain);
|
* NOTE: Any changes to the effect chain will NOT apply after this is set!
|
||||||
|
* You MUST call SetEffectChain again if you make changes to the effect
|
||||||
|
* chain parameters!
|
||||||
|
*/
|
||||||
|
FAUDIOGMSAPI void FAudioGMS_SoundInstance_SetEffectChain(
|
||||||
|
double soundInstanceID,
|
||||||
|
double effectChainID,
|
||||||
|
double effectGain);
|
||||||
|
FAUDIOGMSAPI void FAudioGMS_SoundInstance_SetEffectGain(
|
||||||
|
double soundInstanceID,
|
||||||
|
double effectGain);
|
||||||
|
|
||||||
FAUDIOGMSAPI void FAudioGMS_SetListenerPosition(double x, double y, double z);
|
FAUDIOGMSAPI void FAudioGMS_SetMasteringEffectChain(double effectChainID, double effectGain);
|
||||||
FAUDIOGMSAPI void FAudioGMS_SetListenerVelocity(double xVelocity, double yVelocity, double zVelocity);
|
FAUDIOGMSAPI void FAudioGMS_SetMasteringEffectGain(double effectGain);
|
||||||
|
|
||||||
FAUDIOGMSAPI void FAudioGMS_PauseAll(); /* useful for mobile platforms, etc */
|
FAUDIOGMSAPI void FAudioGMS_SetListenerPosition(double x, double y, double z);
|
||||||
FAUDIOGMSAPI void FAudioGMS_ResumeAll(); /* same as above */
|
FAUDIOGMSAPI void FAudioGMS_SetListenerVelocity(
|
||||||
FAUDIOGMSAPI void FAudioGMS_StopAll();
|
double xVelocity,
|
||||||
|
double yVelocity,
|
||||||
|
double zVelocity);
|
||||||
|
FAUDIOGMSAPI void FAudioGMS_SetListenerOrientation(
|
||||||
|
double xFront,
|
||||||
|
double yFront,
|
||||||
|
double zFront,
|
||||||
|
double xTop,
|
||||||
|
double yTop,
|
||||||
|
double zTop);
|
||||||
|
|
||||||
FAUDIOGMSAPI void FAudioGMS_Update();
|
FAUDIOGMSAPI void FAudioGMS_PauseAll(); /* useful for mobile platforms, etc
|
||||||
FAUDIOGMSAPI void FAudioGMS_Destroy();
|
*/
|
||||||
|
FAUDIOGMSAPI void FAudioGMS_ResumeAll(); /* same as above */
|
||||||
|
FAUDIOGMSAPI void FAudioGMS_StopAll();
|
||||||
|
|
||||||
|
FAUDIOGMSAPI void FAudioGMS_Update();
|
||||||
|
FAUDIOGMSAPI void FAudioGMS_Destroy();
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,13 +39,14 @@
|
||||||
<PlatformToolset>v142</PlatformToolset>
|
<PlatformToolset>v142</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<PlatformToolset>ClangCL</PlatformToolset>
|
<PlatformToolset>v142</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<PlatformToolset>v142</PlatformToolset>
|
<PlatformToolset>v142</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<PlatformToolset>v142</PlatformToolset>
|
<PlatformToolset>v142</PlatformToolset>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings">
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
@ -89,20 +90,23 @@
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Release|x64'">SetupAPI.lib;Version.lib;Winmm.lib;Imm32.lib;libucrt.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Release|x64'">libucrt.lib;SetupAPI.lib;Version.lib;Winmm.lib;Imm32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
|
<ProjectReference>
|
||||||
|
<UseLibraryDependencyInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</UseLibraryDependencyInputs>
|
||||||
|
</ProjectReference>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\src\FAudioGMS.c" />
|
<ClCompile Include="..\src\FAudioGMS.c" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\lib\dr_wav.h" />
|
|
||||||
<ClInclude Include="..\src\FAudioGMS.h" />
|
<ClInclude Include="..\src\FAudioGMS.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
Loading…
Reference in New Issue