2023-03-13 11:39:47 +01:00
|
|
|
// SPDX-License-Identifier: LGPL-2.1
|
2023-03-13 11:56:06 +01:00
|
|
|
// Copyright The Music Player Daemon Project
|
|
|
|
// Based on AudioCompress (c)2007 busybee (http://beesbuzz.biz/
|
2009-12-02 18:11:53 +01:00
|
|
|
|
2023-03-13 11:56:06 +01:00
|
|
|
#pragma once
|
2009-12-02 18:11:53 +01:00
|
|
|
|
2023-03-13 11:56:06 +01:00
|
|
|
#include <cstdint>
|
2009-12-02 18:11:53 +01:00
|
|
|
|
|
|
|
struct Compressor;
|
|
|
|
|
|
|
|
//! Create a new compressor (use history value of 0 for default)
|
2023-03-13 12:01:21 +01:00
|
|
|
struct Compressor *
|
2023-03-13 12:08:57 +01:00
|
|
|
Compressor_new(unsigned int history = 400) noexcept;
|
2009-12-02 18:11:53 +01:00
|
|
|
|
|
|
|
//! Delete a compressor
|
2023-03-13 12:01:21 +01:00
|
|
|
void
|
|
|
|
Compressor_delete(struct Compressor *) noexcept;
|
2009-12-02 18:11:53 +01:00
|
|
|
|
|
|
|
//! Process 16-bit signed data
|
2023-03-13 12:01:21 +01:00
|
|
|
void
|
|
|
|
Compressor_Process_int16(struct Compressor *, int16_t *data, unsigned int count) noexcept;
|
2009-12-02 18:11:53 +01:00
|
|
|
|
|
|
|
//! TODO: Compressor_Process_int32, Compressor_Process_float, others as needed
|
|
|
|
|
|
|
|
//! TODO: functions for getting at the peak/gain/clip history buffers (for monitoring)
|