text stringlengths 1 24.5M |
|---|
//
// Created by netcan on 2021/10/09.
//
#ifndef ASYNCIO_EPOLL_SELECTOR_H
#define ASYNCIO_EPOLL_SELECTOR_H
#include "fmt/core.h"
#include <asyncio/asyncio_ns.h>
#include <asyncio/selector/event.h>
#include <unistd.h>
#include <sys/epoll.h>
#include <vector>
ASYNCIO_NS_BEGIN
struct EpollSelector {
EpollSelector():... |
//
// Created by netcan on 2021/10/24.
//
#ifndef ASYNCIO_EVENT_H
#define ASYNCIO_EVENT_H
#include <asyncio/asyncio_ns.h>
#include <asyncio/handle.h>
#include <cstdint>
#if defined(__APPLE__)
#include <sys/event.h>
using Flags_t = int16_t;
#elif defined(__linux__)
#include <sys/epoll.h>
using Flags_t... |
//
// Created by netcan on 2021/10/24.
//
#ifndef ASYNCIO_KQUEUE_SELECTOR_H
#define ASYNCIO_KQUEUE_SELECTOR_H
#include <asyncio/asyncio_ns.h>
#include <asyncio/selector/event.h>
#include <sys/types.h>
#include <sys/event.h>
#include <sys/time.h>
#include <unistd.h>
#include <cerrno>
#include <cstdio>
#include <vector>... |
//
// Created by netcan on 2021/10/24.
//
#ifndef ASYNCIO_SELECTOR_H
#define ASYNCIO_SELECTOR_H
#if defined(__APPLE__)
#include <asyncio/selector/kqueue_selector.h>
namespace ASYNCIO_NS {
using Selector = KQueueSelector;
}
#elif defined(__linux)
#include <asyncio/selector/epoll_selector.h>
namespace ASYNCIO_NS {
usin... |
//
// Created by netcan on 2021/09/07.
//
#include <chrono>
#include <optional>
#include <asyncio/event_loop.h>
namespace ranges = std::ranges;
ASYNCIO_NS_BEGIN
EventLoop& get_event_loop() {
static EventLoop loop;
return loop;
}
void EventLoop::run_until_complete() {
while (! is_stop()) { run_once(); }
}... |
//
// Created by netcan on 2021/11/20.
//
#include <catch2/catch_test_macros.hpp>
#include <nanobench.h>
#include <asyncio/task.h>
#include <asyncio/runner.h>
using asyncio::Task;
SCENARIO("lots of synchronous completions") {
auto completes_synchronously = []() -> Task<int> {
co_return 1;
};
aut... |
//
// Created by netcan on 2021/11/29.
//
#include <asyncio/open_connection.h>
#include <asyncio/runner.h>
#include <asyncio/wait_for.h>
using asyncio::Task;
using asyncio::Stream;
using namespace std::chrono;
Task<> tcp_echo_client(std::string_view message) {
auto stream = co_await asyncio::open_connection("127.0... |
#include <asyncio/stream.h>
#include <arpa/inet.h>
#include <asyncio/runner.h>
#include <asyncio/start_server.h>
#include <asyncio/task.h>
#include <fmt/core.h>
using asyncio::Stream;
using asyncio::Task;
using asyncio::get_in_port;
using asyncio::get_in_addr;
int add_count = 0;
int rel_count = 0;
Task<> handle_echo... |
//
// Created by netcan on 2021/09/06.
//
#include <iostream>
#include <fmt/core.h>
#include <string_view>
#include <string>
#include <asyncio/task.h>
#include <asyncio/runner.h>
#include <asyncio/sleep.h>
#include <asyncio/schedule_task.h>
#include <asyncio/callstack.h>
using namespace ASYNCIO_NS;
Task<std::string_vi... |
//
// Created by netcan on 2021/11/24.
//
#ifndef ASYNCIO_COUNTED_H
#define ASYNCIO_COUNTED_H
struct CountedPolicy {
bool move_constructable = true;
bool copy_constructable = true;
bool move_assignable = true;
bool copy_assignable = true;
};
inline constexpr CountedPolicy default_counted_policy;
temp... |
//
// Created by netcan on 2021/11/24.
//
#include <catch2/catch_test_macros.hpp>
#include <asyncio/result.h>
#include <asyncio/runner.h>
#include <asyncio/task.h>
#include "counted.h"
using namespace ASYNCIO_NS;
SCENARIO("test Counted") {
using TestCounted = Counted<default_counted_policy>;
TestCounted::rese... |
//
// Created by netcan on 2021/10/10.
//
#include <catch2/catch_test_macros.hpp>
#include <asyncio/event_loop.h>
#include <asyncio/selector/selector.h>
using namespace ASYNCIO_NS;
using namespace std::chrono;
SCENARIO("test selector wait") {
EventLoop loop;
Selector selector;
auto before_wait = loop.time... |
//
// Created by netcan on 2021/10/11.
//
#include <catch2/catch_test_macros.hpp>
#include <catch2/catch_approx.hpp>
#include <asyncio/runner.h>
#include <asyncio/callstack.h>
#include <asyncio/task.h>
#include <asyncio/gather.h>
#include <asyncio/exception.h>
#include <asyncio/sleep.h>
#include <asyncio/schedule_task.... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* ... |
// Copyright (c) 2015 Amanieu d'Antras
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publi... |
// Copyright (c) 2015 Amanieu d'Antras
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publi... |
// Copyright (c) 2015 Amanieu d'Antras
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publi... |
// Copyright (c) 2015 Amanieu d'Antras
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publi... |
// Copyright (c) 2015 Amanieu d'Antras
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publi... |
// Copyright (c) 2015 Amanieu d'Antras
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publi... |
// Copyright (c) 2015 Amanieu d'Antras
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publi... |
// Copyright (c) 2015 Amanieu d'Antras
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publi... |
// Copyright (c) 2015 Amanieu d'Antras
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publi... |
// Copyright (c) 2015 Amanieu d'Antras
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publi... |
// Copyright (c) 2015 Amanieu d'Antras
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publi... |
// Copyright (c) 2015 Amanieu d'Antras
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publi... |
// Copyright (c) 2015 Amanieu d'Antras
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publi... |
// Copyright (c) 2015 Amanieu d'Antras
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publi... |
// Copyright (c) 2015 Amanieu d'Antras
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publi... |
// Copyright (c) 2015 Amanieu d'Antras
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publi... |
// Copyright (c) 2015 Amanieu d'Antras
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publi... |
// Copyright (c) 2015 Amanieu d'Antras
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publi... |
// Copyright (c) 2015 Amanieu d'Antras
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publi... |
// Copyright (c) 2015 Amanieu d'Antras
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publi... |
// Copyright (c) 2015 Amanieu d'Antras
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publi... |
// Copyright (c) 2015 Amanieu d'Antras
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publi... |
// Copyright (c) 2015 Amanieu d'Antras
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publi... |
// Copyright (c) 2015 Amanieu d'Antras
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publi... |
/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */
#ifndef ATOMIC_QUEUE_ATOMIC_QUEUE_H_INCLUDED
#define ATOMIC_QUEUE_ATOMIC_QUEUE_H_INCLUDED
// Copyright (c) 2019 Maxim Egorushkin. MIT License. See the full licence in file LICENSE.
#include "defs.h"
#include <algorithm>
#include <cassert... |
/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */
#ifndef ATOMIC_QUEUE_ATOMIC_QUEUE_SPIN_LOCK_H_INCLUDED
#define ATOMIC_QUEUE_ATOMIC_QUEUE_SPIN_LOCK_H_INCLUDED
// Copyright (c) 2019 Maxim Egorushkin. MIT License. See the full licence in file LICENSE.
#include "atomic_queue.h"
#include "s... |
/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */
#ifndef BARRIER_H_INCLUDED
#define BARRIER_H_INCLUDED
// Copyright (c) 2019 Maxim Egorushkin. MIT License. See the full licence in file LICENSE.
#include "defs.h"
//////////////////////////////////////////////////////////////////////////... |
/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */
#ifndef ATOMIC_QUEUE_DEFS_H_INCLUDED
#define ATOMIC_QUEUE_DEFS_H_INCLUDED
// Copyright (c) 2019 Maxim Egorushkin. MIT License. See the full licence in file LICENSE.
#include <atomic>
#if defined(__x86_64__) || defined(_M_X64) || defined(... |
/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */
#ifndef ATOMIC_QUEUE_SPIN_LOCK_H_INCLUDED
#define ATOMIC_QUEUE_SPIN_LOCK_H_INCLUDED
// Copyright (c) 2019 Maxim Egorushkin. MIT License. See the full licence in file LICENSE.
#include "defs.h"
#include <atomic>
#include <cstdlib>
#includ... |
/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */
// Copyright (c) 2019 Maxim Egorushkin. MIT License. See the full licence in file LICENSE.
#include "atomic_queue/atomic_queue.h"
#include "atomic_queue/atomic_queue_mutex.h"
#include "atomic_queue/barrier.h"
#include <xenium/michael_sco... |
/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */
#ifndef ATOMIC_QUEUE_BENCHMARKS_H_INCLUDED
#define ATOMIC_QUEUE_BENCHMARKS_H_INCLUDED
#include <utility>
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
nam... |
/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */
// Copyright (c) 2019 Maxim Egorushkin. MIT License. See the full licence in file LICENSE.
#include "cpu_base_frequency.h"
#include <fstream>
#include <tuple>
#include <regex>
#include <string>
#include <thread>
#include <system_error>
... |
/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */
#ifndef CPU_BASE_FREQUENCY_H_INCLUDED
#define CPU_BASE_FREQUENCY_H_INCLUDED
// Copyright (c) 2019 Maxim Egorushkin. MIT License. See the full licence in file LICENSE.
#include <vector>
////////////////////////////////////////////////////... |
/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */
// Copyright (c) 2019 Maxim Egorushkin. MIT License. See the full licence in file LICENSE.
#include "atomic_queue/atomic_queue.h"
#include <thread>
#include <cstdint>
#include <iostream>
int main() {
int constexpr PRODUCERS = 1; // ... |
/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */
#include "huge_pages.h"
#include <system_error>
#include <unistd.h>
#include <sys/mman.h>
#ifndef MAP_HUGE_SHIFT
#define MAP_HUGE_SHIFT 26
#endif
//////////////////////////////////////////////////////////////////////////////////////////... |
/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */
#ifndef HUGE_PAGES_H_INCLUDED
#define HUGE_PAGES_H_INCLUDED
#include "benchmarks.h"
#include <new>
#include <memory>
#include <utility>
/////////////////////////////////////////////////////////////////////////////////////////////////////... |
/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */
#ifndef MOODYCAMEL_H_INCLUDED
#define MOODYCAMEL_H_INCLUDED
// Copyright (c) 2019 Maxim Egorushkin. MIT License. See the full licence in file LICENSE.
#include "benchmarks.h"
#include <concurrentqueue/concurrentqueue.h>
#include <readerw... |
/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */
// Copyright (c) 2019 Maxim Egorushkin. MIT License. See the full licence in file LICENSE.
#define BOOST_TEST_MODULE atomic_queue
#include <boost/test/unit_test.hpp>
#include "atomic_queue/atomic_queue.h"
#include "atomic_queue/barrier.h... |
//=======================================================================
/** @file AudioFile.h
* @author Adam Stark
* @copyright Copyright (C) 2017 Adam Stark
*
* This file is part of the 'AudioFile' library
*
* MIT License
*
* Copyright (c) 2017 Adam Stark
*
* Permission is hereby granted, free of charge... |
#include <iostream>
#include <cmath>
#include <AudioFile.h>
//=======================================================================
namespace examples
{
void writeSineWaveToAudioFile();
void loadAudioFileAndPrintSummary();
void loadAudioFileAndProcessSamples();
}
//===============================... |
#include "doctest/doctest.h"
#include <iostream>
#include <vector>
#include <AudioFile.h>
// --------------------------------------------
// Test audio files: 44.1kHz Stereo
#include "test-headers/aiff_stereo_8bit_44100.h"
#include "test-headers/aiff_stereo_16bit_44100.h"
#include "test-headers/aiff_stereo_24bit_44100... |
#include "doctest/doctest.h"
#include <iostream>
#include <vector>
#include <cmath>
#include <AudioFile.h>
//=============================================================
const std::string projectBuildDirectory = PROJECT_BINARY_DIR;
//=============================================================
// Writes an audio fi... |
#include "doctest/doctest.h"
#include <iostream>
#include <vector>
#include <math.h>
#include <AudioFile.h>
//=============================================================
TEST_SUITE ("General Tests")
{
//=============================================================
const std::string projectBuildDirectory = PR... |
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#define DOCTEST_CONFIG_COLORS_NONE
#include "doctest/doctest.h"
|
#include "doctest/doctest.h"
#include <iostream>
#include <vector>
#include <AudioFile.h>
//=============================================================
TEST_SUITE ("SampleConversionTests::8-bit Conversions - signedByteToSample()")
{
//=============================================================
TEST_CASE ("... |
#include "doctest/doctest.h"
#include <iostream>
#include <vector>
#include <AudioFile.h>
#include <cmath>
// --------------------------------------------
// Test audio files: 44.1kHz Stereo
#include "test-headers/wav_stereo_8bit_44100.h"
#include "test-headers/wav_stereo_16bit_44100.h"
#include "test-headers/wav_ster... |
// ====================================================================== lgtm [cpp/missing-header-guard]
// == DO NOT MODIFY THIS FILE BY HAND - IT IS AUTO GENERATED BY CMAKE! ==
// ======================================================================
//
// doctest.h - the lightest feature-rich C++ single-header test... |
#include <vector>
namespace aiff_stereo_16bit_44100 {
int numSamplesPerChannel = 352800;
int bitDepth = 16;
uint32_t sampleRate = 44100;
int numChannels = 2;
std::vector<std::vector<double>> testBuffer = {{-0.009429931640625, -0.030426025390625, -0.035186767578125, 0.17071533203125, -0.01959228515625, -0.1155395507... |
#include <vector>
namespace aiff_stereo_16bit_48000 {
int numSamplesPerChannel = 384000;
int bitDepth = 16;
uint32_t sampleRate = 48000;
int numChannels = 2;
std::vector<std::vector<double>> testBuffer = {{0.0, 0.0, 0.0, -3.0517578125e-05, 3.0517578125e-05, 0.0, 6.103515625e-05, 3.0517578125e-05, 0.0, -0.0015258789... |
#include <vector>
namespace aiff_stereo_24bit_44100 {
int numSamplesPerChannel = 352800;
int bitDepth = 24;
uint32_t sampleRate = 44100;
int numChannels = 2;
std::vector<std::vector<double>> testBuffer = {{0.0, 2.384185791015625e-07, 1.7881393432617188e-06, 5.4836273193359375e-06, 1.3232231140136719e-05, 2.46763229... |
#include <vector>
namespace aiff_stereo_24bit_48000 {
int numSamplesPerChannel = 384000;
int bitDepth = 24;
uint32_t sampleRate = 48000;
int numChannels = 2;
std::vector<std::vector<double>> testBuffer = {{0.0, 0.0, 7.152557373046875e-07, 2.6226043701171875e-06, 6.556510925292969e-06, 1.2040138244628906e-05, 2.0742... |
#include <vector>
namespace aiff_stereo_32bit_44100 {
int numSamplesPerChannel = 384873;
int bitDepth = 32;
uint32_t sampleRate = 44100;
int numChannels = 2;
std::vector<std::vector<double>> testBuffer = {{-0.10654573142528534, -0.11086378246545792, -0.11495868861675262, -0.13741405308246613, -0.14436161518096924, ... |
#include <vector>
namespace aiff_stereo_32bit_48000 {
int numSamplesPerChannel = 418909;
int bitDepth = 32;
uint32_t sampleRate = 48000;
int numChannels = 2;
std::vector<std::vector<double>> testBuffer = {{-0.12224096804857254, -0.11750572919845581, -0.10568306595087051, -0.13950054347515106, -0.1767929494380951, -... |
#include <vector>
namespace aiff_stereo_8bit_44100 {
int numSamplesPerChannel = 352800;
int bitDepth = 8;
uint32_t sampleRate = 44100;
int numChannels = 2;
std::vector<std::vector<double>> testBuffer = {{0.0, 0.0, 0.0, -0.0078125, 0.0078125, -0.0078125, 0.0078125, -0.0078125, 0.015625, -0.03125, 0.0078125, 0.007812... |
#include <vector>
namespace aiff_stereo_8bit_48000 {
int numSamplesPerChannel = 384000;
int bitDepth = 8;
uint32_t sampleRate = 48000;
int numChannels = 2;
std::vector<std::vector<double>> testBuffer = {{-0.0078125, 0.0234375, -0.1015625, -0.0703125, -0.0234375, -0.0703125, 0.0625, 0.109375, 0.1015625, -0.0546875, ... |
#include <vector>
namespace wav_8chan_24bit_48000 {
int numSamplesPerChannel = 191524;
int bitDepth = 24;
uint32_t sampleRate = 48000;
int numChannels = 8;
std::vector<std::vector<double>> testBuffer = {{0.00112915039062, 0.00247192382812, 0.00570678710938, 0.007080078125, 0.00711059570312, 0.00714111328125, 0.0067... |
#include <vector>
namespace wav_mono_16bit_44100 {
int numSamplesPerChannel = 352800;
int bitDepth = 16;
uint32_t sampleRate = 44100;
int numChannels = 1;
std::vector<double> testBuffer = {-3.0517578125e-05, -0.0001220703125, -0.001251220703125, -0.002655029296875, -0.003082275390625, 0.00384521484375, 0.0227661132... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.