Re: Newbie: playing mp3

From: Todd A. Spatafore (todd_at_thetodd.com)
Date: 05/20/04


Date: Thu, 20 May 2004 15:54:46 -0700

The simple solution is to ask if you are sure you have an MP3 decoder on
your machine, but I'm going to assume that you do.

Next, I read somewhere else that someone had this same problem. The solution
for them was to start playback from position 1, the problem was some MP3's
try to playback from position 0 and no sound comes out. The code they
provided was (translated for your example below):

Audio a = new Audio("C:\\a.mp3");
a.Play();
a.SeekCurrentPosition(1,
Microsoft.DirectX.AudioVideoPlayback.SeekPositionFlags.SeekToKeyFrame)

Hope that helps.

Todd

"John" <jsparrowNOSPAM@ecclesdeletethiscollege.ac.uk> wrote in message
news:%23O$t8eeOEHA.2944@TK2MSFTNGP10.phx.gbl...
> New to DirectX, trying to play a MP3 file from C# (Framework 1.1, VS
> 2003).
> Code looks like:
>
> Audio a = new Audio("c:\\a.mp3");
> a.Play();
>
> But all I get is silence. Any ideas?? Works fine with WMA files.
>
> Thanks,
>
> John
>
>



Relevant Pages

  • Re: WMA files develop skip with WMP 9
    ... >I have observed the following problem: Upon playback (also with WMP ... Except for the aforementioned problem with these WMA files, ... >Michael Cook ... I've never heard of an audio file "developing" a fault like this, ...
    (microsoft.public.windowsmedia.player)
  • RE: WMA files develop skip with WMP 9
    ... "Michael Cook" wrote: ... > I have observed the following problem: Upon playback (also with WMP ... Except for the aforementioned problem with these WMA files, ... > are digital and the error correction setting is ...
    (microsoft.public.windowsmedia.player)
  • Jerky wma playback in WMP 7
    ... the playback of wma files is real jerky ... and slow in WMP 7.01. ...
    (microsoft.public.windowsmedia.player)