MCPcopy Create free account
hub / github.com/MusicPlayerDaemon/MPD / GetChunk

Method GetChunk

src/decoder/Bridge.cxx:102–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102MusicChunk *
103DecoderBridge::GetChunk() noexcept
104{
105 DecoderCommand cmd;
106
107 if (current_chunk != nullptr)
108 return current_chunk.get();
109
110 do {
111 current_chunk = dc.buffer->Allocate();
112 if (current_chunk != nullptr) {
113 current_chunk->replay_gain_serial = replay_gain_serial;
114 if (replay_gain_serial != 0)
115 current_chunk->replay_gain_info = replay_gain_info;
116
117 return current_chunk.get();
118 }
119
120 cmd = LockNeedChunks(dc);
121 } while (cmd == DecoderCommand::NONE);
122
123 return nullptr;
124}
125
126void
127DecoderBridge::FlushChunk() noexcept

Callers

nothing calls this directly

Calls 3

LockNeedChunksFunction · 0.85
getMethod · 0.80
AllocateMethod · 0.80

Tested by

no test coverage detected