audio_core: Remove global state

This commit is contained in:
MerryMage 2017-12-20 18:44:32 +00:00
parent dca5fd291f
commit ab3d53131a
34 changed files with 711 additions and 650 deletions

View file

@ -5,14 +5,12 @@
#pragma once
#include <array>
#include <deque>
#include "audio_core/audio_types.h"
#include "common/common_types.h"
namespace AudioCore {
namespace Codec {
/// A variable length buffer of signed PCM16 stereo samples.
using StereoBuffer16 = std::deque<std::array<s16, 2>>;
/// See: Codec::DecodeADPCM
struct ADPCMState {
// Two historical samples from previous processed buffer,
@ -48,4 +46,5 @@ StereoBuffer16 DecodePCM8(const unsigned num_channels, const u8* const data,
*/
StereoBuffer16 DecodePCM16(const unsigned num_channels, const u8* const data,
const size_t sample_count);
};
} // namespace Codec
} // namespace AudioCore