> On Aug 31, 2016, at 1:28 AM, Alexander Dyagilev <alervd...@gmail.com> wrote:
> 
> Hello,
> 
> I'm trying to decode an mp3 file. Getting ServiceMissingError ("The 
> QAudioDecoder object does not have a valid service").
> 
> At the same time QMediaPlayer can play the file.
> 
> Am I doing something wrong?
> 
> The code:
> 
> QSharedPointer<QAudioDecoder> decoder(new QAudioDecoder());
> 
> decoder->setSourceFilename("1.mp3");
> 
> decoder->start();

On what platform? QAudioDecoder depends on both support on the platform and on 
the presence of a Qt plug-in that uses the platform support. The support on OS 
X is so minimal that we wound up writing a platform-specific bit of code using 
Core Audio (which is not pleasant!).

It's also hard to figure what support is actually available on a given 
platform, and now I've forgotten how I figured it out!

-John Weeks

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to