📎 AI Summary:
The thread discusses adding background audio to a Visual Basic project, with the original poster seeking a method to include and play MP3 files efficiently. The user experiences an error when attempting to add MP3s directly and notes that uncompressed WAV files consume excessive space. A respondent suggests using Windows Media Player to play MP3 files within the application as a practical workaround.

Kevin Hu

Well-Known Member
Joined
Jan 17, 2016
Messages
11
Thread Author #1
Hi, I started a project with visual basic with microsoft visual studio. I want to add audio to my program and play it as background.

I searched the Internet and learned how to add .wav to my project. But .wav format is uncompressed audio, therefore it took a lot of space. If the mp3 file take about 1-3MB, then the converted file of wav would be around 20-40MB, that's a giant file.

I tried adding a mp3 file into visual basic but there's an error "InvalidOperationException was unhandled"

Is there a way to add .mp3 and play it as background in visual basic? If this option is not available, is it possible to add .mp3 file in other programming languages such as C#, C++