{"id":19535887,"url":"https://github.com/miyako/4d-plugin-sfml-audio","last_synced_at":"2025-02-26T04:18:13.452Z","repository":{"id":147172470,"uuid":"95501850","full_name":"miyako/4d-plugin-sfml-audio","owner":"miyako","description":"Record and play back wave audio ","archived":false,"fork":false,"pushed_at":"2021-11-28T02:14:57.000Z","size":58711,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-08T17:57:02.260Z","etag":null,"topics":["4d-plugin","audio"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miyako.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-27T00:40:49.000Z","updated_at":"2024-08-27T04:58:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"5e4c4222-7b0f-4188-8d07-57a500120246","html_url":"https://github.com/miyako/4d-plugin-sfml-audio","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-sfml-audio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-sfml-audio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-sfml-audio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-sfml-audio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miyako","download_url":"https://codeload.github.com/miyako/4d-plugin-sfml-audio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240788775,"owners_count":19857699,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["4d-plugin","audio"],"created_at":"2024-11-11T02:20:12.608Z","updated_at":"2025-02-26T04:18:13.433Z","avatar_url":"https://github.com/miyako.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"![version](https://img.shields.io/badge/version-18%2B-EB8E5F)\n![platform](https://img.shields.io/static/v1?label=platform\u0026message=mac-intel%20|%20mac-arm%20|%20win-32%20|%20win-64\u0026color=blue)\n[![license](https://img.shields.io/github/license/miyako/4d-plugin-tidy-html5)](LICENSE)\n![downloads](https://img.shields.io/github/downloads/miyako/4d-plugin-tidy-html5/total)\n\n# 4d-plugin-sfml-audio\n\nRecord and play wave audio. \n\nUsing [Simple and Fast Multimedia Library](https://www.sfml-dev.org/index.php).\n\nUpdated to SFML ``2.5.1``\n\nThe plugin can **play** one audio file at a time. Support file formats are ``WAV``, ``OGG/Vorbis``, and ``FLAC``. You can load the data using either ``IMPORT AUDIO FILE`` or ``SOUND SET DATA``.\n\nThe plugin can **record** from one audio capture device at a time. Every time the recording is stopped, a BLOB of sampling frames is returned. You can concatenate such BLOBs with ``COPY BLOB``. When done, use the ``EXPORT AUDIO FILE`` command to create a ``WAV``, ``OGG/Vorbis``, or ``FLAC`` file.\n\n### Remarks for Apple Silicon\n\n* accept arm64 as valid architecture (or just fix in Xcode)\n\n```\n# only the default architecture (i.e. 64-bit) is supported\n    if(NOT CMAKE_OSX_ARCHITECTURES STREQUAL \"arm64\")\n        message(FATAL_ERROR \"Only 64-bit architecture is supported\")\n    endif()\n```\n\n* fetch codec bottles\n\n```\nbrew fetch --bottle-tag=arm64_big_sur libao\nbrew fetch --bottle-tag=arm64_big_sur libogg\nbrew fetch --bottle-tag=arm64_big_sur libvorbis\nbrew fetch --bottle-tag=arm64_big_sur flac \n```\n\n### Screenshot\n\n\u003cimg width=\"505\" alt=\"screenshot\" src=\"https://user-images.githubusercontent.com/1725068/28803879-951a2e96-769a-11e7-96dc-9d3c2f0a98b8.png\"\u003e\n\n## Syntax\n\n```\nGET RECORDING DEVICES (devices)\n```\n\nParameter|Type|Description\n------------|------------|----\ndevices|ARRAY TEXT|\n\n```\ndevice:=Get default recording device\n```\n\nParameter|Type|Description\n------------|------------|----\ndevice|TEXT|\n\n```\nerror:=SOUND Start recording (params)\n```\n\nParameter|Type|Description\n------------|------------|----\nparams|TEXT|JSON\nerror|LONGINT|``-1`` if recording is not available\n\n```\ndata:=SOUND Stop recording (params)\n```\n\nParameter|Type|Description\n------------|------------|----\nparams|TEXT|JSON\ndata|BLOB|Sample frame data (array of ``Int16``)\n\n```\nSOUND STOP\nSOUND PAUSE\nSOUND PLAY\n```\n\n```\nSOUND SET DATA (data)\ndata:=SOUND Get data\n```\n\nParameter|Type|Description\n------------|------------|----\ndata|BLOB|``WAV``, ``OGG/Vorbis``, or ``FLAC`` data\n\n```\nSOUND SET PITCH (pitch)\npitch:=SOUND Get pitch\n```\n\nParameter|Type|Description\n------------|------------|----\npitch|REAL|Perceived fundamental frequency of a sound. Default is ``1``. Changing the pitch modifies the playing speed too.\n\n```\nSOUND SET VOLUME (volume)\nvolume:=SOUND Get volume\n```\n\nParameter|Type|Description\n------------|------------|----\nvolume|REAL|Volume between ``0`` (mute) and ``100`` (full volume).\n\n```\nSOUND SET POSITION (position)\nposition:=SOUND Get position\n```\n\nParameter|Type|Description\n------------|------------|----\nposition|LONGINT|Current playing position milliseconds\n\n```\nIMPORT AUDIO FILE (path;data)\n```\n\nParameter|Type|Description\n------------|------------|----\npath|TEXT|\n\n```\nEXPORT AUDIO FILE (path;data;sampleRate;channelCount)\n```\n\nParameter|Type|Description\n------------|------------|----\npath|TEXT|\ndata|BLOB|Sample frame data (array of ``Int16``)\nsampleRate|LONGINT|\nchannelCount|LONGINT|\n\n```\nstatus:=SOUND Get status\n```\n\nParameter|Type|Description\n------------|------------|----\nstatus|LONGINT|``Sound status stopped 0``, ``Sound status paused 1``, ``Sound status playing 2``\n\n```\nSOUND SET LOOP (loop)\nloop:=SOUND Get loop\n```\n\nParameter|Type|Description\n------------|------------|----\nloop|LONGINT|\n\nduration:=SOUND Get duration\n\nParameter|Type|Description\n------------|------------|----\nduration|LONGINT|Duration in milliseconds\n\n```\nsampleRate:=SOUND Get sample rate\n```\n\nParameter|Type|Description\n------------|------------|----\nsampleRate|LONGINT|\n\n```\nchannelCount:=SOUND Get channel count\n```\n\nParameter|Type|Description\n------------|------------|----\nchannelCount|LONGINT|\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyako%2F4d-plugin-sfml-audio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiyako%2F4d-plugin-sfml-audio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyako%2F4d-plugin-sfml-audio/lists"}