Skip to content

currawong-project/libcw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,497 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libcw

libcw is an application framework for developming real-time interactive applications on Linux.

Some of libcw's features are:

  • Real-time, low-latency, synchronous and asynchronous interfaces to many common IO devices including:

    • Audio
    • MIDI
    • Serial
    • Sockets
    • Websockets
  • Built-in dataflow framework for describing real-time audio and DSP programs.

  • A GUI development API and collection of predefined widgets for creating websocket based user interfaces.

  • Most elements of the framework are configurable based on configuration files which use an extended JSON syntax.

  • The library has minimal dependencies. The only external dependencies are libasound, libwebsockets and libfftw.

  • The library implements a large collection of pre-built audio signal processing algorithms.

Build

cd ~/src/libcw
rm -rf build  #clean

cmake -S ~/src/libcw -B ~/src/libcw/build/debug -DCMAKE_INSTALL_PREFIX=~/src/libcw/build/debug/install --preset debug

# or the short form
cmake -B build/debug -DCMAKE_INSTALL_PREFIX=build/debug/install --preset debug


cmake --build ~/src/libcw/build/debug --preset debug
cmake --install ~/src/libcw/build/debug 

Cmake notes:

CMAKE_EXPORT_COMPILE_COMMANDS creates compile-commands.json which is used by the clangd LSP server.

Run tests with 'ctest'

See https://cmake.org/cmake/help/latest/manual/ctest.1.html#manual:ctest(1) for more options.

ctest --test-dir build/debug/test                       # Run all tests.
ctest --test-dir build/debug/test  --verbose            # Run all tests without surpressing output to stdout
ctest -R "MyTest" --test-dir build/debug/test --verbose # Identify the tests to run with a regex.

Debug a test:

file  ~/src/libcw/build/debug/test/test_main  
set args --gtest_filter=FlowTest.NumberTest --gtest_death_test_style=threadsafe
catch signal SIGABRT
r

Generate a test coverage report from a debug build

rm -rf build/debug

cmake -B build/debug --preset debug-lsan-coverage

cmake --build build/debug --preset debug

ctest --test-dir build/debug/test

# generate coverage data
lcov --capture --directory build/debug --output-file build/debug/coverage.info --rc lcov_branch_coverage=1 --ignore-errors mismatch

# remove coverage of standard library calls
lcov --remove build/debug/coverage.info '/usr/include/*' --output-file build/debug/coverage.info --rc lcov_branch_coverage=1

# generate the coverage report
genhtml build/debug/coverage.info --output-directory build/debug/coverage --rc lcov_branch_coverage=1

 xdg-open build/debug/coverage/index.html 

Testing coverage on core

cwAudioFileOps.h cwAudioFileProc.h cwAudioFilePvProc.h cwB23Tree.h cwDataSets.h cwLib.h cwMath.h cwMidiFile.h cwMidiParser.h cwMidiState.h cwMtx.h cwSvg.h cwTest.h cwThreadMach.h cwTracer.h cwVariant.h

Skip:

cwFFT.h : Dummy FFT implementation

cwMtQueueTester.h : Tester cwMpScNbCircQueue.h : Only used in cwMtQueueTester.cpp cwMpScQueue.h : Not used. cwMpScNbQueue.h : Not used cwSpScBuf.h : Not used cwSpScQueueTmpl.h : Not used

DONE:

cwAudioFile.h cwAudioTransforms.h cwCommon.h cwCommonImpl.h cwCsv.h cwDsp.h cwDspTransforms.h cwDspTypes.h cwFile.h cwFileSys.h cwLex.h cwLog.h cwMem.h cwMidi.hc wMidiDecls.h cwMutex.h cwNbMpScQueue.h cwNumericConvert.h cwObject.h cwObjectTemplate.h cwText.h cwTextBuf.h cwThread.h cwTime.h cwVectOps.h cwWaveTableBank.h

About

libcw is an application development framework designed to support real-time signal processing applications

Topics

Resources

License

Unknown, GPL-3.0 licenses found

Licenses found

Unknown
LICENSE
GPL-3.0
COPYING

Stars

Watchers

Forks

Packages

 
 
 

Contributors