адаптация s13bby/osc под vst и gui. (вайбкод)

вайбкод потому что мне в моменте стало понятно. что проще было сразу писать на фреймворке JUCE, чем адаптировать консольное приложение на MiniAudio.
обновляться данный репозиторий не будет. СmakeLists адаптирован онли под linux.
This commit is contained in:
2026-11-20 14:52:33 +06:00
parent 8384123f87
commit b0a75e98db
10387 changed files with 4025195 additions and 0 deletions
+99
View File
@@ -0,0 +1,99 @@
name: Bug Report
description: File a bug report
title: "[Bug]: "
body:
- type: markdown
attributes:
value: |
Thank you for reporting an issue with JUCE.
- type: textarea
id: repro
attributes:
label: Detailed steps on how to reproduce the bug
description: If possible please use already existing JUCE code such as the examples or the demo plug-in
validations:
required: true
- type: textarea
id: expected
attributes:
label: What is the expected behaviour?
validations:
required: true
- type: dropdown
id: os
attributes:
label: Operating systems
description: What operating systems do you see the bug on?
multiple: true
options:
- Windows
- macOS
- Linux
- iOS
- Android
- Other
validations:
required: true
- type: textarea
id: osversion
attributes:
label: What versions of the operating systems?
validations:
required: true
- type: dropdown
id: architecture
attributes:
label: Architectures
description: What types of machine do you see the bug on?
multiple: true
options:
- x86_64
- Arm64/aarch64
- Arm64EC (Windows)
- x86 (Windows, Android)
- 32 bit Arm (Linux, Android)
- Unsupported
validations:
required: true
- type: textarea
id: stacktrace
attributes:
label: Stacktrace
description: Please copy and paste any relevant stack trace. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: dropdown
id: pluginformat
attributes:
label: Plug-in formats (if applicable)
multiple: true
options:
- VST2
- VST3
- AU
- AUv3
- AAX
- LV2
- Standalone
- type: textarea
id: pluginhost
attributes:
label: Plug-in host applications (DAWs) (if applicable)
- type: dropdown
id: branch
attributes:
label: Testing on the `develop` branch
description: We have often already fixed bugs on our `develop` branch. Please confirm if you have tested with the latest commit.
options:
- The bug is present on the `develop` branch
- I have not tested against the `develop` branch
validations:
required: true
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://berlincodeofconduct.org/)
options:
- label: I agree to follow the Code of Conduct
required: true
+8
View File
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: JUCE Support
url: https://forum.juce.com/
about: Please use the JUCE forum to ask questions.
- name: Feature Requests
url: https://forum.juce.com/c/feature-requests
about: Please submit feature requests on the JUCE forum.
@@ -0,0 +1,50 @@
name: Download Artifacts
description: Download artifacts preserving file permissions
inputs:
keys:
description: The artifact keys
required: true
runs:
using: composite
steps:
- name: Download artifacts
shell: python3 {0}
run: |
import sys
import os
sys.path.append(os.path.abspath('.github/workflows'))
from configure_logger import configure_logger
from github_api_request import json_github_api_request, download_github_api_request
from logging import getLogger
from os import environ
from zipfile import ZipFile
import tarfile
logger = getLogger(__name__)
configure_logger(logger)
input_keys = """${{ inputs.keys }}"""
logger.debug(f'Input keys: {input_keys}')
artifact_keys = list(filter(None, [x.strip() for x in input_keys.split('\n')]))
logger.info(f'Downloading keys: {artifact_keys}')
api_prefix = 'actions'
artifacts_info = json_github_api_request(f'{api_prefix}/runs/{environ["GITHUB_RUN_ID"]}/artifacts')
for key in artifact_keys:
artifact_id = [x['id'] for x in artifacts_info['artifacts'] if x['name'] == key][0]
logger.debug(f'Artifact id for {key}: {artifact_id}')
zip_file = f'{key}.zip'
download_github_api_request(zip_file, f'{api_prefix}/artifacts/{artifact_id}/zip')
logger.debug(f'Unzipping: {zip_file}')
with ZipFile(zip_file) as archive:
archive.extractall()
os.remove(zip_file)
tar_file = f'{key}.tar'
logger.debug(f'Extracting: {tar_file}')
with tarfile.open(tar_file, 'r') as tar:
tar.extractall()
os.remove(tar_file)
+26
View File
@@ -0,0 +1,26 @@
name: Job Wrapper
description: Setup and cleanup for build jobs
inputs:
artifacts:
description: Required artifacts
required: false
default: ''
command:
description: The build command
required: true
runs:
using: composite
steps:
- name: Get artifacts
uses: ./.github/actions/download_artifacts
with:
keys: |
JUCE-utils
${{ inputs.artifacts }}
- run: ${{ inputs.command }}
shell: ${{ runner.os == 'Windows' && 'powershell' || 'bash' }}
- name: Handle job failure
if: failure()
run: python3 JUCE-utils/.github/workflows/post_job.py
shell: ${{ runner.os == 'Windows' && 'powershell' || 'bash' }}
@@ -0,0 +1,50 @@
name: Upload Artifact
description: Upload an artifact preserving file permissions
inputs:
key:
description: The artifact key
required: true
paths:
description: The artifact paths
required: true
runs:
using: composite
steps:
- name: Create tarball
shell: python3 {0}
run: |
import sys
import os
sys.path.append(os.path.abspath('.github/workflows'))
from configure_logger import configure_logger
from logging import getLogger
from os import mkdir
import tarfile
logger = getLogger(__name__)
configure_logger(logger)
input_paths = """${{ inputs.paths }}"""
logger.debug(f'Input paths: {input_paths}')
paths = list(filter(None, [x.strip() for x in input_paths.split('\n')]))
logger.info(f'Uploading paths: {paths}')
mkdir('tmp_artifact_upload')
archive_path = 'tmp_artifact_upload/${{ inputs.key }}.tar'
logger.debug(f'Creating archive: {archive_path}')
with tarfile.open('tmp_artifact_upload/${{ inputs.key }}.tar', 'w') as tar:
for path in paths:
logger.debug(f'Adding path to archive archive: {path}')
tar.add(path)
- uses: actions/upload-artifact@v6.0.0
with:
name: ${{ inputs.key }}
path: tmp_artifact_upload
retention-days: 1
- name: Clean up
shell: python3 {0}
run: |
from shutil import rmtree
rmtree('tmp_artifact_upload')
+34
View File
@@ -0,0 +1,34 @@
## Contributing
#### Feature Requests
Any feature requests should be posted to the [Feature
Requests](https://forum.juce.com/c/feature-requests/) section of the JUCE
forum.
#### Bug Reports
The [JUCE forum](https://forum.juce.com/) is also the best place to file bug
reports. The JUCE developers are very active there and will read every post and
respond accordingly.
#### Pull Requests
You must sign the [JUCE Contribution Licence Agreement](https://cla.juce.com/)
before your code can be considered for inclusion into JUCE. The automated build
of your Pull Request (PR) will fail if either the author or committer of any
commits in your PR has not signed the Contribution Licence Agreement.
This repository contains just the public branches of the main JUCE development
repository. Any work in your PR will not be merged into any other branch in
this repository, but will instead be reproduced in our private repository. We
may refactor and rewite any code submitted to us in PRs.
All work should be based on our `develop` branch.
#### Code Of Conduct
All interactions of any kind with the code in this repository or the
surrounding commentary in Issues or Pull Requests must abide by our [Code of
Conduct](https://berlincodeofconduct.org/).
+4
View File
@@ -0,0 +1,4 @@
Thank you for submitting a pull request.
Please make sure you have read and followed our contribution guidelines (.github/contributing.md in this repository). Your pull request will not be accepted if you have not followed the instructions.
+34
View File
@@ -0,0 +1,34 @@
name: check-CLA
on: [pull_request_target]
jobs:
check-cla:
runs-on: ubuntu-latest
env:
PR_NUMBER: ${{ github.event.number }}
steps:
- name: check-CLA
if: github.repository == 'juce-framework/JUCE'
run: |
import urllib.request
import json
import sys
def jsonRequest(url, data={}):
req = urllib.request.Request(url,
headers={'Content-Type': 'application/json'},
data=json.dumps(data).encode('utf-8') if data else None)
with urllib.request.urlopen(req) as response:
return json.loads(response.read().decode('utf-8'))
prCommits = jsonRequest('https://api.github.com/repos/juce-framework/JUCE/pulls/${{ github.event.number }}/commits')
print(f'Commit info:\n{json.dumps(prCommits, indent=4)}')
allAuthors = [commit[authorType]['login'] for authorType in ['author', 'committer'] for commit in prCommits if commit[authorType]]
uniqueAuthors = [name for name in list(set(allAuthors)) if name != 'web-flow']
if (len(uniqueAuthors) == 0):
print(f'\nNo author or committer user IDs contained within commit information\n\n{prCommits}\n')
sys.exit(1)
print(f'Authors: {uniqueAuthors}')
claResult = jsonRequest('https://cla.juce.com/check', {'logins': uniqueAuthors})
unsignedLogins = claResult['unsigned']
if (len(unsignedLogins) != 0):
print(f'\nThe following GitHub users need to sign the JUCE CLA: {", ".join(unsignedLogins)}\n\nPlease go to https://cla.juce.com to sign the JUCE Contributor Licence Agreement\n')
sys.exit(1)
shell: python
+13
View File
@@ -0,0 +1,13 @@
import logging
from os import getenv
from sys import stdout
def configure_logger(logger):
handler = logging.StreamHandler(stdout)
formatter = logging.Formatter('[%(name)s] %(message)s')
handler.setFormatter(formatter)
level = logging.DEBUG if (getenv('RUNNER_DEBUG', '0').lower() not in ('0', 'f', 'false')) else logging.INFO
logger.setLevel(level)
handler.setLevel(level)
logger.addHandler(handler)
+55
View File
@@ -0,0 +1,55 @@
from configure_logger import configure_logger
from logging import getLogger
from urllib.request import Request, urlopen
from urllib.error import HTTPError, URLError
from json import dumps, loads
from os import environ
from shutil import copyfileobj
from time import sleep
logger = getLogger(__name__)
configure_logger(logger)
def github_api_request(path, method='GET', data=None):
url = f'https://api.github.com/repos/{environ["GITHUB_REPOSITORY"]}/{path}'
logger.debug(f'Requesting GitHub API: {url}')
serialised_data = dumps(data).encode('utf-8') if data else None
if serialised_data:
logger.debug(f'Data: {serialised_data}')
req = Request(
url=url,
method=method,
headers={
'Accept': 'application/vnd.github+json',
'X-GitHub-Api-Version': '2022-11-28'
},
data=serialised_data
)
req.add_unredirected_header('Authorization', f'Bearer {environ["GITHUB_API_TOKEN"]}')
num_attempts = 0
while True:
response = None
try:
response = urlopen(req)
return response
except (HTTPError, URLError) as e:
num_attempts += 1
if num_attempts == 3:
logger.warning(f'GitHub API access failed\n{e.reason}\n{e.headers}\n{e.fp.read()}')
raise e
logger.debug(f'Request attempt {num_attempts} failed, retrying')
sleep(10)
def json_github_api_request(path, method='GET', data=None):
with github_api_request(path, method, data) as response:
result = loads(response.read().decode('utf-8'))
logger.debug(f'GitHub API result: {result}')
return result
def download_github_api_request(filename, path, method='GET', data=None):
with github_api_request(path, method, data) as response:
with open(filename, 'wb') as f:
copyfileobj(response, f)
logger.debug(f'Downloaded to: {filename}')
+135
View File
@@ -0,0 +1,135 @@
name: JUCE Private Build
on:
workflow_dispatch:
inputs:
triggerer:
required: false
type: string
default: ''
description: The GitHub ID to receive email notifications (leave blank)
nightly-targets:
required: false
type: string
default: "[]"
description: A list of nightly build targets in JSON format
cpp-std:
required: false
type: string
default: ""
description: The C++ standard to use (optional [20, 23])
commit-message:
required: false
type: string
default: ""
description: Shortened subject of the triggering commit (optional, will default to the triggering commit's message or SHA)
env:
target_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run-name: "[${{ inputs.triggerer && inputs.triggerer || github.event.sender.login }}] ${{ inputs.commit-message && inputs.commit-message || github.sha }}"
jobs:
setup:
if: ${{ (inputs.nightly-targets == '[]') && (inputs.cpp-std == '') }}
name: Check and set CI commit status
runs-on: ubuntu-latest
env:
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
outputs:
build: ${{ steps.status_check.outputs.build }}
steps:
- uses: actions/checkout@v6.0.2
with:
fetch-depth: 0
sparse-checkout: |
.github/workflows
- id: status_check
shell: python
run: |
import sys
import os
sys.path.append(os.path.abspath('.github/workflows'))
from github_api_request import json_github_api_request
sha = os.environ["GITHUB_SHA"]
statuses_response = json_github_api_request(f'commits/{sha}/statuses')
status = next(filter(lambda x: x['context'] == 'CI', statuses_response), None)
if (status is None) or (status['state'] != 'success'):
with open(os.environ['GITHUB_OUTPUT'], 'a') as f:
f.write(f'build=1\n')
data = {
'state': 'pending',
'context': 'CI',
'target_url': os.environ['target_url'],
}
post_response = json_github_api_request(f'statuses/{sha}', 'POST', data)
print(post_response)
build:
if: ${{ !cancelled() && (success() || needs.setup.result == 'skipped') && inputs.nightly-targets == '[]' && (inputs.cpp-std != '' || needs.setup.outputs.build == '1' || contains(fromJSON('["master"]'), github.ref_name)) }}
needs: [setup]
name: .
# Not having the ability to do a dynamic 'uses' call is a real pain. To
# test some new CI configuration you must set the branch in both places
# below.
uses: juce-framework/JUCE-utils/.github/workflows/main.yml@master
with:
juce-utils-branch: &juce-utils-branch master
triggerer: &triggerer ${{ inputs.triggerer && inputs.triggerer || github.event.sender.login }}
cpp-std: ${{ inputs.cpp-std }}
secrets: inherit
nightly:
if: ${{ inputs.nightly-targets != '[]' }}
name: .
uses: juce-framework/JUCE-utils/.github/workflows/nightly.yml@master
with:
juce-utils-branch: *juce-utils-branch
nightly-targets: ${{ inputs.nightly-targets }}
triggerer: *triggerer
secrets: inherit
deploy:
if: ${{ !cancelled() && !contains(needs.*.result, 'failure') && contains(fromJSON('["success", "skipped"]'), needs.build.result) && contains(fromJSON('["master", "develop", "wayland"]'), github.ref_name) && inputs.cpp-std == '' && inputs.nightly-targets == '[]' }}
needs: [setup, build]
name: Deploy
uses: juce-framework/JUCE-utils/.github/workflows/deploy.yml@master
secrets: inherit
submit-sbom:
# juce_submit_sbom.yml is also called directly for pushes to master in the
# public repository - it only has an effect on the default branch
if: ${{ !cancelled() && !contains(needs.*.result, 'failure') && needs.deploy.result == 'success' && contains(fromJSON('["develop"]'), github.ref_name) && inputs.cpp-std == '' && inputs.nightly-targets == '[]' }}
needs: [setup, build, deploy]
name: Submit SBOM
permissions:
contents: write
uses: ./.github/workflows/juce_submit_sbom.yml
docs:
if: ${{ !cancelled() && !contains(needs.*.result, 'failure') && needs.deploy.result == 'success' && contains(fromJSON('["master", "develop"]'), github.ref_name) && inputs.cpp-std == '' && inputs.nightly-targets == '[]' }}
needs: [setup, build, deploy]
name: Docs
uses: juce-framework/JUCE-utils/.github/workflows/docs.yml@master
secrets: inherit
set-commit-status:
if: ${{ always() && (inputs.nightly-targets == '[]') && (inputs.cpp-std == '') }}
needs: [setup, build, deploy, submit-sbom, docs]
name: Set CI commit status
runs-on: ubuntu-latest
env:
result: ${{ contains(needs.*.result, 'cancelled') && 'cancelled' || (contains(needs.*.result, 'failure') && 'failure' || 'success') }}
steps:
- uses: myrotvorets/set-commit-status-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
sha: ${{ github.sha }}
status: ${{ contains(fromJSON('["cancelled", "failure"]'), env.result) && 'failure' || env.result }}
context: CI
description: ${{ env.result }}
targetUrl: ${{ env.target_url }}
notify:
if: ${{ always() && !contains(needs.*.result, 'cancelled') }}
needs: [setup, build, nightly, deploy, docs, submit-sbom]
name: Notify
uses: juce-framework/JUCE-utils/.github/workflows/notify.yml@master
with:
juce-utils-branch: *juce-utils-branch
triggerer: *triggerer
context: ${{ toJson(needs) }}
secrets: inherit
@@ -0,0 +1,16 @@
name: JUCE Private GitHub Publish
on:
workflow_dispatch:
inputs:
tag:
required: true
type: string
description: The tag to publish - 5.4.5 (for JUCE 5.4.5)
jobs:
publish-github-release:
uses: juce-framework/JUCE-utils/.github/workflows/github_publish.yml@master
with:
tag: ${{ inputs.tag }}
secrets: inherit
@@ -0,0 +1,32 @@
name: JUCE Private Nightly Trigger
on:
workflow_dispatch:
schedule:
- cron: '0 3 * * *'
env:
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TRIGGER_WORKFLOW_REF: develop
jobs:
juce-private-nightly-trigger:
if: github.repository == 'juce-framework/JUCE-dev'
name: JUCE Nightly Trigger
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
with:
sparse-checkout: ./.github/workflows
- env:
TRIGGER_WORKFLOW_INPUTS: |
{"triggerer":"Nightly Build Targets","nightly-targets":${{ vars.NIGHTLY_BUILD_TARGETS }}}
run: &trigger-workflow python3 ./.github/workflows/trigger_workflow.py
- if: ${{ contains(fromJSON(vars.NIGHTLY_BUILD_TARGETS), 'cpp20') }}
env:
TRIGGER_WORKFLOW_INPUTS: |
{"triggerer":"Nightly Build C++20","cpp-std":"20"}
run: *trigger-workflow
- if: ${{ contains(fromJSON(vars.NIGHTLY_BUILD_TARGETS), 'cpp23') }}
env:
TRIGGER_WORKFLOW_INPUTS: |
{"triggerer":"Nightly Build C++23","cpp-std":"23"}
run: *trigger-workflow
@@ -0,0 +1,31 @@
name: Push Trigger
on:
push:
branches:
- master
- develop
- bugfix/**
- feature/**
- wayland
jobs:
run-ci:
if: github.repository == 'juce-framework/JUCE-dev'
name: Run CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
with:
sparse-checkout: ./.github/workflows
- name: Trigger a CI build using the GitHub API
env:
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TRIGGER_WORKFLOW_INPUTS: |
{"triggerer":"${{ github.actor }}"}
TRIGGER_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
run: python3 ./.github/workflows/trigger_workflow.py
submit-sbom:
if: github.repository == 'juce-framework/JUCE' && github.ref_name == 'master'
name: Submit SBOM
permissions:
contents: write
uses: ./.github/workflows/juce_submit_sbom.yml
+25
View File
@@ -0,0 +1,25 @@
name: JUCE Submit SBOM
# Uploads the committed software bill of materials (JUCE.spdx.json) to GitHub's
# dependency submission API, so that the vendored third-party code appears in
# the repository's dependency graph and in GitHub's own SBOM export.
on:
workflow_call:
workflow_dispatch:
jobs:
submit-sbom:
if: github.repository_owner == 'juce-framework'
name: Submit SBOM to the dependency graph
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6.0.2
- name: Check that the committed document is up to date
run: python3 extras/SBOM/generate_sbom.py . --check
- name: Submit the dependency snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python3 extras/SBOM/submit_dependency_snapshot.py .
+40
View File
@@ -0,0 +1,40 @@
from configure_logger import configure_logger
from github_api_request import github_api_request, json_github_api_request
from logging import getLogger
from os import getenv
from json import loads, dumps
logger = getLogger(__name__)
configure_logger(logger)
input_string = getenv('TRIGGER_WORKFLOW_INPUTS', '{}')
logger.debug(f'Input variable: {input_string}')
input_json = loads(input_string)
for key, value in input_json.items():
if not isinstance(value, str):
input_json[key] = dumps(value)
commit_message = getenv('TRIGGER_COMMIT_MESSAGE', '').strip()
if commit_message:
subject = commit_message.splitlines()[0]
input_json['commit-message'] = subject[:69] + '...' if len(subject) > 72 else subject
logger.debug(f'Stringified input: {input_json}')
api_path_prefix = 'actions/workflows'
workflows = json_github_api_request(api_path_prefix)
workflow_path = getenv('TRIGGER_WORKFLOW_PATH',
'.github/workflows/juce_private_build.yml')
workflow = [x for x in workflows['workflows'] if x['path'] == workflow_path][0]
logger.debug(f'Workflow: {workflow}')
trigger_data = {
'ref': getenv('TRIGGER_WORKFLOW_REF', getenv('GITHUB_REF_NAME')),
'inputs': input_json
}
logger.debug(f'Trigger_data: {trigger_data}')
github_api_request(f'{api_path_prefix}/{workflow["id"]}/dispatches',
method='POST',
data=trigger_data)