-
Mar 21st, 2025, 04:42 AM
#1
Thread Starter
Member
Playing .ogg, .mp3 and .wav files.
I'm creating an app which has a section in which the user can load and play up to 8 overlapping audio files. At the moment I'm using the Windows Media Player .dll and everything works perfectly.

Unfortunately, this can't play .ogg files (and I think the WMP dll is depreciated?)
How can I get the same functionality as the WMP but be able to play all 3 audio formats?
Any help would be greatly appreciated.
-
Mar 21st, 2025, 05:18 AM
#2
Re: Playing .ogg, .mp3 and .wav files.
Probably not supported but I haven't every played an ogg file.
Check:
https://stackoverflow.com/questions/...ogg-mp4-in-net
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Mar 21st, 2025, 06:19 AM
#3
Re: Playing .ogg, .mp3 and .wav files.
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Mar 21st, 2025, 06:46 AM
#4
Thread Starter
Member
Re: Playing .ogg, .mp3 and .wav files.
Thank you. I'll take a look at these later when I get the chance.
-
Mar 21st, 2025, 07:11 AM
#5
Re: Playing .ogg, .mp3 and .wav files.
theTrick has some very usable code for handling and playing MP3 files.
WMP is deprecated but should work for some time yet, however, it is developing issues playing some existing formats that used to work well on XP/Win 7 &c, now have problems on Win 10/11. Time to dump it. Sad but true.
https://github.com/yereverluvinunclebert
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
-
Mar 21st, 2025, 09:18 AM
#6
Re: Playing .ogg, .mp3 and .wav files.
I have a complete sample on the codebank taking advantage of the windows API but I won;t post it because it may be obsolete (i think it's over 8 years sample).
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Mar 21st, 2025, 02:36 PM
#7
Re: Playing .ogg, .mp3 and .wav files.
Starting with Windows 10, I would use Media Foundation. Especially with the IMFMediaEngine and IMFMediaEngineEx interfaces, you can quickly create a media player. However, Media Foundation cannot play OGG files. There are "Web Media Extensions" in the Microsoft Store that can also decode OGG. I haven't tested whether Media Foundation can play OGG with the extension installed. I also wouldn't use mixed media files (WAV, MP3, OGG, etc.) in one program. The easiest way is to use a media format that is natively supported in Windows, without having to install additional codecs.
-
Mar 22nd, 2025, 01:59 PM
#8
Lively Member
Re: Playing .ogg, .mp3 and .wav files.
I can confirm that the "Web Media Extensions" package in the Microsoft Store does in fact include .OGG/Vorbis playback ability.
It's a very quick and simply install.
https://xiph.org/vorbis/ has numerous tools (all simple .exe files to run from a command line) to encode and decode .OGG/Vorbis files. If you don't want to go the binary (MUCH FASTER) they also offer command line tools to add/modify metadata. The section with the metadata is near the beginning, easy to find/decode/encode.
-
Mar 25th, 2025, 04:26 PM
#9
Thread Starter
Member
Re: Playing .ogg, .mp3 and .wav files.
Last edited by MadLadDesigns; Mar 25th, 2025 at 04:28 PM.
Reason: Duplicate
Andy
[MadLad Designs]
-
Mar 25th, 2025, 04:27 PM
#10
Thread Starter
Member
Re: Playing .ogg, .mp3 and .wav files.
The app I'm creating is not a music player per-say, it plays audio files for atmosphere. I have many .ogg, .wav & .mp3 files I've bought as Humble Bundles.
So, it's not possible to play all 3 formats easily?
 Originally Posted by -Franky-
Starting with Windows 10, I would use Media Foundation. Especially with the IMFMediaEngine and IMFMediaEngineEx interfaces, you can quickly create a media player. However, Media Foundation cannot play OGG files. There are "Web Media Extensions" in the Microsoft Store that can also decode OGG. I haven't tested whether Media Foundation can play OGG with the extension installed. I also wouldn't use mixed media files (WAV, MP3, OGG, etc.) in one program. The easiest way is to use a media format that is natively supported in Windows, without having to install additional codecs.
-
Mar 25th, 2025, 08:23 PM
#11
Re: Playing .ogg, .mp3 and .wav files.
This isn't really a VB.NET language problem, it is a problem with operating systems and the tools it uses to recognise and play media formats. You are stepping into a world of problems by just dipping your toe into the water.
https://github.com/yereverluvinunclebert
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
-
Mar 26th, 2025, 02:11 AM
#12
Re: Playing .ogg, .mp3 and .wav files.
 Originally Posted by MadLadDesigns
So, it's not possible to play all 3 formats easily?
It's possible to play all three audio formats. The prerequisite is that you have the appropriate codecs installed on your PC, or the audio interface you're using (WMP, DirectSound, MediaFoundation, VLC, etc.) already includes suitable codecs. I haven't tried it. If you install the "Web Media Extensions" from the Microsoft Store, WMP might be able to play OGG files. It might also work if you install the codec from xiph.org. -> https://downloads.xiph.org/releases/...7220-win32.exe
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|