[Serialization] Add SoundBufferParams serialization functions
This commit is contained in:
@@ -29,6 +29,9 @@ namespace Nz
|
||||
bool IsValid() const;
|
||||
};
|
||||
|
||||
NAZARA_AUDIO_API bool Serialize(SerializationContext& context, SoundBufferParams& params, TypeTag<SoundBufferParams>);
|
||||
NAZARA_AUDIO_API bool Unserialize(SerializationContext& context, SoundBufferParams* params, TypeTag<SoundBufferParams>);
|
||||
|
||||
class AudioBuffer;
|
||||
class AudioDevice;
|
||||
class Sound;
|
||||
|
||||
@@ -32,6 +32,20 @@ namespace Nz
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Serialize(SerializationContext& context, SoundBufferParams& params, TypeTag<SoundBufferParams>)
|
||||
{
|
||||
Serialize(context, params, TypeTag<ResourceParameters>());
|
||||
Serialize(context, "forceMono", params.forceMono);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Unserialize(SerializationContext& context, SoundBufferParams* params, TypeTag<SoundBufferParams>)
|
||||
{
|
||||
Unserialize(context, params, TypeTag<ResourceParameters>());
|
||||
Unserialize(context, "forceMono", ¶ms->forceMono);
|
||||
return params->IsValid();
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a SoundBuffer object
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user