mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-08 20:47:08 +03:00
move to new cspot
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#include "NamedPipeAudioSink.h"
|
||||
|
||||
NamedPipeAudioSink::NamedPipeAudioSink()
|
||||
{
|
||||
printf("Start\n");
|
||||
this->namedPipeFile = std::ofstream("outputFifo", std::ios::binary);
|
||||
printf("stop\n");
|
||||
|
||||
}
|
||||
|
||||
NamedPipeAudioSink::~NamedPipeAudioSink()
|
||||
{
|
||||
this->namedPipeFile.close();
|
||||
}
|
||||
|
||||
void NamedPipeAudioSink::feedPCMFrames(const uint8_t *buffer, size_t bytes)
|
||||
{
|
||||
// Write the actual data
|
||||
this->namedPipeFile.write((char*)buffer, (long)bytes);
|
||||
this->namedPipeFile.flush();
|
||||
}
|
||||
Reference in New Issue
Block a user