No sound on Symbian^3 with Phonon



  • Santa brought me a C7, a Symbian 3 device. Much to my surprise I discovered
    that the Phonon code I had been happily using on 5800XM to play sounds was
    completely silent on C7, using the Qt built in the device.

    The following function is what I'm using:

    @void MainWindow::soundAlarm(const QListPhonon::MediaSource &sounds,
    qreal volume, bool vibrate)
    {
    #ifdef Q_OS_SYMBIAN
    if (iVibra && vibrate) {
    TRAPD(error,
    iVibra->StartVibraL(5000);
    );
    Q_UNUSED(error)
    }
    #endif

    _audioOutput->setVolume(volume);
    // Lots of trial and error to get this thing to play correct number of times
    // The below seems to work
    _mediaObject->setCurrentSource(sounds.at(0));
    for (int i = 1; i < sounds.length(); ++i)
    _mediaObject->enqueue(sounds.at(i));

    // _mediaObject->setQueue(sounds);
    // _mediaObject->setCurrentSource(sounds.at(0)); I would have expected this
    line to suffice

    _mediaObject->play();
    }
    @

    I have a faint recollection on seeing some mention of Symbian 3 volume
    handling having changed, or something, but I haven't yet found any existing
    bug report that would explain this.

    Any ideas?

    Thanks,



  • Which Qt version are you using?



  • Milot, as he said in his post

    bq. using the Qt built in the device.

    So it should be 4.6.3 I think



  • [quote author="Denis Kormalev" date="1293363496"]Milot, as he said in his post

    bq. using the Qt built in the device.

    So it should be 4.6.3 I think[/quote]

    I see, because it might be a problem with Qt 4.7 but now it's different I think.

    @grego

    This can be a problem with MMF (Symbian^3's multimedia framework) see "here":http://doc.qt.nokia.com/stable/platform-notes-symbian.html#multimedia-and-phonon-support because it's still experimental and you should look for Helix framework which is not shipped with Qt but you can look into it "here":http://wiki.forum.nokia.com/index.php/Phonon_Helix_plug-in_fixes_for_Symbian^3_devices



  • Thanks for the tip, indeed it seems that my issue was QTBUG-13952 which is also affecting C7.
    The Smart Installer is not smart enough yet to fix it.



  • The device you are using has Qt inbuilt and it is Qt 4.6.3.

    Phonon API was the deprecated API and it was used in Qt mobile extension project.
    (if I am not wrong)

    Instead you should use the Qt Multimedia API under the Qt mobility project.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.