{"id":22551320,"url":"https://github.com/joelumbley/audio-playback","last_synced_at":"2026-01-06T17:48:55.742Z","repository":{"id":227326363,"uuid":"771084560","full_name":"JoeLumbley/Audio-Playback","owner":"JoeLumbley","description":"Play multiple audio files simultaneously.","archived":false,"fork":false,"pushed_at":"2025-03-15T13:21:52.000Z","size":937,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T14:24:55.207Z","etag":null,"topics":["audio","audio-playback","loop","mcisendstringw","media-control-interface","overlapping","overlapping-audio-playback","pause","play","repete","volume-control","win32"],"latest_commit_sha":null,"homepage":"","language":"Visual Basic .NET","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/JoeLumbley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2024-03-12T16:56:33.000Z","updated_at":"2025-03-15T13:21:55.000Z","dependencies_parsed_at":"2024-03-17T17:25:57.241Z","dependency_job_id":"19c1ad8e-14f0-47d0-8a90-9e87f9a36f85","html_url":"https://github.com/JoeLumbley/Audio-Playback","commit_stats":null,"previous_names":["joelumbley/audio-playback"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoeLumbley%2FAudio-Playback","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoeLumbley%2FAudio-Playback/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoeLumbley%2FAudio-Playback/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoeLumbley%2FAudio-Playback/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JoeLumbley","download_url":"https://codeload.github.com/JoeLumbley/Audio-Playback/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246009076,"owners_count":20708881,"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":["audio","audio-playback","loop","mcisendstringw","media-control-interface","overlapping","overlapping-audio-playback","pause","play","repete","volume-control","win32"],"created_at":"2024-12-07T17:12:12.131Z","updated_at":"2026-01-06T17:48:55.711Z","avatar_url":"https://github.com/JoeLumbley.png","language":"Visual Basic .NET","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Audio Playback\n\nWelcome to **Audio Playback**, a dynamic and versatile tool crafted for seamless audio management using the Windows Multimedia API. This application is packed with features that make it an essential asset for developers and audio enthusiasts alike.\n\n\n\n\n\n\n\n![005](https://github.com/user-attachments/assets/fbe31a7e-3d0a-450d-aa1c-9ab0f965047e)\n\n\n\n\n\n\n\n## Key Features:\n\n- **Simultaneous Playback**: Unlock the full potential of the Windows Multimedia API by playing multiple audio files at the same time. This feature allows you to create rich, immersive audio experiences that captivate your audience.\n\n- **Precision Volume Control**: Tailor the volume levels of individual audio tracks with precision. This ensures that you achieve the perfect audio balance tailored to your unique requirements.\n\n- **Looping and Overlapping**: Effortlessly loop audio tracks and play overlapping sounds. This enables you to craft captivating and dynamic audio compositions that enhance your projects.\n\n- **MCI Integration**: Harness the power of the Media Control Interface (MCI) to interact with multimedia devices. This provides a standardized and platform-independent approach to controlling multimedia hardware, making your development process smoother.\n\n- **User-Friendly Interface**: Enjoy a clean and intuitive interface designed to simplify the management of audio playback operations. This makes it easy for users of all skill levels to navigate and utilize the application effectively.\n\nWith its robust functionality and seamless integration with the Windows Multimedia API, the Audio Playback application empowers you to create engaging multimedia applications effortlessly. Whether you’re a seasoned developer or an aspiring enthusiast, this tool is your gateway to unlocking the full potential of audio playback on the Windows platform.\n\n**Clone the repository now and embark on a transformative audio playback journey!** Let's dive into the world of audio together!\n\n\n\n---\n\n\n\n\n\n\n# Code Walkthrough\n\nWelcome to this detailed walkthrough of the `AudioPlayer` structure and the `Form1` class! We'll go through each line of code and explain its purpose. Let's dive in!\n\n[Index](#index)\n\n---\n\n\n\n## Imports\n\n```vb.net\nImports System.Runtime.InteropServices\nImports System.Text\nImports System.IO\n```\nThese imports bring in necessary namespaces for:\n- `System.Runtime.InteropServices`: For interacting with unmanaged code.\n- `System.Text`: For using the `StringBuilder` class.\n- `System.IO`: For file input and output operations.\n\n\n[Index](#index)\n\n---\n\n## AudioPlayer Structure\n\n```vb.net\nPublic Structure AudioPlayer\n```\nThis line defines a `Structure` named `AudioPlayer`. Structures in are value types that can contain data and methods.\n\n\n### DLL Import\n\n```vb.net\n\u003cDllImport(\"winmm.dll\", EntryPoint:=\"mciSendStringW\")\u003e\nPrivate Shared Function mciSendStringW(\u003cMarshalAs(UnmanagedType.LPWStr)\u003e ByVal lpszCommand As String,\n                                       \u003cMarshalAs(UnmanagedType.LPWStr)\u003e ByVal lpszReturnString As StringBuilder,\n                                       ByVal cchReturn As UInteger, ByVal hwndCallback As IntPtr) As Integer\nEnd Function\n```\nThis imports the `mciSendStringW` function from the `winmm.dll` library. This function sends a command string to the Media Control Interface (MCI) to control multimedia devices.\n\n[Index](#index)\n\n\n---\n\n\n## Adding Sounds\n\n### Sounds Array\n\n```vb.net\nPrivate Sounds() As String\n```\nThis declares an array named `Sounds` to store the names of sounds that have been added.\n\n\n### AddSound Method\n\n```vb.net\nPublic Function AddSound(SoundName As String, FilePath As String) As Boolean\n```\nThis method adds a sound to the player. It takes the name of the sound and the path to the sound file as parameters.\n\n\n\n\n```vb.net\nIf Not String.IsNullOrWhiteSpace(SoundName) AndAlso IO.File.Exists(FilePath) Then\n```\nChecks if the sound name is not empty or whitespace and if the file exists.\n\n```vb.net\nDim CommandOpen As String = $\"open \"\"{FilePath}\"\" alias {SoundName}\"\n```\nCreates a command string to open the sound file and assign it an alias.\n\nThe **double quotes `\"\"`** around `{FilePath}` are needed because file paths in commands can contain spaces. If a file path includes spaces, the command might not interpret it correctly unless it's enclosed in quotes. For example, `C:\\My Files\\file.wav` would be misinterpreted without quotes. \n\nEnclosing the file path in double quotes ensures that the entire path is treated as a single string, even if it contains spaces. This way, the command parser correctly recognizes it as the full path to the file.\n\nHere's a simple example:\n- Without quotes: `open C:\\My Files\\file.wav alias SoundAlias` would fail.\n- With quotes: `open \"C:\\My Files\\file.wav\" alias SoundAlias` works properly.\n\n```vb.net\nIf Sounds Is Nothing Then\n```\nChecks if the `Sounds` array is uninitialized.\n\n```vb.net\nIf SendMciCommand(CommandOpen, IntPtr.Zero) Then\n```\nSends the command to open the sound file.\n\n```vb.net\nReDim Sounds(0)\nSounds(0) = SoundName\nReturn True\n```\nInitializes the `Sounds` array with the new sound and returns `True`.\n\n```vb.net\nElseIf Not Sounds.Contains(SoundName) Then\n```\nChecks if the sound is not already in the array.\n\n```vb.net\nArray.Resize(Sounds, Sounds.Length + 1)\nSounds(Sounds.Length - 1) = SoundName\nReturn True\n```\nAdds the new sound to the `Sounds` array and returns `True`.\n\n```vb.net\nDebug.Print($\"{SoundName} not added to sounds.\")\nReturn False\n```\nPrints a debug message and returns `False` if the sound could not be added.\n\n[Index](#index)\n\n\n---\n\n\n## Setting Volume\n\n\n### SetVolume Method\n\n```vb.net\nPublic Function SetVolume(SoundName As String, Level As Integer) As Boolean\n```\nThis method sets the volume of a sound. It takes the sound name and volume level (0 to 1000) as parameters.\n\n```vb.net\nIf Sounds IsNot Nothing AndAlso\n   Sounds.Contains(SoundName) AndAlso\n   Level \u003e= 0 AndAlso Level \u003c= 1000 Then\n```\nChecks if the `Sounds` array is not empty, contains the sound, and the volume level is valid.\n\n```vb.net\nDim CommandVolume As String = $\"setaudio {SoundName} volume to {Level}\"\nReturn SendMciCommand(CommandVolume, IntPtr.Zero)\n```\nCreates and sends the command to set the volume.\n\n```vb.net\nDebug.Print($\"{SoundName} volume not set.\")\nReturn False\n```\nPrints a debug message and returns `False` if the volume could not be set.\n\n[Index](#index)\n\n\n\n---\n\n\n## Looping Sounds\n\n\n### LoopSound Method\n\n```vb.net\nPublic Function LoopSound(SoundName As String) As Boolean\n```\nThis method loops a sound. It takes the sound name as a parameter.\n\n```vb.net\nIf Sounds IsNot Nothing AndAlso Sounds.Contains(SoundName) Then\n```\nChecks if the `Sounds` array is not empty and contains the sound.\n\n```vb.net\nDim CommandSeekToStart As String = $\"seek {SoundName} to start\"\nDim CommandPlayRepeat As String = $\"play {SoundName} repeat\"\nReturn SendMciCommand(CommandSeekToStart, IntPtr.Zero) AndAlso\n       SendMciCommand(CommandPlayRepeat, IntPtr.Zero)\n```\nCreates and sends commands to seek to the start of the sound and play it in a loop.\n\n```vb.net\nDebug.Print(Debug.Print($\"{SoundName} not looping.\")\nReturn False\n```\nPrints a debug message and returns `False` if the sound could not be looped.\n\n[Index](#index)\n\n\n---\n\n\n## Playing Sounds\n\n\n### PlaySound Method\n\n```vb.net\nPublic Function PlaySound(SoundName As String) As Boolean\n```\nThis method plays a sound. It takes the sound name as a parameter.\n\n```vb.net\nIf Sounds IsNot Nothing AndAlso Sounds.Contains(SoundName) Then\n```\nChecks if the `Sounds` array is not empty and contains the sound.\n\n```vb.net\nDim CommandSeekToStart As String = $\"seek {SoundName} to start\"\nDim CommandPlay As String = $\"play {SoundName} notify\"\nReturn SendMciCommand(CommandSeekToStart, IntPtr.Zero) AndAlso\n SendMciCommand(CommandPlay, IntPtr.Zero)\n\n```\nCreates and sends commands to seek to the start of the sound and play it.\n\n```vb.net\nDebug.Print($\"{SoundName} not playing.\")\nReturn False\n```\nPrints a debug message and returns `False` if the sound could not be played.\n\n[Index](#index)\n\n---\n\n\n## Pausing Sounds\n\n\n\n### PauseSound Method\n\n```vb.net\nPublic Function PauseSound(SoundName As String) As Boolean\n```\nThis method pauses a sound. It takes the sound name as a parameter.\n\n```vb.net\nIf Sounds IsNot Nothing AndAlso Sounds.Contains(SoundName) Then\n```\nChecks if the `Sounds` array is not empty and contains the sound.\n\n```vb.net\nDim CommandPause As String = $\"pause {SoundName} notify\"\nReturn SendMciCommand(CommandPause, IntPtr.Zero)\n```\nCreates and sends the command to pause the sound.\n\n```vb.net\nDebug.Print($\"{SoundName} not paused.\")\nReturn False\n```\nPrints a debug message and returns `False` if the sound could not be paused.\n\n[Index](#index)\n\n\n\n\n[Index](#index)\n\n\n---\n\n\n## Managing Overlapping Sounds\n\n\n### AddOverlapping Method\n\n```vb.net\nPublic Sub AddOverlapping(SoundName As String, FilePath As String)\n```\nThis method adds multiple overlapping instances of a sound. It takes the sound name and file path as parameters.\n\n```vb.net\nFor Each Suffix As String In {\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\"}\n    AddSound(SoundName \u0026 Suffix, FilePath)\nNext\n```\nLoops through a set of suffixes (A to L) and adds each sound instance with a unique name.\n\n[Index](#index)\n\n### PlayOverlapping Method\n\n```vb.net\nPublic Sub PlayOverlapping(SoundName As String)\n```\nThis method plays one instance of an overlapping sound. It takes the sound name as a parameter.\n\n```vb.net\nFor Each Suffix As String In {\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\"}\n    If Not IsPlaying(SoundName \u0026 Suffix) Then\n        PlaySound(SoundName \u0026 Suffix)\n        Exit Sub\n    End If\nNext\n```\nLoops through the set of suffixes and plays the first sound instance that is not already playing.\n\n[Index](#index)\n\n### SetVolumeOverlapping Method\n\n```vb.net\nPublic Sub SetVolumeOverlapping(SoundName As String, Level As Integer)\n```\nThis method sets the volume for all instances of an overlapping sound. It takes the sound name and volume level as parameters.\n\n```vb.net\nFor Each Suffix As String In {\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\"}\n    SetVolume(SoundName \u0026 Suffix, Level)\nNext\n```\nLoops through the set of suffixes and sets the volume for each sound instance.\n\n[Index](#index)\n\n\n---\n\n\n## Sending MCI Commands\n\n\n\n### SendMciCommand Method\n\n```vb.net\nPrivate Function SendMciCommand(command As String, hwndCallback As IntPtr) As Boolean\n```\nThis method sends an MCI command. It takes the command string and a window handle for the callback as parameters.\n\n```vb.net\nDim ReturnString As New StringBuilder(128)\nTry\n    Return mciSendStringW(command, ReturnString, 0, hwndCallback) = 0\nCatch ex As Exception\n    Debug.Print($\"Error sending MCI command: {command} | {ex.Message}\")\n    Return False\nEnd Try\n```\n\nHere, the `mciSendStringW` function is called with the command string. If the function returns `0`, it means the command was successfully sent. If an exception occurs, the error is printed, and the method returns `False`.\n\n[Index](#index)\n\n\n---\n\n\n## Getting Sound Status\n\n\n### GetStatus Method\n\n```vb.net\nPrivate Function GetStatus(SoundName As String, StatusType As String) As String\n```\nThis method gets the status of a sound. It takes the sound name and the status type (e.g., \"mode\") as parameters and returns the status as a string.\n\n```vb.net\nIf Sounds IsNot Nothing AndAlso Sounds.Contains(SoundName) Then\n    Dim CommandStatus As String = $\"status {SoundName} {StatusType}\"\n    Dim StatusReturn As New StringBuilder(128)\n    mciSendStringW(CommandStatus, StatusReturn, 128, IntPtr.Zero)\n    Return StatusReturn.ToString.Trim.ToLower\nEnd If\n```\nChecks if the `Sounds` array is not empty and contains the sound. Creates and sends the command to get the status, stores the result in `StatusReturn`, and returns the status as a trimmed, lowercase string.\n\n```vb.net\nCatch ex As Exception\n    Debug.Print($\"Error getting status: {SoundName} | {ex.Message}\")\nEnd Try\nReturn String.Empty\n```\nIf an exception occurs, the error is printed, and an empty string is returned.\n\n\n\n### IsPlaying Method\n\n```vb.net\nPublic Function IsPlaying(SoundName As String) As Boolean\n```\nThis method checks if a sound is playing. It takes the sound name as a parameter and returns a Boolean.\n\n```vb.net\nReturn GetStatus(SoundName, \"mode\") = \"playing\"\n```\nUses the `GetStatus` method to check if the sound is currently playing.\n\n\n[Index](#index)\n\n---\n\n\n\n\n\n\n\n\n## Closing Sounds\n\n### CloseSounds Method\n\n```vb.net\n\nPublic Sub CloseSounds()\n\n    If Sounds IsNot Nothing Then\n\n        For Each Sound In Sounds\n\n            Dim CommandClose As String = $\"close {Sound}\"\n\n            SendMciCommand(CommandClose, IntPtr.Zero)\n\n        Next\n\n        Sounds = Nothing\n\n    End If\n\nEnd Sub\n\n```\n\n- **Checks if the `Sounds` array is not empty:** This prevents any errors that might occur if `Sounds` is `Nothing` (or `null`) before attempting to loop through it.\n- **Loops through each sound and sends a command to close it:** This ensures that every sound in the `Sounds` array is properly closed using the `SendMciCommand` method.\n- **`Sounds = Nothing`:** This line sets the `Sounds` array to `Nothing` (or `null`). This effectively clears the reference to the array, making sure that all resources associated with the sounds are released, and it prevents further usage of the array without reinitialization.\n\nBy setting `Sounds` to `Nothing`, you are cleaning up and ensuring there are no lingering references to the sounds array, which can help with garbage collection and resource management in your application.\n\n[Index](#index)\n\n\n---\n\n\n\n## Form Class and Event Handlers\n\n\n\n### Form1 Class\n\n```vb.net\nPublic Class Form1\n```\nThis class defines a form in a Windows Forms application.\n\n\n### Player Declaration\n\n```vb.net\nPrivate Player As AudioPlayer\n```\nThis declares an instance of the `AudioPlayer` structure.\n\n\n### Form Load Event\n\n```vb.net\nPrivate Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load\n```\nThis method handles the form's `Load` event.\n\n```vb.net\nText = \"Audio Playback - Code with Joe\"\n```\nSets the form's title.\n\n\n### CreateSoundFiles Method\n\n```vb.net\nCreateSoundFiles()\n```\nCalls the `CreateSoundFiles` method to create the necessary sound files from embedded resources.\n\n\n### Adding and Setting Up Sounds\n\n```vb.net\nDim FilePath As String = Path.Combine(Application.StartupPath, \"level.mp3\")\nPlayer.AddSound(\"Music\", FilePath)\nPlayer.SetVolume(\"Music\", 600)\nFilePath = Path.Combine(Application.StartupPath, \"CashCollected.mp3\")\nPlayer.AddOverlapping(\"CashCollected\", FilePath)\nPlayer.SetVolumeOverlapping(\"CashCollected\", 900)\nPlayer.LoopSound(\"Music\")\nDebug.Print($\"Running... {Now}\")\n```\nSets up the sound files by specifying their file paths, adding them to the player, setting their volume, and starting to loop the \"Music\" sound. It prints a debug message indicating the form is running.\n\n\n### Button1 Click Event\n\n```vb.net\nPrivate Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click\nPlayer.PlayOverlapping(\"CashCollected\")\nEnd Sub\n```\nThis method handles the `Click` event for `Button1`. It plays an overlapping instance of the \"CashCollected\" sound.\n\n\n### Button2 Click Event\n\n```vb.net\nPrivate Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click\nIf Player.IsPlaying(\"Music\") = True Then\n    Player.PauseSound(\"Music\")\n    Button2.Text = \"Play Loop\"\nElse\n    Player.LoopSound(\"Music\")\n    Button2.Text = \"Pause Loop\"\nEnd If\nEnd Sub\n```\nThis method handles the `Click` event for `Button2`. It toggles between playing and pausing the \"Music\" sound and updates the button text accordingly.\n\n\n### Form Closing Event\n\n```vb.net\nPrivate Sub Form1_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing\nPlayer.CloseSounds()\nEnd Sub\n```\nThis method handles the form's `Closing` event. It closes all sound files to release resources.\n\n[Index](#index)\n\n\n\n\n---\n\n\n## Creating Sound Files\n\n\n\n\n### CreateSoundFiles Method\n\n```vb.net\nPrivate Sub CreateSoundFiles()\n    Dim FilePath As String = Path.Combine(Application.StartupPath, \"level.mp3\")\n    CreateFileFromResource(FilePath, My.Resources.level)\n    FilePath = Path.Combine(Application.StartupPath, \"CashCollected.mp3\")\n    CreateFileFromResource(FilePath, My.Resources.CashCollected)\nEnd Sub\n```\nThis method creates sound files from embedded resources. It specifies the file paths and calls `CreateFileFromResource` to write the resource data to the file system.\n\n\n### CreateFileFromResource Method\n\n```vb.net\n\nPrivate Sub CreateFileFromResource(filepath As String, resource As Byte())\n\n    Try\n\n        If Not IO.File.Exists(filepath) Then\n\n            IO.File.WriteAllBytes(filepath, resource)\n\n        End If\n\n    Catch ex As Exception\n\n        Debug.Print($\"Error creating file: {ex.Message}\")\n\n    End Try\n\nEnd Sub\n\n```\n\nThis method writes resource data to a file if it does not already exist. It handles exceptions by printing an error message.\n\n[Index](#index)\n\n---\n\n\n\n\n\n\n## Adding Resources\n\nTo add a resource file to your Visual Studio project, follow these steps:\n\n1. **Add a New Resource File**:\n   - From the **Project** menu, select `Add New Item...`.\n   - In the dialog that appears, choose `Resource File` from the list of templates.\n   - Name your resource file (e.g., `Resource1.resx`) and click `Add`.\n\n  \n![010](https://github.com/user-attachments/assets/a7ecfd06-8c4a-4230-8110-e22aec1f16b5)\n\n\n\n![006](https://github.com/user-attachments/assets/c70414fa-1563-4e71-8286-9c0de9c04db3)\n\n2. **Open the Resource Editor**:\n   - Double-click the newly created `.resx` file to open the resource editor.\n\n![009](https://github.com/user-attachments/assets/be296067-b008-4efa-b981-bf4d7e88f3f2)\n\n\n3. **Add Existing Files**:\n   - In the resource editor, click on the **Green Plus Sign** or right-click in the resource pane and select `Add Resource`.\n   - Choose `Add Existing File...` from the context menu.\n   - Navigate to the location of the MP3 file (or any other resource file) you want to add, select it, and click `Open`.\n\n\n![011](https://github.com/user-attachments/assets/d2cb9a9c-d395-4d91-8f7d-47e3c94b37bc)\n\n4. **Verify the Addition**:\n   - Ensure that your MP3 file appears in the list of resources in the resource editor. It should now be accessible via the Resource class in your code.\n\n5. **Accessing the Resource in Code**:\n   - You can access the added resource in your code using the following syntax:\n     ```vb\n     CreateFileFromResource(filePath, YourProjectNamespace.Resource1.YourResourceName)\n     ```\n\n6. **Save Changes**:\n   - Don’t forget to save your changes to the `.resx` file.\n  \n\n![012](https://github.com/user-attachments/assets/6641c30d-d002-4e06-a783-d2d3761c8c9e)\n\nBy following these steps, you can easily add any existing MP3 file or other resources to your Visual Studio project and utilize them within your Audio Playback application.\n\n\n[Index](#index)\n\n\n---\n\n\n\n\n\n\n\n# Related Projects\n\nIf you're interested in exploring a similar project, check out **Audio Playback C#**, which is a port of this project. You can find the C# version in its repository: [Audio Playback C# Repository](https://github.com/JoeLumbley/Audio-Playback-CS). \n\nFor more information about the original project, visit the [Audio Playback Repository](https://github.com/JoeLumbley/Audio-Playback). \n\nHappy coding!\n\n\n![013](https://github.com/user-attachments/assets/2576064e-19b6-4755-bf70-e6e9a3d2cfb8)\n\n\n\n\n---\n\n\n\n\n\n## Index\n\n\n- [Imports](#imports)\n\n- [AudioPlayer Structure](#audioPlayer-structure)\n\n- [Dll Import](#dll-import)\n\n[Adding Sounds](#adding-sounds)\n\n- [Sounds Array](#sounds-array)\n \n- [AddSound Method](#addSound-method)\n\n[Setting Volume](#setting-volume)\n\n- [SetVolume Method](#setvolume-method)\n\n[Looping Sounds](#looping-sounds)\n\n- [LoopSound Method](#loopsound-method)\n\n[Playing Sounds](#playing-sounds)\n\n- [PlaySound Method](#playsound-method)\n\n[Pausing Sounds](#pausing-sounds)\n\n- [PauseSound Method](#pausesound-method)\n\n\n[Managing Overlapping Sounds](#managing-overlapping-sounds)\n \n- [AddOverlapping Method](#addoverlapping-method)\n\n- [PlayOverlapping Method](#playoverlapping-method)\n\n- [SetVolumeOverlapping Method](#setVolumeoverlapping-method)\n\n[Sending MCI Commands](#sending-mci-commands)\n\n- [SendMciCommand Method](#sendmcicommand-method)\n\n[Getting Sound Status](#getting-sound-status)\n\n- [GetStatus Method](#getstatus-method)\n\n- [IsPlaying Method](#isplaying-method)\n\n\n[Closing Sounds](#closing-sounds)\n\n- [CloseSounds Method](#closesounds-method)\n\n[Form Class and Event Handlers](#form-class-and-event-handlers)\n \n- [Form1 Class](#form1-class)\n\n- [Player Declaration](#player-declaration)\n\n- [Form Load Event](#form-load-event)\n\n- [CreateSoundFiles Method](#createsoundfiles-method)\n\n- [Adding and Setting Up Sounds](#adding-and-setting-up-sounds)\n\n- [Button1 Click Event](#button1-click-event)\n\n- [Button2 Click Event](#button2-click-event)\n\n- [Form Closing Event](#form-closing-event)\n\n[Creating Sound Files](#creating-sound-files)\n \n- [CreateSoundFiles Method](#createsoundfiles-method)\n\n- [CreateFileFromResource Method](#createfilefromresource-method)\n\n[Adding Resources](#adding-resources)\n\n---\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoelumbley%2Faudio-playback","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoelumbley%2Faudio-playback","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoelumbley%2Faudio-playback/lists"}