Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jan 2011

    Help with QSound, I have tried almost everything

    Ok, simple stuff here. I just started developing with QT. I must say the information is way too disperssed in my opinion, but anyways, I am just trying to make an specific kind of timer for my own use. My testing mobile device is a Nokia 5800.
    I managed to do the timer and everthing, the only thing left is the Sound. But it's really hard to get it to work.
    - At first, I tried using the file from the resources, no luck, then I read that QT for Symbian won't play sounds from resources.
    - I have tried opening an absolute path from my local computer, it works nice with simulator, but not with mobile device (obviously...)
    - I have also tried copying the file into the tmp folder and then read from there directly. I checked if it copies the file successfully, and in both cases the file exists. Sound works on emulator, doesn't work on mobile device.
    - I have tried the same, but copying in the current working folder, same checks, same results.

    Also, I checkes with QSound::isAvailable(), and it tells me I can play sounds in both, simulator and mobile device.
    Is it THAT hard to get sound working in QT? Any solutions? I read something about DEPLOYMENT, but I don't know exactly how to do that...

  2. #2
    Registered User
    Join Date
    Mar 2009

    Re: Help with QSound, I have tried almost everything

    I don't know if i catch what you want.
    If you want play a sound file, like .wav:
    1 - in the .pro file you must transfer a file:
    mySound.sources = Path\Dir\*.wav
    DEPLOYMENT = mySound
    2 - Play sound with QSound:
    QSound:: play("my.wav");

    In the step 2, you get the file in this manner because in first step you have asked for. You can use "mySound.path = mydir\OnDevice" to copy file in a specific path within device.
    If you want to use it on simulator, you just copy wav in the root of the application's path of the simulator
    Merry Christmas Tombola! available on OVI Store!
    SuperDaddy available on OVI Store!

    QT VirtualKeyboard: http://qt-apps.org/content/show.php/VirtualKeyboard?content=107388
    Crack Generator: http://qt-apps.org/content/show.php/MosaicCrack?content=121832

  3. #3
    Registered User
    Join Date
    Jan 2011

    Re: Help with QSound, I have tried almost everything

    Thanks. It seemed the problem was the WAV itself. I tried another WAV and it works perfectly ^^

Similar Threads

  1. QSound Usage
    By atonical in forum Nokia N9
    Replies: 3
    Last Post: 2010-04-12, 07:17

Posting Permissions

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