Uploaded image for project: 'Qt Mobility'
  1. Qt Mobility
  2. QTMOBILITY-1002

Symbian audio backend discards data when suspended

XMLWordPrintable

      The Symbian QtMultimedia audio backend implements QAudioInput::suspend() and QAudioOutput::suspend() using CMMFDevSound::Stop(). This causes any data currently in transit between DevSound and the client to be discarded.

      There are two complementary ways to resolve this:

      1. The audio backend could allocate an internal buffer, and copy into it any in-transit data just before calling Stop(). This would allow the hack presently in the QAudioOutput implementation (inserting padding bytes when resume() is called, in order to ensure that processedUSecs() returns the correct value) to be removed
      2. CMMFDevSound::Pause() and CMMFDevSound::Resume() are functions which may optionally be supported by the DevSound implementation. Support can be checked as follows:
      /*
      // Defined in sf/os/mm/devsound/devsoundapi/inc/mmfdevsoundcustominterfacesupportclasses.h
      const TUid KMmfUidDevSoundTruePauseCustomInterface = {0x1028643E};
      class MMMFDevSoundTruePause
          {
      public:
          virtual TBool IsResumeSupported() = 0;
          virtual TInt Resume() = 0;
          };
      */
      
      TAny *interface = m_devsound->CustomInterface(KMmfUidDevSoundTruePauseCustomInterface);
       if (interface) {
           MMMFDevSoundTruePause *truePause = reinterpret_cast<MMMFDevSoundTruePause *>(interface);
           const bool supported = truePause->IsResumeSupported();
      }
      

      If supported, these functions could be used instead of solution 1.

        1. devsound-caps.zip
          3 kB
          Gareth Stockwell
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            gastockw Gareth Stockwell
            gastockw Gareth Stockwell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes