Page 1 of 1

playing mp3 in a windows service

Posted: 24 May 2012 20:58
by kevintcore
I am using libvlc in an application that runs as a service. It plays mp3 files among other formats.
I am using waveout because it does not require a desktop (an active session / logon). That is a requirement.
However the sound quality playing an mp3 file is poor. It is often choppy and garbled in places.

I can reproduce this with the VLC UI player by selecting waveOut. The sound quality of the mp3 file is just as bad.
Using the default output or directX both sound fine. However, from my understanding, those require a desktop so I can't use them in my service.
Does anyone have any suggestions?

Re: playing mp3 in a windows service

Posted: 24 May 2012 21:10
by kevintcore
Update:
I have tried using vlc to convert my file to muLaw then playing in through the UI and it sounds equally as bad in waveout.

muLaw conversion:
vlc C:\temp\audio.mp3 :sout=#transcode{vcodec=none,vb=0,scale=0,acodec=mlaw,ab=16,channels=1,samplerate=32000}:standard{access=file,dst=audio.wav} vlc://quit

Re: playing mp3 in a windows service

Posted: 24 May 2012 23:17
by RĂ©mi Denis-Courmont
Your symptoms sound like unstable latency measurements from the waveOut API. How to fix it? That is a million dollar question (a.k.a. I wish I knew).