MCPcopy Create free account
hub / github.com/ValveSoftware/steam-audio / put

Method put

core/src/core/float8_delay.cpp:60–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60void IPL_FLOAT8_ATTR Delay::put(float8_t in)
61{
62 if (mCursor + 7 < static_cast<int>(mRingBuffer.size(0)))
63 {
64 float8::storeu(&mRingBuffer[mCursor], in);
65
66 mCursor += 8;
67 if (mCursor >= static_cast<int>(mRingBuffer.size(0)))
68 {
69 mCursor -= static_cast<int>(mRingBuffer.size(0));
70 }
71 }
72 else
73 {
74 alignas(float8_t) float values[8];
75 float8::store(values, in);
76
77 for (auto i = 0; i < 8; ++i)
78 {
79 mRingBuffer[mCursor] = values[i];
80 ++mCursor;
81 if (mCursor >= static_cast<int>(mRingBuffer.size(0)))
82 {
83 mCursor = 0;
84 }
85 }
86 }
87}
88
89
90// --------------------------------------------------------------------------------------------------------------------

Callers 1

applyMethod · 0.45

Calls 3

storeuFunction · 0.70
storeFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected