OpenShot Library | libopenshot-audio
0.2.0
|
52 if (
read (temp, 2) == 2)
62 if (
read (temp, 2) == 2)
72 if (
read (temp, 4) == 4)
82 if (
read (temp, 4) == 4)
95 const int numBytes = (sizeByte & 0x7f);
106 if (
read (bytes, numBytes) != numBytes)
110 return (sizeByte >> 7) ? -num : num;
115 union { uint8 asBytes[8]; uint64 asInt64; } n;
117 if (
read (n.asBytes, 8) == 8)
125 union { uint8 asBytes[8]; uint64 asInt64; } n;
127 if (
read (n.asBytes, 8) == 8)
135 static_assert (
sizeof (int32) ==
sizeof (
float),
"Union assumes float has the same size as an int32");
136 union { int32 asInt;
float asFloat; } n;
143 union { int32 asInt;
float asFloat; } n;
150 union { int64 asInt;
double asDouble; } n;
157 union { int64 asInt;
double asDouble; } n;
184 if (c == 0 || c ==
'\n')
219 if (numBytesToSkip > 0)
221 auto skipBufferSize = (int) jmin (numBytesToSkip, (int64) 16384);
225 numBytesToSkip -=
read (temp, (
int) jmin (numBytesToSkip, (int64) skipBufferSize));
static JUCE_CONSTEXPR uint16 littleEndianShort(const void *bytes) noexcept
Turns 2 bytes into a little-endian integer.
virtual bool writeByte(char byte)
Writes a single byte to the stream.
Writes data to an internal memory buffer, which grows as required.
String toUTF8() const
Returns a String created from the (UTF8) data that has been written to the stream.
static Type swapIfLittleEndian(Type value) noexcept
Swaps the byte order of a signed or unsigned integer if the CPU is little-endian.
int64 writeFromInputStream(InputStream &, int64 maxNumBytesToWrite) override
Reads data from an input stream and writes it to this stream.
static Type swapIfBigEndian(Type value) noexcept
Swaps the byte order of a signed or unsigned integer if the CPU is big-endian.
static JUCE_CONSTEXPR uint16 bigEndianShort(const void *bytes) noexcept
Turns 2 bytes into a big-endian integer.
String toString() const
Attempts to detect the encoding of the data and convert it to a string.
static JUCE_CONSTEXPR uint32 bigEndianInt(const void *bytes) noexcept
Turns 4 bytes into a big-endian integer.
static JUCE_CONSTEXPR uint32 littleEndianInt(const void *bytes) noexcept
Turns 4 bytes into a little-endian integer.
A class to hold a resizable block of raw data.