mirror of
https://github.com/iluvcapra/bwavfile.git
synced 2026-01-01 09:20:45 +00:00
Compare commits
9 Commits
master
...
code-cover
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5781a91d3 | ||
|
|
a3d7206ecd | ||
|
|
5cc4fa763a | ||
|
|
d91c9193c4 | ||
|
|
afa3e24f49 | ||
|
|
d7803ba5ae | ||
|
|
d3eb2377ec | ||
|
|
f28a400c78 | ||
|
|
63067f52ab |
38
.github/workflows/coverage.yml
vendored
Normal file
38
.github/workflows/coverage.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: Test Coverage
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Create Test Media
|
||||
run: cd tests; sh create_test_media.sh
|
||||
- name: Install rustfilt
|
||||
run: cargo install rustfilt
|
||||
- name: Install tapaulin
|
||||
run: cargo install cargo-tarpaulin
|
||||
- name: Build
|
||||
run: cargo build --verbose
|
||||
- name: Run tests
|
||||
run: cargo tarpaulin
|
||||
env:
|
||||
RUSTFLAGS: "-C instrument-coverage"
|
||||
- name: rust-grcov
|
||||
# You may pin to the exact commit or the version.
|
||||
# uses: actions-rs/grcov@bb47b1ed7883a1502fa6875d562727ace2511248
|
||||
uses: actions-rs/grcov@v0.1.5
|
||||
# with:
|
||||
# Path to the configuration file (optional, relative to the repository root)
|
||||
# config: # optional, default is .github/actions-rs/grcov.yml
|
||||
- name: Codecov
|
||||
uses: codecov/codecov-action@v3.1.4
|
||||
|
||||
@@ -26,3 +26,5 @@ serde_json = "1.0.61"
|
||||
[profile.release]
|
||||
debug = true
|
||||
|
||||
[build]
|
||||
profiler = true
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/// Format tags, UUIDs and utilities
|
||||
|
||||
use uuid::Uuid;
|
||||
|
||||
/// Format tag for integer LPCM
|
||||
@@ -89,9 +90,7 @@ impl CommonFormat {
|
||||
(WAVE_TAG_EXTENDED, Some(WAVE_UUID_PCM)) => Self::IntegerPCM,
|
||||
(WAVE_TAG_EXTENDED, Some(WAVE_UUID_FLOAT)) => Self::IeeeFloatPCM,
|
||||
(WAVE_TAG_EXTENDED, Some(WAVE_UUID_BFORMAT_PCM)) => Self::AmbisonicBFormatIntegerPCM,
|
||||
(WAVE_TAG_EXTENDED, Some(WAVE_UUID_BFORMAT_FLOAT)) => {
|
||||
Self::AmbisonicBFormatIeeeFloatPCM
|
||||
}
|
||||
(WAVE_TAG_EXTENDED, Some(WAVE_UUID_BFORMAT_FLOAT)) => Self::AmbisonicBFormatIeeeFloatPCM,
|
||||
(WAVE_TAG_EXTENDED, Some(x)) => CommonFormat::UnknownExtended(x),
|
||||
(x, _) => CommonFormat::UnknownBasic(x),
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ impl ChannelMask {
|
||||
/**
|
||||
* Extended Wave Format
|
||||
*
|
||||
* Resources:
|
||||
* Resources:
|
||||
* * [WAVEFORMATEXTENSIBLE structure](https://docs.microsoft.com/en-us/windows/win32/api/mmreg/ns-mmreg-waveformatextensible)
|
||||
*/
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
@@ -394,10 +394,10 @@ pub trait ReadWavAudioData {
|
||||
|
||||
impl<T> ReadWavAudioData for T
|
||||
where
|
||||
T: std::io::Read,
|
||||
T: std::io::Read
|
||||
{
|
||||
/// # Panics:
|
||||
/// * If the format's [valid bits per sample](WaveFmt::valid_bits_per_sample) is
|
||||
/// * If the format's [valid bits per sample](WaveFmt::valid_bits_per_sample) is
|
||||
/// not compatible with the format's [bits per sample](WaveFmt::bits_per_sample).
|
||||
fn read_i32_frames(
|
||||
&mut self,
|
||||
|
||||
@@ -50,9 +50,7 @@ pub use common_format::{
|
||||
};
|
||||
pub use cue::Cue;
|
||||
pub use errors::Error;
|
||||
pub use fmt::{
|
||||
ADMAudioID, ChannelDescriptor, ChannelMask, ReadWavAudioData, WaveFmt, WaveFmtExtended,
|
||||
};
|
||||
pub use fmt::{ADMAudioID, ChannelDescriptor, ChannelMask, WaveFmt, WaveFmtExtended, ReadWavAudioData};
|
||||
pub use sample::{Sample, I24};
|
||||
pub use wavereader::{AudioFrameReader, WaveReader};
|
||||
pub use wavewriter::{AudioFrameWriter, WaveWriter};
|
||||
|
||||
Reference in New Issue
Block a user