mirror of
https://github.com/badaix/snapcast.git
synced 2025-04-30 10:47:12 +02:00
move assign function into implementation
This commit is contained in:
parent
2657b439b2
commit
3fea89a60b
2 changed files with 11 additions and 7 deletions
|
@ -27,6 +27,17 @@
|
||||||
#define ID_DATA 0x61746164
|
#define ID_DATA 0x61746164
|
||||||
|
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
template <typename T>
|
||||||
|
void assign(void* pointer, T val)
|
||||||
|
{
|
||||||
|
T* p = (T*)pointer;
|
||||||
|
*p = val;
|
||||||
|
}
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
|
||||||
PcmEncoder::PcmEncoder(const std::string& codecOptions) : Encoder(codecOptions)
|
PcmEncoder::PcmEncoder(const std::string& codecOptions) : Encoder(codecOptions)
|
||||||
{
|
{
|
||||||
headerChunk_.reset(new msg::CodecHeader("pcm"));
|
headerChunk_.reset(new msg::CodecHeader("pcm"));
|
||||||
|
|
|
@ -30,13 +30,6 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void initEncoder() override;
|
void initEncoder() override;
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
void assign(void* pointer, T val)
|
|
||||||
{
|
|
||||||
T* p = (T*)pointer;
|
|
||||||
*p = val;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue