This commit adds extensive unit and integration tests for the audio pipeline components that were previously untested. ## ResamplingNode Tests (pmoaudio/src/nodes/resampling_node.rs) - Added 7 test functions covering: - Helper function tests: extract_channels_i16/i24 - Reconstruction tests: reconstruct_chunk_i16/i24 - Logic tests: passthrough when sample rate matches - Async tests: verify sync markers pass through unchanged - Integration test: actual 44.1kHz → 48kHz resampling ## PlaylistSource Tests (pmoaudio-ext/src/sources/playlist_source.rs) - Added 10 test functions covering: - Stream validation: valid/invalid channel counts and bit depths - PCM conversion: bytes_to_segment for I16/I24/I32 formats - Mono/stereo handling: verify channel duplication - Error handling: unsupported bit depth rejection - Type safety: compilation verification ## Bug Fixes - Fixed imports: Node and NodeLogic moved from nodes to pipeline module - Fixed AudioCache import: use pmoaudiocache::Cache with alias - Fixed API calls in ResamplingNode: - BitDepth::from_audio_chunk() → match pattern - .stereo() → .get_frames() - .to_i32() → .as_i32() for I24 - .sample_rate() → .get_sample_rate() ## Documentation - Added INSTALL_LIBSOXR.md with detailed installation instructions - Documents local libsoxr installation without sudo privileges - Provides troubleshooting guide for build and test environments All tests pass successfully (17 tests total: 7 ResamplingNode + 10 PlaylistSource).
41 lines
434 B
Plaintext
41 lines
434 B
Plaintext
.ollama
|
|
.ollamacode
|
|
/bin/
|
|
/pkg/
|
|
/vendor/
|
|
**/*.log
|
|
**/*.old
|
|
**/*.o
|
|
**/*.o.d
|
|
**/*.a
|
|
**/*.flac
|
|
**/*.aif
|
|
**/*.aiff
|
|
**/*.wav
|
|
**/*.opus
|
|
**/*.mp4
|
|
**/*.mp3
|
|
**/*.ogg
|
|
xxx
|
|
/dcai/
|
|
**/.pmomusic.yml
|
|
**/.pmomusic_covers/**
|
|
**/.pmomusic_audio/**
|
|
/.pmomusic
|
|
.DS_Store
|
|
target
|
|
/.pmomusic_covers
|
|
/.pmomusic_audio/**
|
|
C/src/soxr-0.1.3/Release/tests
|
|
**/Release/
|
|
**/Debug/
|
|
OLD-GO-CODE/
|
|
xxx
|
|
xx
|
|
all.txt
|
|
pmo_src.txt
|
|
upmpdcli/
|
|
/*.xml
|
|
test_upnp*.cargo/
|
|
.cargo/
|