| 100 | } |
| 101 | |
| 102 | MusicChunk * |
| 103 | DecoderBridge::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 | |
| 126 | void |
| 127 | DecoderBridge::FlushChunk() noexcept |
nothing calls this directly
no test coverage detected