OpenShot Library | OpenShotAudio
0.2.2
|
Contains static methods for converting the byte order between different endiannesses. More...
#include <juce_ByteOrder.h>
Static Public Member Functions | |
static JUCE_CONSTEXPR uint16 | swap (uint16 value) noexcept |
Swaps the upper and lower bytes of a 16-bit integer. More... | |
static JUCE_CONSTEXPR int16 | swap (int16 value) noexcept |
Swaps the upper and lower bytes of a 16-bit integer. More... | |
static uint32 | swap (uint32 value) noexcept |
Reverses the order of the 4 bytes in a 32-bit integer. More... | |
static int32 | swap (int32 value) noexcept |
Reverses the order of the 4 bytes in a 32-bit integer. More... | |
static uint64 | swap (uint64 value) noexcept |
Reverses the order of the 8 bytes in a 64-bit integer. More... | |
static int64 | swap (int64 value) noexcept |
Reverses the order of the 8 bytes in a 64-bit integer. More... | |
static float | swap (float value) noexcept |
Returns a garbled float which has the reverse byte-order of the original. More... | |
static double | swap (double value) noexcept |
Returns a garbled double which has the reverse byte-order of the original. More... | |
template<typename Type > | |
static Type | swapIfBigEndian (Type value) noexcept |
Swaps the byte order of a signed or unsigned integer if the CPU is big-endian. | |
template<typename Type > | |
static Type | swapIfLittleEndian (Type value) noexcept |
Swaps the byte order of a signed or unsigned integer if the CPU is little-endian. | |
static JUCE_CONSTEXPR uint32 | littleEndianInt (const void *bytes) noexcept |
Turns 4 bytes into a little-endian integer. More... | |
static JUCE_CONSTEXPR uint64 | littleEndianInt64 (const void *bytes) noexcept |
Turns 8 bytes into a little-endian integer. More... | |
static JUCE_CONSTEXPR uint16 | littleEndianShort (const void *bytes) noexcept |
Turns 2 bytes into a little-endian integer. More... | |
static JUCE_CONSTEXPR int | littleEndian24Bit (const void *bytes) noexcept |
Converts 3 little-endian bytes into a signed 24-bit value (which is sign-extended to 32 bits). More... | |
static void | littleEndian24BitToChars (int32 value, void *destBytes) noexcept |
Copies a 24-bit number to 3 little-endian bytes. More... | |
static JUCE_CONSTEXPR uint32 | bigEndianInt (const void *bytes) noexcept |
Turns 4 bytes into a big-endian integer. More... | |
static JUCE_CONSTEXPR uint64 | bigEndianInt64 (const void *bytes) noexcept |
Turns 8 bytes into a big-endian integer. More... | |
static JUCE_CONSTEXPR uint16 | bigEndianShort (const void *bytes) noexcept |
Turns 2 bytes into a big-endian integer. More... | |
static JUCE_CONSTEXPR int | bigEndian24Bit (const void *bytes) noexcept |
Converts 3 big-endian bytes into a signed 24-bit value (which is sign-extended to 32 bits). More... | |
static void | bigEndian24BitToChars (int32 value, void *destBytes) noexcept |
Copies a 24-bit number to 3 big-endian bytes. More... | |
static JUCE_CONSTEXPR uint16 | makeInt (uint8 leastSig, uint8 mostSig) noexcept |
Constructs a 16-bit integer from its constituent bytes, in order of significance. More... | |
static JUCE_CONSTEXPR uint32 | makeInt (uint8 leastSig, uint8 byte1, uint8 byte2, uint8 mostSig) noexcept |
Constructs a 32-bit integer from its constituent bytes, in order of significance. More... | |
static JUCE_CONSTEXPR uint64 | makeInt (uint8 leastSig, uint8 byte1, uint8 byte2, uint8 byte3, uint8 byte4, uint8 byte5, uint8 byte6, uint8 mostSig) noexcept |
Constructs a 64-bit integer from its constituent bytes, in order of significance. More... | |
static JUCE_CONSTEXPR bool | isBigEndian () noexcept |
Returns true if the current CPU is big-endian. More... | |
Contains static methods for converting the byte order between different endiannesses.
Definition at line 36 of file juce_ByteOrder.h.
|
inlinestaticnoexcept |
Swaps the upper and lower bytes of a 16-bit integer.
Definition at line 147 of file juce_ByteOrder.h.
Referenced by juce::WavFileHelpers::AcidChunk::AcidChunk(), and juce::Process::isRunningUnderDebugger().
|
inlinestaticnoexcept |
Swaps the upper and lower bytes of a 16-bit integer.
Definition at line 148 of file juce_ByteOrder.h.
|
inlinestaticnoexcept |
Reverses the order of the 4 bytes in a 32-bit integer.
Definition at line 158 of file juce_ByteOrder.h.
|
inlinestaticnoexcept |
Reverses the order of the 4 bytes in a 32-bit integer.
Definition at line 149 of file juce_ByteOrder.h.
|
inlinestaticnoexcept |
Reverses the order of the 8 bytes in a 64-bit integer.
Definition at line 174 of file juce_ByteOrder.h.
|
inlinestaticnoexcept |
Reverses the order of the 8 bytes in a 64-bit integer.
Definition at line 150 of file juce_ByteOrder.h.
|
inlinestaticnoexcept |
Returns a garbled float which has the reverse byte-order of the original.
Definition at line 151 of file juce_ByteOrder.h.
|
inlinestaticnoexcept |
Returns a garbled double which has the reverse byte-order of the original.
Definition at line 152 of file juce_ByteOrder.h.
|
inlinestaticnoexcept |
Turns 4 bytes into a little-endian integer.
Definition at line 203 of file juce_ByteOrder.h.
Referenced by juce::WavAudioFormat::createBWAVMetadata(), juce::BigInteger::loadFromMemoryBlock(), juce::InputStream::readCompressedInt(), and juce::InputStream::readInt().
|
inlinestaticnoexcept |
Turns 8 bytes into a little-endian integer.
Definition at line 205 of file juce_ByteOrder.h.
|
inlinestaticnoexcept |
Turns 2 bytes into a little-endian integer.
Definition at line 202 of file juce_ByteOrder.h.
Referenced by juce::InputStream::readShort().
|
inlinestaticnoexcept |
Converts 3 little-endian bytes into a signed 24-bit value (which is sign-extended to 32 bits).
Definition at line 218 of file juce_ByteOrder.h.
|
inlinestaticnoexcept |
Copies a 24-bit number to 3 little-endian bytes.
Definition at line 221 of file juce_ByteOrder.h.
|
inlinestaticnoexcept |
Turns 4 bytes into a big-endian integer.
Definition at line 211 of file juce_ByteOrder.h.
Referenced by juce::Uuid::getNode(), juce::Uuid::getTimeLow(), juce::MidiFile::readFrom(), juce::InputStream::readIntBigEndian(), and juce::MidiFile::writeTo().
|
inlinestaticnoexcept |
Turns 8 bytes into a big-endian integer.
Definition at line 213 of file juce_ByteOrder.h.
|
inlinestaticnoexcept |
Turns 2 bytes into a big-endian integer.
Definition at line 210 of file juce_ByteOrder.h.
Referenced by juce::Uuid::getNode(), juce::Uuid::getTimeHighAndVersion(), juce::Uuid::getTimeMid(), and juce::InputStream::readShortBigEndian().
|
inlinestaticnoexcept |
Converts 3 big-endian bytes into a signed 24-bit value (which is sign-extended to 32 bits).
Definition at line 219 of file juce_ByteOrder.h.
|
inlinestaticnoexcept |
Copies a 24-bit number to 3 big-endian bytes.
Definition at line 222 of file juce_ByteOrder.h.
|
inlinestaticnoexcept |
Constructs a 16-bit integer from its constituent bytes, in order of significance.
Definition at line 185 of file juce_ByteOrder.h.
|
inlinestaticnoexcept |
Constructs a 32-bit integer from its constituent bytes, in order of significance.
Definition at line 190 of file juce_ByteOrder.h.
|
inlinestaticnoexcept |
Constructs a 64-bit integer from its constituent bytes, in order of significance.
Definition at line 196 of file juce_ByteOrder.h.
|
inlinestaticnoexcept |
Returns true if the current CPU is big-endian.
Definition at line 132 of file juce_ByteOrder.h.