Results 1 to 8 of 8

Thread: How do we set our PATH?

  1. #1
    Join Date
    Nov 2010
    Posts
    23
    Thanks
    10
    Qt products
    Qt/Embedded
    Platforms
    MacOS X Windows

    Default How do we set our PATH?

    Hi guys, i'm new at Qt...
    I have some question...
    I want to make a music mobile application and i use QSound to play the sound.
    I couldn't put sound at the resource. So i try to play the sound from my PC path
    example: QSound:lay("C://user/home/qt/musicapp/guitar.wav");
    My question, if i installed the .sys file to nokia device, can we still play the sound or there are some alternatives to use sound?

    and i don't know how to use phonon to play mp3. How to use phonon? how to implement phonon exactly?

    thx for your responds, that will really help me

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How do we set our PATH?

    How do we set our PATH?
    On which platform?
    For windwows 7:
    http://www.itechtalk.com/thread3595.html

    if i installed the .sys file to nokia device,
    You mean the driver *.sys file - form windows???

    How to use phonon? how to implement phonon exactly?
    http://doc.trolltech.com/4.7/phonon-overview.html
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How do we set our PATH?

    He probably meant "sis" which is Symbian.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Nov 2010
    Posts
    23
    Thanks
    10
    Qt products
    Qt/Embedded
    Platforms
    MacOS X Windows

    Default Re: How do we set our PATH?

    I'm sorry, i meant sis for Symbian device...
    Will my apps still working fine if i put the path directory for my sound resource like that?
    Because for images, i used resource to make a paht (from prefix)
    thank you very much


    Added after 7 minutes:


    I'm sorry, I'm afraid i didn't ask the right question for my problem,
    I want to make a mobile application for nokia (symbian)
    the problem is, for my images, i use from resource (the prefix path) to my application so if I implement my program to nokia device, they can stil recognize my images because the .src file is in the same file with the .pro file

    But when i try to use sound, i can't put it in the resource file. So i have to use the path from my PC (from c://Qt/myProject/MySound/guitar.wav). The question is, when i use QMake to create .sys file, will it be a problem to the path for my sound?

    And about phonon, i try to read the docs, but i can't understand it. This is the first time i make program using Qt. I really need your help about using phonon to play a sound. How does it work?

    Thank you very much
    Last edited by ardisaz; 25th November 2010 at 15:52.

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How do we set our PATH?

    Quote Originally Posted by ardisaz View Post
    The question is, when i use QMake to create .sys file, will it be a problem to the path for my sound?
    Yes. There is no c:\ on symbian. You need to have a correct path there but you can make it relative to your application binary if you want using QCoreApplication::applicationDirPath().
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. The following user says thank you to wysota for this useful post:

    ardisaz (28th November 2010)

  7. #6
    Join Date
    Sep 2010
    Posts
    145
    Thanks
    1
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How do we set our PATH?

    You can embed binary data in your application without resources. Have a look at bin2h. Phonon's MediaSource takes accepts a QBuffer, which accepts a QByteArray, which has QByteArray::fromRawData().

  8. The following user says thank you to Timoteo for this useful post:

    ardisaz (28th November 2010)

  9. #7
    Join Date
    Nov 2010
    Posts
    16
    Thanked 1 Time in 1 Post

    Default Re: How do we set our PATH?

    I would put your sound file into a resource file. I think that you can create the QSound with the ":/sound.wav".

    I am guessing that you are using Symbian OS. The notes in QSound apply,


    CMdaAudioPlayerUtility is used. All formats that Symbian OS or devices support are supported also by Qt.

    I don't know if 'wav' files are supported. Can you run the 'CMdaAudioPlayerUtility' to play your sound? For Qt embedded linux, the OSS devices are used. You can try to use 'mplayer -ao oss sound.wav' if that is available on your device.

  10. The following user says thank you to ardvark for this useful post:

    ardisaz (28th November 2010)

  11. #8
    Join Date
    Nov 2010
    Posts
    23
    Thanks
    10
    Qt products
    Qt/Embedded
    Platforms
    MacOS X Windows

    Default Re: How do we set our PATH?

    Thx everyone, i try the QCoreApplication::applicationDirPath() and it worked well at my emulator...
    I havent test it to nokia device yet,
    I have one more question... I pun the sound file in the same folder with my .pro file. If i used QMake to create .sis file, my sound folder will be on the .sis file or not? If the .sis didn't contain my sound folder, what should i do to put the sound on the .sis file

    thx a bunch

Similar Threads

  1. path ressources
    By shenakan in forum Qt Programming
    Replies: 1
    Last Post: 28th October 2009, 16:46
  2. Replies: 8
    Last Post: 17th October 2009, 08:10
  3. Lib path
    By yagabey in forum Qt Programming
    Replies: 4
    Last Post: 3rd April 2009, 15:01
  4. Tracking Path
    By merry in forum Qt Programming
    Replies: 1
    Last Post: 6th February 2007, 12:27
  5. Which path should I use?
    By Dark_Tower in forum Newbie
    Replies: 3
    Last Post: 8th April 2006, 12:09

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.