Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/amy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1764,7 +1764,7 @@ int16_t * amy_fill_buffer() {

// TODO -- the esp stuff here could sit outside of AMY
// For some reason, have to drop a bit to stop hard wrapping on esp?
#if defined(ESP_PLATFORM) || defined(__IMXRT1062__)
#if defined(ESP_PLATFORM) || defined(__IMXRT1062__) || defined(AMY_ISSUE_425)
uintval >>= 1;
#endif
if (positive) {
Expand Down
6 changes: 6 additions & 0 deletions src/amy.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,29 @@ extern const uint16_t pcm_samples;


// Set block size and SR. We try for 256/44100, but some platforms don't let us:
#ifndef AMY_BLOCK_SIZE
#ifdef AMY_DAISY
#define AMY_BLOCK_SIZE 128
#define BLOCK_SIZE_BITS 7 // log2 of BLOCK_SIZE
#else
#define AMY_BLOCK_SIZE 256
#define BLOCK_SIZE_BITS 8 // log2 of BLOCK_SIZE
#endif
#endif

#ifndef AMY_SAMPLE_RATE
#ifdef AMY_DAISY
#define AMY_SAMPLE_RATE 48000
#elif defined __EMSCRIPTEN__
#define AMY_SAMPLE_RATE 48000
#else
#define AMY_SAMPLE_RATE 44100
#endif
#endif

#ifndef PCM_AMY_SAMPLE_RATE
#define PCM_AMY_SAMPLE_RATE 22050
#endif

// Transfer types.
#define AMY_TRANSFER_TYPE_NONE 0
Expand Down