Skip to content

Commit

Permalink
Cleanup CopyDecoder
Browse files Browse the repository at this point in the history
  • Loading branch information
pschatzmann committed Sep 24, 2024
1 parent befc74f commit f9f912b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/AudioCodecs/CodecCopy.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
namespace audio_tools {

/**
* @brief Dummy Decoder which just copies the provided data to the output
* @brief Dummy Decoder which just copies the provided data to the output.
* You can define if it is PCM data.
* @ingroup codecs
* @ingroup decoder
* @author Phil Schatzmann
* @copyright GPLv3
*/
class CopyDecoder : public AudioDecoder {
public:
CopyDecoder() { TRACED(); }

CopyDecoder(bool isPcm){
CopyDecoder(bool isPcm = false){
is_pcm = isPcm;
}

Expand All @@ -41,9 +41,12 @@ class CopyDecoder : public AudioDecoder {

operator bool() { return true; }

// The result is encoded data
/// The result is encoded data - by default this is false
virtual bool isResultPCM() { return is_pcm;}

/// Defines that the source and therefor the result is also PCM data
void setResultPCM(bool pcm){ is_pcm = pcm;}

protected:
Print *pt_print=nullptr;
bool is_pcm = false;
Expand Down

0 comments on commit f9f912b

Please sign in to comment.