struct PacketMixState
Defined at line 140 of file ../../src/media/audio/audio_core/capture_packet_queue.h
Start mixing the packet at the front of the mix queue.
Returns nullopt if the queue is empty.
The returned PacketMixState object contains bookkeeping information about the mix.
The caller should update this state as necessary and pass that final updated state
to FinishMixerJob once this mix operation is ready. If the mix operation only partially
fills the packet, then the next call to NextMixerJob will return the same state that
was passed to FinishMixerJob (except with an updated mix_target).
For example, a typical usage might look like:
while (true) {
auto mix_state = pq->NextMixerJob();
if (mix_state.capture_timestamp == NO_TIMESTAMP) {
mix_state.capture_timestamp = current_timestamp;
}
if (mix_state.frames > max_mix_frames) {
mix_state.frames = max_mix_frames;
}
mix(mix_state.target, mix_state.frames);
pq->FinishMixerJob(mix_state);
}
Public Members
RefPtr packet
int64_t capture_timestamp
uint32_t flags
void * target
size_t frames