mirror of
https://github.com/ggerganov/ggwave.git
synced 2026-04-20 05:06:32 +08:00
r2t2 - Transmit data through the PC speaker (#32)
* inital implementation * remove file * ggwave-cli : txProtocol -> txProtocolId * ggwave : add custom protocol enum values * r2t2 : use cutom protocols * r2t2 : build only on Unix systems * r2t2 : remove thread * r2t2-rx : wip * r2t2 : wasm build ready + various fixes * r2t2 : error message * Update README.md * Update README.md * Update README.md * Update README.md * r2t2 : length 16 * r2t2 : use slow protocol by default * r2t2 : add timestamp * r2t2 : update html * r2t2 : update github link * r2t2 : more robust tx * r2t2 : add option to use beep command * emscripten : cannot use requestAnimationFrame when capturing audio This causes the queued audio buffer to grow indefinitely when the page is not focused, causing the process to run out of memory. * r2t2 : disable beep option * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * r2t2 : add example to README
This commit is contained in:
71
examples/r2t2/CMakeLists.txt
Normal file
71
examples/r2t2/CMakeLists.txt
Normal file
@@ -0,0 +1,71 @@
|
||||
#
|
||||
# r2t2
|
||||
|
||||
set(TARGET r2t2)
|
||||
|
||||
if (NOT EMSCRIPTEN)
|
||||
add_executable(${TARGET}
|
||||
main.cpp
|
||||
ggwave-mod/src/ggwave.cpp
|
||||
ggwave-mod/src/resampler.cpp
|
||||
)
|
||||
|
||||
target_include_directories(${TARGET} PRIVATE
|
||||
..
|
||||
ggwave-mod/include
|
||||
ggwave-mod/src
|
||||
)
|
||||
|
||||
target_link_libraries(${TARGET} PRIVATE
|
||||
ggwave-common
|
||||
)
|
||||
endif()
|
||||
|
||||
#
|
||||
# r2t2-rx
|
||||
|
||||
set(TARGET r2t2-rx)
|
||||
|
||||
if (NOT EMSCRIPTEN)
|
||||
add_executable(${TARGET}
|
||||
r2t2-rx.cpp
|
||||
ggwave-mod/src/ggwave.cpp
|
||||
ggwave-mod/src/resampler.cpp
|
||||
)
|
||||
|
||||
target_include_directories(${TARGET} PRIVATE
|
||||
..
|
||||
ggwave-mod/include
|
||||
ggwave-mod/src
|
||||
${SDL2_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
target_link_libraries(${TARGET} PRIVATE
|
||||
ggwave-common
|
||||
${SDL2_LIBRARIES}
|
||||
)
|
||||
else()
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/build_timestamp-tmpl.h ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TARGET}/build_timestamp.h @ONLY)
|
||||
|
||||
add_executable(${TARGET}
|
||||
r2t2-rx.cpp
|
||||
ggwave-mod/src/ggwave.cpp
|
||||
ggwave-mod/src/resampler.cpp
|
||||
)
|
||||
|
||||
target_include_directories(${TARGET} PRIVATE
|
||||
..
|
||||
ggwave-mod/include
|
||||
ggwave-mod/src
|
||||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TARGET}/
|
||||
)
|
||||
|
||||
target_link_libraries(${TARGET} PRIVATE
|
||||
ggwave-common
|
||||
)
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/index-tmpl.html ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TARGET}/index.html @ONLY)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/style.css ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TARGET}/style.css COPYONLY)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/main.js ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TARGET}/main.js COPYONLY)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/plucky.mp3 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TARGET}/plucky.mp3 COPYONLY)
|
||||
endif()
|
||||
Reference in New Issue
Block a user