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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
48 changes: 48 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: build

on:

push:
branches:
- master

pull_request:
branches:
- master

jobs:

build:

runs-on: windows-2022

defaults:
run:
shell: cmd

strategy:
matrix:
arch:
- Win32
- x64

steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf

- name: Checkout
uses: actions/checkout@v4

- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}

- name: Build
run: |
mkdir build
cd build
cmake -A ${{ matrix.arch }} -DFOO_SAMPLE=ON ..
msbuild -v:m -p:Configuration=Release -p:Platform=${{ matrix.arch }} foosdk.sln
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.10)

project(foosdk)

Expand All @@ -13,7 +13,7 @@ option(FOO_SYSTEM_WTL "Use system WTL library" OFF)
option(FOO_SAMPLE "Build foo_sample component" OFF)

set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4302 /wd4838 /wd4996 /d2notypeopt")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /wd4302 /wd4838 /wd4996 /d2notypeopt")

if(FOO_STATIC_STDLIB)
foreach(FLAGS CMAKE_CXX_FLAGS_DEBUG
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# foosdk
Foobar2000 SDK with CMake-based build system and few improvements.

[![Build Status](https://ci.appveyor.com/api/projects/status/github/hyperblast/foosdk?branch=master&svg=true)](https://ci.appveyor.com/project/hyperblast/foosdk)
[![Build Status](https://github.com/hyperblast/foosdk/actions/workflows/build.yml/badge.svg)](https://github.com/hyperblast/foosdk/actions/workflows/build.yml)

### Features
- CMake-based build system
Expand Down
19 changes: 0 additions & 19 deletions appveyor.yml

This file was deleted.

28 changes: 0 additions & 28 deletions build.proj

This file was deleted.

26 changes: 23 additions & 3 deletions cmake/FileLists.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ set(
sdk/pfc/cpuid.cpp
sdk/pfc/crashWithMessage.cpp
sdk/pfc/filehandle.cpp
sdk/pfc/filetimetools.cpp
sdk/pfc/guid.cpp
sdk/pfc/other.cpp
sdk/pfc/pathUtils.cpp
Expand Down Expand Up @@ -91,7 +92,9 @@ set(
sdk/pfc/cpuid.h
sdk/pfc/debug.h
sdk/pfc/event.h
sdk/pfc/event_std.h
sdk/pfc/filehandle.h
sdk/pfc/filetimetools.h
sdk/pfc/fixed_map.h
sdk/pfc/fpu.h
sdk/pfc/guid.h
Expand Down Expand Up @@ -126,6 +129,8 @@ set(
sdk/pfc/SmartStrStr-twoCharMappings.h
sdk/pfc/SmartStrStr.h
sdk/pfc/sort.h
sdk/pfc/sort2.h
sdk/pfc/sortstring.h
sdk/pfc/splitString.h
sdk/pfc/splitString2.h
sdk/pfc/stdsort.h
Expand Down Expand Up @@ -184,7 +189,6 @@ set(
sdk/foobar2000/SDK/filesystem.cpp
sdk/foobar2000/SDK/filesystem_helper.cpp
sdk/foobar2000/SDK/foosort.cpp
sdk/foobar2000/SDK/foosortstring.cpp
sdk/foobar2000/SDK/fsItem.cpp
sdk/foobar2000/SDK/guids.cpp
sdk/foobar2000/SDK/hasher_md5.cpp
Expand Down Expand Up @@ -237,10 +241,12 @@ set(
sdk/foobar2000/SDK/audioEncoder.h
sdk/foobar2000/SDK/audio_postprocessor.h
sdk/foobar2000/SDK/autoplaylist.h
sdk/foobar2000/SDK/callback_merit.h
sdk/foobar2000/SDK/cfg_var.h
sdk/foobar2000/SDK/cfg_var_legacy.h
sdk/foobar2000/SDK/chapterizer.h
sdk/foobar2000/SDK/commandline.h
sdk/foobar2000/SDK/commonObjects-Apple.h
sdk/foobar2000/SDK/commonObjects.h
sdk/foobar2000/SDK/completion_notify.h
sdk/foobar2000/SDK/component_client.h
Expand Down Expand Up @@ -353,11 +359,13 @@ set(
sdk/foobar2000/SDK/threadsLite.h
sdk/foobar2000/SDK/timer.h
sdk/foobar2000/SDK/titleformat.h
sdk/foobar2000/SDK/titleformat_object.h
sdk/foobar2000/SDK/toolbarDropDown.h
sdk/foobar2000/SDK/track_property.h
sdk/foobar2000/SDK/tracks.h
sdk/foobar2000/SDK/ui_edit_context.h
sdk/foobar2000/SDK/ui_element.h
sdk/foobar2000/SDK/ui_element_mac.h
sdk/foobar2000/SDK/ui_element_typable_window_manager.h
sdk/foobar2000/SDK/ui.h
sdk/foobar2000/SDK/unpack.h
Expand Down Expand Up @@ -418,23 +426,27 @@ set(
sdk/foobar2000/helpers/audio_render_float.h
sdk/foobar2000/helpers/AutoComplete.h
sdk/foobar2000/helpers/BumpableElem.h
sdk/foobar2000/helpers/callback_merit.h
sdk/foobar2000/helpers/callInMainThreadHelper.h
sdk/foobar2000/helpers/CDialogResizeHelper.h
sdk/foobar2000/helpers/cfg_dsp_chain_config.h
sdk/foobar2000/helpers/cfg_obj.h
sdk/foobar2000/helpers/cfg_objList.h
sdk/foobar2000/helpers/cfg_var_import.h
sdk/foobar2000/helpers/CListControlFb2kColors.h
sdk/foobar2000/helpers/CmdThread.h
sdk/foobar2000/helpers/CModelessDialogMessages.h
sdk/foobar2000/helpers/CPropVariant.h
sdk/foobar2000/helpers/CSingleThreadWrapper.h
sdk/foobar2000/helpers/CTableEditHelper-Legacy.h
sdk/foobar2000/helpers/DarkMode.h
sdk/foobar2000/helpers/dsp_dialog.h
sdk/foobar2000/helpers/duration_counter.h
sdk/foobar2000/helpers/fb2kWorkerTool.h
sdk/foobar2000/helpers/fb2k_threads.h
sdk/foobar2000/helpers/fb2k_wfx.h
sdk/foobar2000/helpers/fileReadAhead.h
sdk/foobar2000/helpers/file_readonly.h
sdk/foobar2000/helpers/file_streamstub.h
sdk/foobar2000/helpers/foobar2000+atl.h
sdk/foobar2000/helpers/foobar2000-lite+atl.h
sdk/foobar2000/helpers/fullFileBuffer.h
Expand Down Expand Up @@ -478,7 +490,9 @@ set(
sdk/foobar2000/helpers/ProcessUtils.h
sdk/foobar2000/helpers/ProfileCache.h
sdk/foobar2000/helpers/readers.h
sdk/foobar2000/helpers/readers_lite.h
sdk/foobar2000/helpers/reader_pretend_nonseekable.h
sdk/foobar2000/helpers/readWriteLock.h
sdk/foobar2000/helpers/rethrow.h
sdk/foobar2000/helpers/seekabilizer.h
sdk/foobar2000/helpers/StdAfx.h
Expand Down Expand Up @@ -518,6 +532,7 @@ set(
sdk/libPPUI/CDialogResizeHelper.cpp
sdk/libPPUI/CPowerRequest.cpp
sdk/libPPUI/DarkMode.cpp
sdk/libPPUI/EditBoxFix.cpp
sdk/libPPUI/gdiplus_helpers.cpp
sdk/libPPUI/GDIUtils.cpp
sdk/libPPUI/IDataObjectUtils.cpp
Expand All @@ -530,6 +545,7 @@ set(
sdk/libPPUI/TypeFind.cpp
sdk/libPPUI/win32_op.cpp
sdk/libPPUI/win32_utility.cpp
sdk/libPPUI/wtl-pp.cpp
)

set(
Expand Down Expand Up @@ -568,14 +584,17 @@ set(
sdk/libPPUI/CPropVariant.h
sdk/libPPUI/CWindowCreateAndDelete.h
sdk/libPPUI/CDialogResizeHelper.h
sdk/libPPUI/DarkMode-CHyperLink.h
sdk/libPPUI/DarkMode.h
sdk/libPPUI/DarkModeEx.h
sdk/libPPUI/EditBoxFixes.h
sdk/libPPUI/gdi-types-portable.h
sdk/libPPUI/gdiplus-helpers-webp.h
sdk/libPPUI/gdiplus_helpers.h
sdk/libPPUI/GDIUtils.h
sdk/libPPUI/gesture.h
sdk/libPPUI/hookWindowMessages.h
sdk/libPPUI/HyperLinkCtrl.h
sdk/libPPUI/IDataObjectUtils.h
sdk/libPPUI/ImageEncoder.h
sdk/libPPUI/ImplementOnFinalMessage.h
Expand Down Expand Up @@ -606,7 +625,7 @@ set(
SAMPLE_SOURCES
sdk/foobar2000/foo_sample/contextmenu.cpp
sdk/foobar2000/foo_sample/decode.cpp
sdk/foobar2000/foo_sample/dsp.cpp
sdk/foobar2000/foo_sample/dsp_sample.cpp
sdk/foobar2000/foo_sample/initquit.cpp
sdk/foobar2000/foo_sample/input_raw.cpp
sdk/foobar2000/foo_sample/listcontrol-advanced.cpp
Expand All @@ -628,6 +647,7 @@ set(

set(
SAMPLE_HEADERS
sdk/foobar2000/foo_sample/dsp_sample.h
sdk/foobar2000/foo_sample/playback_stream_capture.h
sdk/foobar2000/foo_sample/resource.h
sdk/foobar2000/foo_sample/stdafx.h
Expand Down
30 changes: 26 additions & 4 deletions sdk/foobar2000/SDK/abort_callback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ bool abort_callback::sleep_ex(double p_timeout_seconds) const {
return !pfc::event::g_wait_for(get_abort_event(),p_timeout_seconds);
}

bool abort_callback::waitForEvent( pfc::eventHandle_t evtHandle, double timeOut ) {
bool abort_callback::waitForEvent( pfc::eventHandle_t evtHandle, double timeOut ) const {
int status = pfc::event::g_twoEventWait( this->get_abort_event(), evtHandle, timeOut );
switch(status) {
case 1: throw exception_aborted();
Expand All @@ -33,20 +33,42 @@ bool abort_callback_usehandle::is_aborting() const {
return pfc::event::g_wait_for( get_abort_event(), 0 );
}

bool abort_callback::waitForEvent(pfc::event& evt, double timeOut) {
bool abort_callback::waitForEvent(pfc::event& evt, double timeOut) const {
return waitForEvent(evt.get_handle(), timeOut);
}

void abort_callback::waitForEvent(pfc::eventHandle_t evtHandle) {
void abort_callback::waitForEvent(pfc::eventHandle_t evtHandle) const {
bool status = waitForEvent(evtHandle, -1); (void)status;
PFC_ASSERT(status); // should never return false
}

void abort_callback::waitForEvent(pfc::event& evt) {
void abort_callback::waitForEvent(pfc::event& evt) const {
bool status = waitForEvent(evt, -1); (void)status;
PFC_ASSERT(status); // should never return false
}

bool abort_callback::waitForEventNoThrow(pfc::eventHandle_t evtHandle) const {
int status = pfc::event::g_twoEventWait(this->get_abort_event(), evtHandle, -1);
switch (status) {
case 1: return false;
case 2: return true;
default: uBugCheck();
}
}

bool abort_callback::waitForEventNoThrow(pfc::event& evt) const {
return waitForEventNoThrow(evt.get_handle());
}

namespace fb2k {
abort_callback_dummy noAbort;
}

abort_callback_event abort_callback_clone::clone(abort_callback_event arg) {
return pfc::fileHandleDup(arg);
}

void abort_callback_clone::close(abort_callback_event arg) {
return pfc::fileHandleClose(arg);
}

Loading