[Serialization] Add SoundBufferParams serialization functions
This commit is contained in:
parent
2784d62ec9
commit
4199582a52
|
|
@ -29,6 +29,9 @@ namespace Nz
|
||||||
bool IsValid() const;
|
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 AudioBuffer;
|
||||||
class AudioDevice;
|
class AudioDevice;
|
||||||
class Sound;
|
class Sound;
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,20 @@ namespace Nz
|
||||||
return true;
|
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
|
* \brief Constructs a SoundBuffer object
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue