Sfx playlist asset working (#1109)

* GroundWork

-Reverted SFXPlaylist since it is going to be made from an asset now instead.
-Added extra options to soundAssets description.
-SFXPlaylist may need an onAdd function

* Update sfxController.cpp

* SFXPlaylist data

-Added sfxPlaylist init persist fields for the slots to sound asset
-Added logic to fil sfxPlaylist if more than 1 slot is filled

* Update SoundAsset.cpp

to stop git ci complaining, assetImporter........

* Update SoundAsset.h

* sfxPlaylist

-Fix: incomplete type error
-Added onAdd and onRemove to playlist
-SoundAsset getProfile define now returns playlist if the asset is a playlist.

* Update SoundAsset.h

-updated asset array to return playlist or profile depending on what the asset is

* SFXPlaylist working

-SFXPlaylist works
AudioChannelDefault gets its volume set to 0 for some reason and was throwing off making sfxPlaylist inaudible.

Still an exception when closing if using a playlist trips on line 355 of sfxSound

* Update sfxSound.h

* setSoundFile index null fix

* Update SoundAsset.h

* Update SoundAsset.h

* netstream safety in case of a null asset assignment

* Update sfxController.cpp

added safeties around a null playlist trying to play.

* Update with Az's asset err code changes

---------

Co-authored-by: AzaezelX <quillus@hotmail.com>
This commit is contained in:
marauder2k7 2023-10-21 23:19:02 +01:00 committed by GitHub
parent 845defb25d
commit 852ed8f225
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 550 additions and 245 deletions

View file

@ -192,18 +192,18 @@ SFXSource::SFXSource()
mSavedStatus( SFXStatusNull ),
mStatusCallback( NULL ),
mDescription( NULL ),
mVolume( 1.f ),
mPreFadeVolume( 1.f ),
mFadedVolume( 1.f ),
mModulativeVolume( 1.f ),
mPreAttenuatedVolume( 1.f ),
mAttenuatedVolume( 1.f ),
mVolume( 1.0f ),
mPreFadeVolume( 1.0f ),
mFadedVolume( 1.0f ),
mModulativeVolume( 1.0f ),
mPreAttenuatedVolume( 1.0f ),
mAttenuatedVolume( 1.0f ),
mPriority( 0 ),
mModulativePriority( 1.f ),
mModulativePriority( 1.0f ),
mEffectivePriority( 0 ),
mPitch( 1.f ),
mModulativePitch( 1.f ),
mEffectivePitch( 1.f ),
mModulativePitch( 1.0f ),
mEffectivePitch( 1.0f ),
mTransform( true ),
mVelocity( 0, 0, 0 ),
mMinDistance( 1 ),
@ -213,14 +213,14 @@ SFXSource::SFXSource()
mConeOutsideVolume( 1 ),
mDistToListener( 0.f ),
mTransformScattered( false ),
mFadeInTime( 0.f ),
mFadeOutTime( 0.f ),
mFadeInPoint( -1.f ),
mFadeOutPoint( -1.f ),
mFadeInTime( 0.0f ),
mFadeOutTime( 0.0f ),
mFadeInPoint( -1.0f ),
mFadeOutPoint( -1.0f ),
mFadeSegmentType( FadeSegmentNone ),
mFadeSegmentEase( NULL ),
mFadeSegmentStartPoint( 0.f ),
mFadeSegmentEndPoint( 0.f ),
mFadeSegmentStartPoint( 0.0f ),
mFadeSegmentEndPoint( 0.0f ),
mSavedFadeTime( -1.f ),
mPlayStartTick( 0 )
{
@ -236,17 +236,17 @@ SFXSource::SFXSource( SFXTrack* track, SFXDescription* description )
mTrack( track ),
mDescription( description ),
mVolume( 1.f ),
mPreFadeVolume( 1.f ),
mFadedVolume( 1.f ),
mModulativeVolume( 1.f ),
mPreAttenuatedVolume( 1.f ),
mAttenuatedVolume( 1.f ),
mPreFadeVolume( 1.0f ),
mFadedVolume( 1.0f ),
mModulativeVolume( 1.0f ),
mPreAttenuatedVolume( 1.0f ),
mAttenuatedVolume( 1.0f ),
mPriority( 0 ),
mModulativePriority( 1.f ),
mModulativePriority( 1.0f ),
mEffectivePriority( 0 ),
mPitch( 1.f ),
mModulativePitch( 1.f ),
mEffectivePitch( 1.f ),
mPitch( 1.0f ),
mModulativePitch( 1.0f ),
mEffectivePitch( 1.0f ),
mTransform( true ),
mVelocity( 0, 0, 0 ),
mMinDistance( 1 ),
@ -256,15 +256,15 @@ SFXSource::SFXSource( SFXTrack* track, SFXDescription* description )
mConeOutsideVolume( 1 ),
mDistToListener( 0.f ),
mTransformScattered( false ),
mFadeInTime( 0.f ),
mFadeOutTime( 0.f ),
mFadeInPoint( -1.f ),
mFadeOutPoint( -1.f ),
mFadeInTime( 0.0f ),
mFadeOutTime( 0.0f ),
mFadeInPoint( -1.0f ),
mFadeOutPoint( -1.0f ),
mFadeSegmentType( FadeSegmentNone ),
mFadeSegmentEase( NULL ),
mFadeSegmentStartPoint( 0.f ),
mFadeSegmentEndPoint( 0.f ),
mSavedFadeTime( -1.f ),
mFadeSegmentStartPoint( 0.0f ),
mFadeSegmentEndPoint( 0.0f ),
mSavedFadeTime( -1.0f ),
mPlayStartTick( 0 )
{
VECTOR_SET_ASSOCIATION( mParameters );