Fix broken audio when changing a filter type.
This commit is contained in:
parent
6be6a77064
commit
21414f1cc3
|
@ -2,3 +2,4 @@
|
||||||
inc/
|
inc/
|
||||||
lib/
|
lib/
|
||||||
build/
|
build/
|
||||||
|
version.h
|
|
@ -19,18 +19,48 @@ add_executable(ploopy_headphones
|
||||||
configuration_manager.c
|
configuration_manager.c
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(ploopy_headphones PRIVATE ${CMAKE_SOURCE_DIR})
|
target_include_directories(ploopy_headphones PRIVATE
|
||||||
|
${CMAKE_SOURCE_DIR}
|
||||||
|
${CMAKE_BINARY_DIR}/generated
|
||||||
|
)
|
||||||
|
|
||||||
pico_generate_pio_header(ploopy_headphones ${CMAKE_CURRENT_LIST_DIR}/i2s.pio)
|
pico_generate_pio_header(ploopy_headphones ${CMAKE_CURRENT_LIST_DIR}/i2s.pio)
|
||||||
|
|
||||||
|
# in case Git is not available, we default to "unknown"
|
||||||
|
set(GIT_HASH "unknown")
|
||||||
|
|
||||||
|
# find Git and if available set GIT_HASH variable
|
||||||
|
find_package(Git QUIET)
|
||||||
|
if(GIT_FOUND)
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${GIT_EXECUTABLE} describe --always --dirty
|
||||||
|
OUTPUT_VARIABLE GIT_HASH
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
ERROR_QUIET
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
message(STATUS "Git hash is ${GIT_HASH}")
|
||||||
|
|
||||||
|
# generate file version.hpp based on version.hpp.in
|
||||||
|
configure_file(
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/version.h.in
|
||||||
|
${CMAKE_BINARY_DIR}/generated/version.h
|
||||||
|
@ONLY
|
||||||
|
)
|
||||||
|
|
||||||
|
list(APPEND SOURCES "${CMAKE_CURRENT_BINARY_DIR}/version.cc" version.hh)
|
||||||
|
|
||||||
target_compile_definitions(ploopy_headphones PRIVATE
|
target_compile_definitions(ploopy_headphones PRIVATE
|
||||||
# ours are zero based, so say so
|
# ours are zero based, so say so
|
||||||
PICO_USBDEV_USE_ZERO_BASED_INTERFACES=1
|
PICO_USBDEV_USE_ZERO_BASED_INTERFACES=1
|
||||||
|
|
||||||
# need large descriptor
|
# need large descriptor
|
||||||
PICO_USBDEV_MAX_DESCRIPTOR_SIZE=256
|
PICO_USBDEV_MAX_DESCRIPTOR_SIZE=256
|
||||||
|
|
||||||
PICO_USBDEV_ISOCHRONOUS_BUFFER_STRIDE_TYPE=1
|
PICO_USBDEV_ISOCHRONOUS_BUFFER_STRIDE_TYPE=1
|
||||||
|
|
||||||
|
# make the git hash available to the firmware
|
||||||
|
GIT_HASH="${GIT_HASH}"
|
||||||
)
|
)
|
||||||
|
|
||||||
pico_enable_stdio_usb(ploopy_headphones 0)
|
pico_enable_stdio_usb(ploopy_headphones 0)
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
#ifndef VERSION_H
|
||||||
|
#define VERSION_H
|
||||||
|
/** This template is populated by cmake at build time. */
|
||||||
|
static const char* FIRMWARE_GIT_HASH = "@GIT_HASH@";
|
||||||
|
#endif
|
Loading…
Reference in New Issue