Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Unable to hear any sound on phonon

Unable to hear any sound on phonon

Scheduled Pinned Locked Moved Mobile and Embedded
phononqt4.8.5am335xaudioaudioplayermp3
1 Posts 1 Posters 949 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vk41286
    wrote on last edited by
    #1

    Hi,

    I am using the AM335x Sitara board. Qt4.8.5 is already ported onto this board. My Customer has a requirement of playing a mp3 file using phonon player. So here goes my code. The compilation is successful. But I hear no sound.

    All I want is to play mp3 file. The wave file anyways plays by default. However mp3 file doesnt.

    Target : Sitara Board Am335x EVM sk
    SDK used : version 8
    QT : 4.8.5
    Host PC : Ubuntu 14.04

    #include <QtGui>
    #include <QApplication>
    #include <QCoreApplication>
    #include <phonon/VideoPlayer>
    #include <phonon/MediaSource>
    #include <QUrl>
    #include <phonon/audiooutput.h>
    #include <phonon/mediaobject.h>
    #include <phonon/mediasource.h>
    #include <phonon/videowidget.h>
    
    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv);
        QCoreApplication::setApplicationName( "phonon" );
    
     /*   const QUrl url = QUrl( QLatin1String("/usr/Munjaane_Manjalli.mp3") );
        MediaSource src(url);
        MediaObject obj;
        obj.setCurrentSource(src);
        VideoWidget video;
        video.show();
        AudioOutput audio( VideoCategory );
        Phonon::createPath( &obj, &video );
        Phonon::createPath( &obj, &audio );
        obj.play();*/
    
    
        Phonon::MediaObject *mediaObject = Phonon::createPlayer(Phonon::NoCategory, Phonon::MediaSource("/usr/MunjaaneManjalli.mp3/"));
        mediaObject->play();
    
        return a.exec();
        
    }
    

    I have tried with two different ways to get the player working. I have added QT+=phonon in my .pro file. So compilation is success.

    When I run, I do not get any logs.
    Please help.

    Thanks in advance.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved