obs-studio/plugins/decklink/audio-repack.hpp
jp9000 f53df7da64 clang-format: Apply formatting
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
2019-06-23 23:49:10 -07:00

23 lines
525 B
C++

#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);
}
inline ~AudioRepacker() { audio_repack_free(&arepack); }
inline int repack(const uint8_t *src, uint32_t frame_size)
{
return (*arepack.repack_func)(&arepack, src, frame_size);
}
inline operator struct audio_repack *() { return &arepack; }
inline struct audio_repack *operator->() { return &arepack; }
};