I have a MP3 file in my Resources of Visual C#. I'm trying to find out if there is a way I can play this MP3 in a Windows Media Player control or with MCI, I'm not particular. I'm fairly new to C#. Thanks!
C# Play MP3 from Resources with MCI or WMP control?
6.2k views Asked by Chris At
2
There are 2 answers
0
Horacio N. Hdez.
On
this is a component for playing MP3 with C# on Windows Forms (it includes a demo app).
http://www.codeplex.com/keniamm/
hope this helps
Related Questions in RESOURCES
- need help solving this resource allocation problem
- How can I know if spark application/job is idle/waiting for resources?
- Why the strings of Resources contain garbage prefixes different sizes and how to trim it?
- Reading version from resource file dll project
- Azure resource creation issue - "The subscription is not allowed to create or update the serverfarm"
- Some users facing issues changing app language in Android app
- C#: Cannot access Resources dictionary only from MainWindow.xaml.cs file
- Cloning resources group into another
- REST APIs to demonstrate borrowed books and users from library
- Problem while deploying Aks using terraform in Azure
- Visual Studio is not re-generating Resources class anymore
- Can't find any new guides and documentation on WPF localization
- visual studio c# - dynamic insertion of images via reference
- Problem with loading resource Files in JavaFX
- How to give shape to view in adnroid
Related Questions in MP3
- kid3 - Import Album Art along with other tags from Discogs
- Implementing trim and fade filters with ffmpeg - MP3
- playing mp3 downloaded via curllib gets cut short
- Can Twilio save a voicemail in MP3 format when using the AWS S3 external storage option
- Using polly to generate audio from LLM output
- How to re-encode an audio to match another one, to avoid re-encoding the whole audio
- Can I just append mp3s to each other? Does that create audio artifacts?
- How can I make it so other people (and myself) can open the .py file and not have it crash when using mp3 files in the code?
- Problem with saving metadata in mp3 files using eyed3 (python)
- tagging mp3 file with TagLibSharp corrupts it
- Resolving "Module parse failed" error importing MP3s in NextJS14 TS?
- Play audio response from OpenAI TTS API in React Native with Expo
- MP3 file won't load on iOS Safari, works fine on MacOS / Chrome / Edge?
- How do you use eyed3 to create comments for MP3 files?
- Lamejs exports mp3 compressed audio file with no sound
Related Questions in WMP
- C# find the length of a video file
- Basic video editing using C# Windows Forms
- Mp3 player lags after selecting a song (c#)
- Windows Media Player Crashes when I load an Image Windows 10
- AxWMPLib.AxWindowsMediaPlayer has presented weird behavior for WMV files
- vb.net WMP shows vertical bars even if played in full screen or StretchToFit
- Windows Media Player VB.net
- Windows Media Player Plugin Development in Windows 10 (Visual Studio 2019)
- How to align Windows Media Player control to fit parent window?
- How do I delete WMP Playlists after playing?
- Can I set a WMP playlist with a string (path) array?
- WMP crashes when trying to create a playlist
- Streaming Youtube Video in WPF
- Playlist not playing
- .NET C# getting access violation when playing video with WMP
Related Questions in MCI
- mciSendString() doesn't play audio files that have cover art
- Female voice using MCI voice commands?
- MCIERR_DEVICE_OPEN error with mciSendString() c++
- Why mciSendString cannot open my mp3 file?
- MCI play function can only play a MIDI file once
- C++ not playing mp3 files through mciSendString
- PlaySound keeps giving me errors and not playing sound
- How do I pause a song played using MCI ? (using threading or multiprocessing)
- How to set Wav file volume in MCI (MCIWndSetVolum Error)
- Using mciSendString to play an mp3 file and not working (and also not giving any error)
- Stalling WMP with 4 or more streams
- Cause of data corruption in C++ vector?
- Issue when trying to play mp3 file via mciSendString (MCIERR_CANNOT_LOAD_DRIVER)
- "A problem occurred in initializing MCI" playsound issues
- How to prevent MCI window being shown?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
This page shows you how in just a few lines of code:
http://www.crowsprogramming.com/archives/58
Hope this helps.
Edit: Be sure to copy the .mp3 to your bin before you run it.
And here is the source code. Be sure to add a reference to wmp.dll in your project.