2017-03-30 21:03:38 -07:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "audio-repack.h"
|
|
|
|
|
|
|
|
class AudioRepacker {
|
|
|
|
struct audio_repack arepack;
|
|
|
|
|
|
|
|
public:
|
|
|
|
inline AudioRepacker(audio_repack_mode_t repack_mode)
|
|
|
|
{
|
|
|
|
audio_repack_init(&arepack, repack_mode, 16);
|
|
|
|
}
|
2019-06-22 22:13:45 -07:00
|
|
|
inline ~AudioRepacker() { audio_repack_free(&arepack); }
|
2017-03-30 21:03:38 -07:00
|
|
|
|
|
|
|
inline int repack(const uint8_t *src, uint32_t frame_size)
|
|
|
|
{
|
|
|
|
return (*arepack.repack_func)(&arepack, src, frame_size);
|
|
|
|
}
|
|
|
|
|
2019-06-22 22:13:45 -07:00
|
|
|
inline operator struct audio_repack *() { return &arepack; }
|
|
|
|
inline struct audio_repack *operator->() { return &arepack; }
|
2017-03-30 21:03:38 -07:00
|
|
|
};
|