{"id":18772501,"url":"https://github.com/feliwir/sharpaudio","last_synced_at":"2025-08-21T05:32:37.848Z","repository":{"id":33129812,"uuid":"152311492","full_name":"feliwir/SharpAudio","owner":"feliwir","description":"Audio playback/capturing engine for C# ","archived":false,"fork":false,"pushed_at":"2023-03-21T07:58:11.000Z","size":21376,"stargazers_count":189,"open_issues_count":17,"forks_count":19,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-08-01T01:58:07.403Z","etag":null,"topics":["audio","csharp","music","netcore","netstandard","openal","sound","wrapper","xaudio"],"latest_commit_sha":null,"homepage":null,"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/feliwir.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}},"created_at":"2018-10-09T19:46:51.000Z","updated_at":"2025-06-17T21:40:58.000Z","dependencies_parsed_at":"2024-01-14T17:16:51.635Z","dependency_job_id":null,"html_url":"https://github.com/feliwir/SharpAudio","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/feliwir/SharpAudio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feliwir%2FSharpAudio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feliwir%2FSharpAudio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feliwir%2FSharpAudio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feliwir%2FSharpAudio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feliwir","download_url":"https://codeload.github.com/feliwir/SharpAudio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feliwir%2FSharpAudio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271430803,"owners_count":24758378,"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","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["audio","csharp","music","netcore","netstandard","openal","sound","wrapper","xaudio"],"created_at":"2024-11-07T19:29:20.459Z","updated_at":"2025-08-21T05:32:36.503Z","avatar_url":"https://github.com/feliwir.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SharpAudio\r\nSharpAudio is a cross-platform, backend-agnostic library to playback sounds in .NET. It achieves that by wrapping the platform specific backends.\r\n\r\nSupported backends:\r\n- XAudio2\r\n- OpenAL\r\n\r\n\r\n# Build status\r\n\r\n![Build Status](https://github.com/feliwir/SharpAudio/workflows/CI/badge.svg?branch=master\u0026event=push)\r\n![Nuget](https://img.shields.io/nuget/v/SharpAudio)\r\n\r\n# Example\r\n\r\nSharpAudio provides a low-level interface that wraps audio sources \u0026 buffers:\r\n```csharp\r\n    var engine = AudioEngine.CreateDefault();\r\n    var buffer = engine.CreateBuffer();\r\n    var source = engine.CreateSource();\r\n\r\n    // Play a 1s long sound at 440hz\r\n    AudioFormat format;\r\n    format.BitsPerSample = 16;\r\n    format.Channels = 1;\r\n    format.SampleRate = 44100;\r\n    float freq = 440.0f;\r\n    var size = format.SampleRate;\r\n    var samples = new short[size];\r\n\r\n    for (int i = 0; i \u003c size; i++)\r\n    {\r\n        samples[i] = (short)(32760 * Math.Sin((2 * Math.PI * freq) / size * i));\r\n    }\r\n\r\n    buffer.BufferData(samples, format);\r\n\r\n    source.QueueBuffer(buffer);\r\n\r\n    source.Play();\r\n```\r\n\r\nA high level interface that can load and play sound files is provided in the SharpAudio.Codec package:\r\n```csharp\r\n    var engine = AudioEngine.CreateDefault();\r\n    var soundStream = new SoundStream(File.OpenRead(\"test.mp3\"), engine);\r\n\r\n    soundStream.Volume = 0.5f;\r\n    soundStream.Play();\r\n```\r\n\r\nThe following sound formats are supported at the moment:\r\n- `.wav` (PCM \u0026 ADPCM)\r\n- `.mp3` \r\n- `.ogg` (WIP: Vorbis \u0026 Opus)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeliwir%2Fsharpaudio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeliwir%2Fsharpaudio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeliwir%2Fsharpaudio/lists"}