Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 34 additions & 40 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,72 +19,66 @@ jobs:
build_type: Release
pcm_tests: ON

- name: "MacOS 14 arm64 (xc15)"
os: macos-14-xlarge
- name: "MacOS 27 arm64 (xc27)"
os: xcode-27
build_type: Release
pcm_tests: ON
set_xcode_version_cmd: xcodes select 15.4
set_xcode_version_cmd: xcodes select 27.1

- name: "MacOS 14 x86_64 (xc15)"
os: macos-14-large
- name: "MacOS 26 arm64 (xc26)"
os: macos-26
build_type: Release
pcm_tests: ON
set_xcode_version_cmd: xcodes select 15.4
set_xcode_version_cmd: xcodes select 26.6

- name: "MacOS 13 arm64 (xc14)"
os: macos-13-xlarge
- name: "MacOS 15 arm64 (xc16)"
os: macos-15
build_type: Release
pcm_tests: ON
set_xcode_version_cmd: xcodes select 14.3.1
set_xcode_version_cmd: xcodes select 16.4

- name: "MacOS 13 x86_64 (xc14)"
os: macos-13-large
- name: "MacOS 15 x86_64 (xc16)"
os: macos-15-intel
build_type: Release
pcm_tests: ON
set_xcode_version_cmd: xcodes select 14.3.1
set_xcode_version_cmd: xcodes select 16.4

- name: "MacOS 12 (xc13)"
os: macos-12
- name: "Ubuntu 26.04 (GCC-14)"
os: ubuntu-26.04
build_type: Release
pcm_tests: ON
set_xcode_version_cmd: xcodes select 13.4.1
cc: "gcc-14"
cxx: "g++-14"

- name: "Ubuntu 22.04 (GCC-11)"
os: ubuntu-22.04
- name: "Ubuntu 24.04 arm64 (GCC-13)"
os: ubuntu-24.04-arm
build_type: Release
pcm_tests: ON
cc: "gcc-11"
cxx: "g++-11"
cc: "gcc-13"
cxx: "g++-13"

- name: "Ubuntu 22.04 (GCC-10)"
os: ubuntu-22.04
- name: "Ubuntu 24.04 (GCC-13)"
os: ubuntu-24.04
build_type: Release
pcm_tests: ON
cc: "gcc-10"
cxx: "g++-10"
cc: "gcc-13"
cxx: "g++-13"

- name: "Ubuntu 20.04 (GCC-9)"
os: ubuntu-20.04
- name: "Ubuntu 24.04 (GCC-12)"
os: ubuntu-24.04
build_type: Release
pcm_tests: ON
cc: "gcc-9"
cxx: "g++-9"
cc: "gcc-12"
cxx: "g++-12"

- name: "Ubuntu 20.04 (GCC-8)"
os: ubuntu-20.04
build_type: Release
pcm_tests: ON
cc: "gcc-8"
cxx: "g++-8"

- name: "Code-Coverage (Ubuntu 20.04, GCC-9)"
os: ubuntu-20.04
- name: "Code-Coverage (Ubuntu 24.04, GCC-13)"
os: ubuntu-24.04
build_type: Coverage
pcm_tests: OFF
code_coverage: true
cc: "gcc-9"
cxx: "g++-9"
gcov: "gcov-9"
cc: "gcc-13"
cxx: "g++-13"
gcov: "gcov-13"


steps:
Expand Down Expand Up @@ -136,7 +130,7 @@ jobs:
sudo apt-get install -y lcov
lcov --version
echo $(which ${GCOV})
lcov --gcov-tool $(which ${GCOV}) -d . -c -o coverage.info
lcov --gcov-tool $(which ${GCOV}) -d . -c -o coverage.info --ignore-errors mismatch --exclude '*/test/*'

- name: Upload code coverage results
if: matrix.config.code_coverage == true
Expand Down
26 changes: 14 additions & 12 deletions audiostream/src/ni/media/audio/os/mac/core_audio_source.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,14 +335,15 @@ void core_audio_source<Source>::setupInfo( audio::ifstream_info::container_type

auto info = buildOutStreamInfo( m_media, fileId, container );

AudioStreamBasicDescription description{.mFormatID = kAudioFormatLinearPCM,
.mChannelsPerFrame = UInt32( info.num_channels() ),
.mSampleRate = Float64( info.sample_rate() ),
.mFormatFlags = formatToAudioFormatFlags( info.format() ),
.mFramesPerPacket = 1,
.mBitsPerChannel = UInt32( info.bits_per_sample() ),
.mBytesPerPacket = UInt32( info.bytes_per_frame() ),
.mBytesPerFrame = UInt32( info.bytes_per_frame() )};
auto description = AudioStreamBasicDescription{};
description.mSampleRate = Float64( info.sample_rate() );
description.mFormatID = kAudioFormatLinearPCM;
description.mFormatFlags = formatToAudioFormatFlags( info.format() );
description.mBytesPerPacket = UInt32( info.bytes_per_frame() );
description.mFramesPerPacket = 1;
description.mBytesPerFrame = UInt32( info.bytes_per_frame() );
description.mChannelsPerFrame = UInt32( info.num_channels() );
description.mBitsPerChannel = UInt32( info.bits_per_sample() );

if ( ExtAudioFileSetProperty( m_media, kExtAudioFileProperty_ClientDataFormat, sizeof( description ), &description )
!= noErr )
Expand Down Expand Up @@ -388,10 +389,11 @@ std::streamsize core_audio_source<Source>::read( char* dst, std::streamsize size

size = std::min( size, std::streamsize( end - m_pos ) );

AudioBufferList buffer{.mNumberBuffers = 1,
.mBuffers[0] = {.mNumberChannels = UInt32( m_info.num_channels() ),
.mDataByteSize = UInt32( size ),
.mData = static_cast<void*>( dst )}};
auto buffer = AudioBufferList{};
buffer.mNumberBuffers = 1;
buffer.mBuffers[0].mNumberChannels = UInt32( m_info.num_channels() );
buffer.mBuffers[0].mDataByteSize = UInt32( size );
buffer.mBuffers[0].mData = dst;

auto num_frames = UInt32( size / m_info.bytes_per_frame() );
if ( noErr != ExtAudioFileRead( m_media, &num_frames, &buffer ) )
Expand Down
12 changes: 6 additions & 6 deletions audiostream/test/ni/media/audio/istream_read.test.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,15 @@

#include <gtest/gtest.h>

#include <boost/algorithm/cxx11/iota.hpp>
#include <boost/range/algorithm/copy.hpp>
#include <boost/range/algorithm/equal.hpp>
#include <boost/range/algorithm/fill.hpp>
#include <boost/range/iterator_range.hpp>

#include <algorithm>
#include <cstdint>
#include <limits>
#include <list>
#include <type_traits>
#include <vector>

namespace
Expand All @@ -47,10 +46,11 @@ namespace
template <class Container>
auto generate_range()
{
auto range = std::vector<char>( 256 );
boost::algorithm::iota( range, std::numeric_limits<char>::lowest() );

static_assert( std::is_signed<char>(), "char must be signed" );
auto range = std::vector<char>();
for ( auto value = int{ std::numeric_limits<std::int8_t>::lowest() };
value <= std::numeric_limits<std::int8_t>::max();
++value )
range.push_back( static_cast<char>( value ) );

auto format = pcm::make_format<pcm::signed_integer, pcm::_8bit>();

Expand Down
2 changes: 0 additions & 2 deletions audiostream/test/ni/media/test_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@
#include <ni/media/audio/iotools.h>
#include <ni/media/test_helper.h>

#include <boost/locale.hpp>
#include <boost/predef/os.h>
#include <boost/preprocessor/stringize.hpp>
#include <boost/range/adaptor/filtered.hpp>
#include <boost/range/adaptor/transformed.hpp>
#include <boost/range/iterator_range.hpp>
#include <boost/tokenizer.hpp>

#include <codecvt>
#include <cstdlib>
Expand Down
1 change: 0 additions & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"boost-format",
"boost-icl",
"boost-iostreams",
"boost-locale",
"boost-math",
"boost-program-options",
"boost-system",
Expand Down
Loading