{"action":"created","issue":{"url":"https://api.github.com/repos/FNA-XNA/FNA/issues/90","repository_url":"https://api.github.com/repos/FNA-XNA/FNA","labels_url":"https://api.github.com/repos/FNA-XNA/FNA/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/FNA-XNA/FNA/issues/90/comments","events_url":"https://api.github.com/repos/FNA-XNA/FNA/issues/90/events","html_url":"https://github.com/FNA-XNA/FNA/issues/90","id":195367848,"node_id":"MDU6SXNzdWUxOTUzNjc4NDg=","number":90,"title":"[Audio] Develop FACT audio library","user":{"login":"flibitijibibo","id":1396814,"node_id":"MDQ6VXNlcjEzOTY4MTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/1396814?v=4","gravatar_id":"","url":"https://api.github.com/users/flibitijibibo","html_url":"https://github.com/flibitijibibo","followers_url":"https://api.github.com/users/flibitijibibo/followers","following_url":"https://api.github.com/users/flibitijibibo/following{/other_user}","gists_url":"https://api.github.com/users/flibitijibibo/gists{/gist_id}","starred_url":"https://api.github.com/users/flibitijibibo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flibitijibibo/subscriptions","organizations_url":"https://api.github.com/users/flibitijibibo/orgs","repos_url":"https://api.github.com/users/flibitijibibo/repos","events_url":"https://api.github.com/users/flibitijibibo/events{/privacy}","received_events_url":"https://api.github.com/users/flibitijibibo/received_events","type":"User","site_admin":false},"labels":[{"id":302085809,"node_id":"MDU6TGFiZWwzMDIwODU4MDk=","url":"https://api.github.com/repos/FNA-XNA/FNA/labels/SDL2","name":"SDL2","color":"fbca04","default":false},{"id":302085882,"node_id":"MDU6TGFiZWwzMDIwODU4ODI=","url":"https://api.github.com/repos/FNA-XNA/FNA/labels/XNA4%20Feature","name":"XNA4 Feature","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":77,"created_at":"2016-12-13T21:03:30Z","updated_at":"2018-05-31T14:27:04Z","closed_at":null,"author_association":"MEMBER","body":"Currently the audio implementation is almost entirely written in C#, with system-level audio being pushed to OpenAL via the IALDevice API.\r\n\r\nIn addition to being slower than native code for the usual reasons, the abstraction layer and OpenAL dependency have become too much for FNA to accurately and reliably handle every possible case presented to us by the library of XNA games.\r\n\r\nWhat we need to do is take the native XACT API and create a native library that reimplements the XACT runtime. In addition to porting our existing XACT runtime to native code, we'll be removing the IALDevice entirely and replacing it with our own sound mixer that pushes the final output stream to low-level audio APIs (for our current platforms this will be done via SDL audio).\r\n\r\nMajor benefits include the XACT runtime running primarily on the audio thread rather than the game thread, removing a dependency (a dependency with a non-permissive license!), XACT logic pushing directly to the sound mixer (rather than through the SoundEffect API), the ability to actually stream wavedata (dramatically reducing RAM use) the ability for non-XNA games to have an XACT runtime available for Linux and macOS, and having a significant chunk of code running natively rather than through the CLR.\r\n\r\nThe major TODO list looks like this:\r\n\r\nXAudio2:\r\n- [x] Implement IXAudio2\r\n- [x] Implement IXAudio2Voice\r\n- [x] Implement IXAudio2SourceVoice\r\n- [x] Implement IXAudio2SubmixVoice\r\n- [x] Implement IXAudio2MasteringVoice\r\n- [ ] Implement X3DAudio API ([bounty available!](https://github.com/flibitijibibo/flibitBounties/issues/2))\r\n- [x] Implement XAPOBase API\r\n- [ ] Implement XAudio2FX API\r\n- [x] Create a hand-written mixer\r\n    - [x] Migrate existing FACT mixer to FAudio\r\n        - [x] MSADPCM Decoder\r\n        - [x] Resampler/Pitch Shifting\r\n        - [x] Looping, fixes #46\r\n    - [x] Source/Channel Volume Adjustment\r\n    - [x] Multichannel output mixing, fixes #80 and #112\r\n    - [x] Low/High/Band-Pass Filter Effects\r\n    - [x] XAPO Processing\r\n\r\nXACT3:\r\n- [x] Parsing\r\n- [x] Implement IXACT3Engine\r\n    - [x] Implement AudioCategory\r\n- [x] Implement IXACT3SoundBank\r\n- [x] Implement IXACT3WaveBank\r\n- [x] Implement IXACT3Cue\r\n- [x] Implement IXACT3Wave\r\n- [x] Implement XACT3D API\r\n- [x] Use FAudioEngineCallback to perform...\r\n    - [x] Engine Updates\r\n    - [x] Cue Updates\r\n      - [x] Interactive Cues\r\n      - [ ] Fade In/Out\r\n      - [ ] ReverbSend RPC\r\n- [x] Use FAudioVoiceCallback to perform...\r\n    - [x] Streaming WaveBank data\r\n    - [x] FACTWave state updates\r\n- [x] Replace low-level mixing code with FAudio\r\n\r\nXNA:\r\n- [x] Create FACT-CS\r\n- [x] Scrap FNA XACT code, replace with FACT-CS\r\n- [x] Scrap FNA SoundEffect code, rewrite to use FAudio API\r\n- [x] Scrap FNA Song code, rewrite to use XNA_Song API\r\n\r\nBonus Points:\r\n- [ ] Develop fake XAudio2.h C++ API that wraps on top of C API, for drop-in compile support\r\n- [x] WineDLL compatibility\r\n- [ ] Write an xWMA decoder\r\n\r\nEven though XACT was definitely written in C++ (as can be seen by how they implement the C API), we're going to try and keep it in pure C, to keep the dependency tree minimal. My expectation is that FACT's desktop version will only depend on SDL and SDL alone, so on Windows we won't depend on any MSVCRT libraries."},"comment":{"url":"https://api.github.com/repos/FNA-XNA/FNA/issues/comments/393548398","html_url":"https://github.com/FNA-XNA/FNA/issues/90#issuecomment-393548398","issue_url":"https://api.github.com/repos/FNA-XNA/FNA/issues/90","id":393548398,"node_id":"MDEyOklzc3VlQ29tbWVudDM5MzU0ODM5OA==","user":{"login":"flibitijibibo","id":1396814,"node_id":"MDQ6VXNlcjEzOTY4MTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/1396814?v=4","gravatar_id":"","url":"https://api.github.com/users/flibitijibibo","html_url":"https://github.com/flibitijibibo","followers_url":"https://api.github.com/users/flibitijibibo/followers","following_url":"https://api.github.com/users/flibitijibibo/following{/other_user}","gists_url":"https://api.github.com/users/flibitijibibo/gists{/gist_id}","starred_url":"https://api.github.com/users/flibitijibibo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flibitijibibo/subscriptions","organizations_url":"https://api.github.com/users/flibitijibibo/orgs","repos_url":"https://api.github.com/users/flibitijibibo/repos","events_url":"https://api.github.com/users/flibitijibibo/events{/privacy}","received_events_url":"https://api.github.com/users/flibitijibibo/received_events","type":"User","site_admin":false},"created_at":"2018-05-31T14:27:04Z","updated_at":"2018-05-31T14:27:04Z","author_association":"MEMBER","body":"Wrote up the new Microphone implementation; this actually won't be using FAudio but instead uses SDL directly since the APIs are damn near identical:\r\n\r\nhttps://github.com/FNA-XNA/FNA/blob/fact/src/Audio/Microphone.cs"}}
{"actor":{"display_login":"flibitijibibo"}}