×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jul 2009
    Posts
    46

    Play wav file in resources with QMediaPlayerControl

    I wonder if it is correct to play a sound file stored in application resource like this:
    Code:
    const QUrl url = QUrl::fromLocalFile(":/res/snd/sound.wav"));
    mPlayerControl->setMedia(QMediaContent(url), NULL);
    The device escalates a QMediaPlayer::ResourceError followed by a QMediaPlayer::AccessDeniedError.

    The code works if the url references a file on a storage (e:\\Music\\sample.mp3).


    Should I use QAudioOutput instead? but that case how volume level can be controlled?

  2. #2
    Registered User
    Join Date
    Jul 2009
    Posts
    46

    Re: Play wav file in resources with QMediaPlayerControl

    According to QSound technical solution, QSound can not play a sound file stored in the resources. I guess the same constraint applies to QMediaPlayer.

Similar Threads

  1. Play .wav file
    By NMMA in forum Symbian Media (Closed)
    Replies: 26
    Last Post: 2010-05-18, 23:05
  2. Play .wav file
    By pavan.pareta in forum Symbian
    Replies: 2
    Last Post: 2009-03-28, 19:56
  3. KErrNotSupported when play wav file?
    By 113115 in forum Symbian
    Replies: 2
    Last Post: 2008-12-22, 14:29
  4. how to play mp3 file and play long wav file
    By changsshuai in forum Symbian
    Replies: 6
    Last Post: 2008-09-02, 09:50
  5. How can I play the segment of an audio file, e.g. wav. file in my N73?
    By ipxx in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2007-07-30, 05:03

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×