chromium/components/speech/audio_encoder.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "components/speech/audio_encoder.h"

#include <stddef.h>

#include <memory>

#include "base/check_op.h"
#include "base/containers/heap_array.h"
#include "base/strings/string_number_conversions.h"
#include "components/speech/audio_buffer.h"

namespace {

const char kContentTypeFLAC[] =;
const int kFLACCompressionLevel =;  // 0 for speed

FLAC__StreamEncoderWriteStatus WriteCallback(const FLAC__StreamEncoder* encoder,
                                             const FLAC__byte buffer[],
                                             size_t bytes,
                                             unsigned samples,
                                             unsigned current_frame,
                                             void* client_data) {}

}  // namespace

AudioEncoder::AudioEncoder(int sampling_rate, int bits_per_sample)
    :{}

AudioEncoder::~AudioEncoder() = default;

void AudioEncoder::Encode(const AudioChunk& raw_audio) {}

void AudioEncoder::Flush() {}

scoped_refptr<AudioChunk> AudioEncoder::GetEncodedDataAndClear() {}

std::string AudioEncoder::GetMimeType() {}

int AudioEncoder::GetBitsPerSample() {}