Skip to content

Commit f9f912b

Browse files
committed
Cleanup CopyDecoder
1 parent befc74f commit f9f912b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/AudioCodecs/CodecCopy.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
namespace audio_tools {
99

1010
/**
11-
* @brief Dummy Decoder which just copies the provided data to the output
11+
* @brief Dummy Decoder which just copies the provided data to the output.
12+
* You can define if it is PCM data.
1213
* @ingroup codecs
1314
* @ingroup decoder
1415
* @author Phil Schatzmann
1516
* @copyright GPLv3
1617
*/
1718
class CopyDecoder : public AudioDecoder {
1819
public:
19-
CopyDecoder() { TRACED(); }
2020

21-
CopyDecoder(bool isPcm){
21+
CopyDecoder(bool isPcm = false){
2222
is_pcm = isPcm;
2323
}
2424

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

4242
operator bool() { return true; }
4343

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

47+
/// Defines that the source and therefor the result is also PCM data
48+
void setResultPCM(bool pcm){ is_pcm = pcm;}
49+
4750
protected:
4851
Print *pt_print=nullptr;
4952
bool is_pcm = false;

0 commit comments

Comments
 (0)