mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Always serialize in little-endian and skip checks
These checks are not necessary since we can trust ourselves to not try to cause any buffer overflows.
This commit is contained in:
@@ -26,6 +26,8 @@ Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
by getting rid of all memory allocations during audio processing.
|
||||
- Changed the way mutual recursion in VST3 plugins on the plugin side works to
|
||||
counter any potential GUI related timing issues with VST3 plugins.
|
||||
- The deserialization part of yabridge's communication is now slightly faster by
|
||||
skipping some unnecessary checks.
|
||||
|
||||
### Fixed
|
||||
|
||||
|
||||
@@ -35,11 +35,26 @@
|
||||
#include "../logging/common.h"
|
||||
#include "../utils.h"
|
||||
|
||||
template <typename B>
|
||||
using OutputAdapter = bitsery::OutputBufferAdapter<B>;
|
||||
namespace bitsery {
|
||||
struct LittleEndianConfig {
|
||||
// In case we ever want to bridge from some big-endian architecture to
|
||||
// x86_64 Windows, then we should make sure we always encode data using the
|
||||
// same endianness
|
||||
static constexpr EndiannessType Endianness = EndiannessType::LittleEndian;
|
||||
// Since we provide the data on both sides, we can safely disable these
|
||||
// checks
|
||||
static constexpr bool CheckDataErrors = false;
|
||||
static constexpr bool CheckAdapterErrors = false;
|
||||
};
|
||||
} // namespace bitsery
|
||||
|
||||
template <typename B>
|
||||
using InputAdapter = bitsery::InputBufferAdapter<B>;
|
||||
using OutputAdapter =
|
||||
bitsery::OutputBufferAdapter<B, bitsery::LittleEndianConfig>;
|
||||
|
||||
template <typename B>
|
||||
using InputAdapter =
|
||||
bitsery::InputBufferAdapter<B, bitsery::LittleEndianConfig>;
|
||||
|
||||
/**
|
||||
* Serialize an object using bitsery and write it to a socket. This will write
|
||||
|
||||
Reference in New Issue
Block a user