Skip to content

Commit

Permalink
configurable pre/post usb audio routing
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Klang committed Mar 27, 2022
1 parent 05dc03e commit bc408a0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
16 changes: 4 additions & 12 deletions Source/ProgramManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,20 +261,12 @@ void setButtonValue(uint8_t ch, uint8_t value){
button_values |= (bool(value)<<ch);
}

#if 0 // pre / post fx
#ifdef USE_USBD_AUDIO_TX
#define USE_USBD_AUDIO_TX_PRE_FX
#endif
#ifdef USE_USBD_AUDIO_RX
// pre / post fx routing
#if defined USE_USBD_AUDIO_RX and !defined USE_USBD_AUDIO_RX_POST_FX
#define USE_USBD_AUDIO_RX_PRE_FX
#endif
#else
#ifdef USE_USBD_AUDIO_TX
#define USE_USBD_AUDIO_TX_POST_FX
#endif
#ifdef USE_USBD_AUDIO_RX
#define USE_USBD_AUDIO_RX_POST_FX
#endif
#if defined USE_USBD_AUDIO_TX and !defined USE_USBD_AUDIO_TX_POST_FX
#define USE_USBD_AUDIO_TX_PRE_FX
#endif

/* called by the program when a block has been processed */
Expand Down
3 changes: 3 additions & 0 deletions XibecaDevKit/Core/Inc/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
#define CODEC_BLOCKSIZE 256 // with bs=512 DMA_D2=64k overflows by 1580 bytes
#define AUDIO_BLOCK_SIZE 32

#define USE_USBD_AUDIO_RX_POST_FX
#define USE_USBD_AUDIO_TX_POST_FX

/* USB audio settings */
#define AUDIO_BITS_PER_SAMPLE 16
#define AUDIO_BYTES_PER_SAMPLE (AUDIO_BITS_PER_SAMPLE/8)
Expand Down

0 comments on commit bc408a0

Please sign in to comment.