Skip to content

Commit

Permalink
Set DEBUG to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
pschatzmann committed Oct 28, 2024
1 parent 5db5a12 commit 714a1d8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/ADPCM.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class ADPCMDecoder : public ADPCMCodec {
avctx.priv_data = (uint8_t *)&enc_ctx;
}

ADPCMDecoder(AVCodecID id, int blockSize = 256) : ADPCMCodec() {
ADPCMDecoder(AVCodecID id, int blockSize = ADAPCM_DEFAULT_BLOCK_SIZE) : ADPCMCodec() {
setCodecID(id);
setBlockSize(blockSize);
avctx.bits_per_coded_sample = av_get_bits_per_sample(id);
Expand Down Expand Up @@ -162,7 +162,6 @@ class ADPCMDecoder : public ADPCMCodec {
frame.extended_data = extended_data;
// set result samples
return adpcm_decode_init(&avctx) == 0;
;
}

void end() { adpcm_flush(&avctx); }
Expand Down
2 changes: 1 addition & 1 deletion src/adpcm-ffmpeg/config-adpcm.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

// setting to 1 uses a ima wav decoder and encoder that does not use any macros and thus can be debugged
# define DEBUG 0
# define DEBUG 1

# define AV_HAVE_BIGENDIAN 0
# define CACHED_BITSTREAM_READER 0
Expand Down
6 changes: 3 additions & 3 deletions test/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

using namespace std;
using namespace adpcm_ffmpeg;

ADPCMDecoder decoder{AV_CODEC_ID_ADPCM_IMA_WAV};
ADPCMEncoder encoder{AV_CODEC_ID_ADPCM_IMA_WAV};
AVCodecID code = AV_CODEC_ID_ADPCM_MS; // AV_CODEC_ID_ADPCM_IMA_WAV
ADPCMDecoder decoder{code};
ADPCMEncoder encoder{code};
vector<int16_t> frame_vector;
SineWaveGenerator<int16_t> gen{30000.0};
int channels = 2;
Expand Down

0 comments on commit 714a1d8

Please sign in to comment.