{"id":16495505,"url":"https://github.com/blakepell/basicaudio","last_synced_at":"2025-10-27T22:31:01.374Z","repository":{"id":26634759,"uuid":"30090546","full_name":"blakepell/BasicAudio","owner":"blakepell","description":"A simple class library that facilitates recording audio in Windows desktop applications.","archived":false,"fork":false,"pushed_at":"2023-11-15T22:44:59.000Z","size":101,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-26T21:02:52.481Z","etag":null,"topics":[],"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/blakepell.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}},"created_at":"2015-01-30T21:00:37.000Z","updated_at":"2023-03-22T21:30:59.000Z","dependencies_parsed_at":"2023-01-14T05:04:11.177Z","dependency_job_id":null,"html_url":"https://github.com/blakepell/BasicAudio","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blakepell%2FBasicAudio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blakepell%2FBasicAudio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blakepell%2FBasicAudio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blakepell%2FBasicAudio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blakepell","download_url":"https://codeload.github.com/blakepell/BasicAudio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219860655,"owners_count":16556016,"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":[],"created_at":"2024-10-11T14:30:10.480Z","updated_at":"2025-10-27T22:31:01.055Z","avatar_url":"https://github.com/blakepell.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Basic Audio\n\n[![NuGet version (BasicAudio)](https://img.shields.io/badge/nuget-v2022.11.30.1-blue.svg?style=flat-square)](https://www.nuget.org/packages/BasicAudio/)\n[![NuGet version (BasicAudio)](https://img.shields.io/github/license/blakepell/basicaudio.svg?style=flat-square)](https://github.com/blakepell/BasicAudio/blob/master/LICENSE)\n\nBasic audio is a class library with a test project (audio player/recorder) to faciliate basic audio \nplaying and recording. There are other frameworks available to give you very detailed and complex \naudio functionality, this one aims to provide only the basic playback / record methods or provide light\nweight code you can include in your project.  That being the case, the goal is to keep it simple for \nthose that just want to incorporate playback/recording with minimal code or learning other frameworks.\n\nIf you need advanced recording and audio features I highly recommend [NAudio](https://github.com/naudio/NAudio).\n\nBasic audio was originally written in Visual Basic but is now built off of C#.  The Visual Basic \nversion has been left in this project for posterity and is in the 'Legacy Visual Basic Version' folder\nin the Solution Explorer.\n\nThe library provides its functionality through the mciSendString Windows API and thus binds it desktop\nuse cases. The playback features support wave files and mp3 files and the recoding supports wave files. \nThe class library contains 3 classes, one for playback, one for recording and one that is an MCI \nerror messages (there's an official API for this that I'll use in the future). The classes have \nbeen kept slim to facilitate ease of use. If you're looking for very detailed recording objects \nyou'll want to consider another framework such as [NAudio](https://github.com/naudio/NAudio). Note \nthat this records through whatever the currently selected recording device is in Windows.\n\n## OS Support\n\n- Windows 11\n- Windows 10\n- Windows 8.1\n- Windows 8\n- Windows 7\n- Windows Vista\n\n## .Net Framework Support\n\n- .NET 8.0\n- .NET 7.0\n- .NET 6.0\n- .NET 5.0\n- .NET Standard 2.1\n- .NET Standard 2.0\n- .NET Standard 1.3\n- .NET Framework 4.8\n- .NET Framework 4.7.2\n- .NET Framework 4.6.2\n- .NET Framework 4\n- .NET Framework 3.5\n\n## Start Recording Example\n\n##### C#\n\n```csharp\n// There are properties on this object to change the quality recording\nvar audioRecorder = new BasicAudio.Recording();\naudioRecorder.Filename = @\"c:\\test.wav\";\naudioRecorder.StartRecording();\n```\n\n##### VB.Net\n\n```vbnet\n' There are properties on this object to change the quality recording\nDim audioRecorder As New BasicAudio.Recording()\naudioRecorder.Filename = \"c:\\test.wav\"\naudioRecorder.StartRecording()   \n```\n## Stop Recording Example\n\n##### C#\n\n```csharp\n// File is written out to disk when this is called.  The filename property must already be set.\naudioRecorder.StopRecording();\n```\n\n##### VB.Net\n\n```vbnet\n' File is written out to disk when this is called.  The filename property must already be set.\naudioRecorder.StopRecording()\n```\n## Playback Example\n\n##### C#\n\n```csharp\nvar audioPlayer = new BasicAudio.AudioPlayer();\naudioPlayer.Filename = @\"c:\\test.mp3\";\naudioPlayer.Play();\n```\n\n##### VB.Net\n\n```vbnet\nDim audioPlayer As New BasicAudio.AudioPlayer()\naudioPlayer.Filename = \"c:\\test.mp3\"\naudioPlayer.Play()    ' Pause and Stop methods available\n```\n## Stop Recording Example\n\n##### C#\n\n```csharp\n// File is written out to disk when this is called.  The filename property must already be set.\naudioRecorder.StopRecording();\n```\n##### VB.Net\n\n```vbnet\n' File is written out to disk when this is called.  The filename property must already be set.\naudioRecorder.StopRecording()\n```\n## Troubleshooting\n\nOn some systems latency might be an issue due to installed audio drivers.  If this occurs and \nyour sound card support ASIO drivers then it might be worth it to research [ASIO for all](http://www.asio4all.org/).  I\nhave used this on two systems in the past with success in mitigating any lag.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblakepell%2Fbasicaudio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblakepell%2Fbasicaudio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblakepell%2Fbasicaudio/lists"}