The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Good Question on WMA support for Windows Forms

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Dan Fernandez

Posts: 456
Nickname: danielfe
Registered: Aug, 2003

Daniel Fernandez is the Product Manager for C# in the developer division at Microsoft.
Good Question on WMA support for Windows Forms Posted: Feb 19, 2004 7:20 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Dan Fernandez.
Original Post: Good Question on WMA support for Windows Forms
Feed Title: Dan Fernandez's Blog
Feed URL: /msdnerror.htm?aspxerrorpath=/danielfe/Rss.aspx
Feed Description: Dan discusses Dot Net.
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Dan Fernandez
Latest Posts From Dan Fernandez's Blog

Advertisement

 J. Daniel Smith in the comments to my last post writes:
Why doesn't the new Sound control support WMA files? (Yes, I know it's just a wrapper around the Win32 control...) 

But still, this "mixed messaging" from Microsoft is a bit annoying at times: use WMA (and not MP3)...unless you want to embed it in your application, then you have to use WAV.“

 

Response:

Very good questions, and I have to give a good response to someone with “Daniel“ in their name:)  You are correct, the sound control does not support wma files (or MP3 file for that matter). 

 

Since I don't work on the team that built that control, don't consider my answer definitive (someone from that team, feel free to chime in here), but I'll give you my best guess.  One of the issues with playing sound files is that you need the codec that translates bits into music, and each music file type will have its own.  For example in MP3 files, you must license the codec from the Franhofer institute which owns the patent for MP3 (also known as Moving Picture Experts Group Layer-3 Audio), and this codec is currently in Windows Media Player, not in Windows.

 

Aside: For a short view on the history of MP3, visit http://www.du.edu/~yuchang/history.htm

 

For wma files, again Windows Media Player is the application that contains the codec and not Windows itself. Rather then discuss how great it would be from a development perspective if you could assume that Windows OS had better support for great sound codecs built-in, (was there a lawsuit about us adding more features to Windows?? Nah, everyone loves us), I'll stop here and tell you how you can solve this issue by using Windows Media Player:

 

What do you do if you want to play a WMA file in your Windows application?

You can easily play wma files by drag/dropping a Windows Media Player control onto your application, which will add the ability to play files just like WMP, and even includes other WMP features like playlist support.  This is done by adding a reference to the control - right click on the toolbox, select add items, select the COM tab, and scroll down to Windows Media Player (for reference it's at: “C:\windows\system32\wmp.dll“).

 

I've included some links to code samples using WMP, including some by Duncan and Eric.

 

 

Read: Good Question on WMA support for Windows Forms

Topic: MSDN Online.de Web Cast: WSE 2.0 Previous Topic   Next Topic Topic: Stuff to know about the Data Application Block

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use