×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Sep 2011
    Posts
    4

    Question Game sound and music poor preformance for qt c++ app

    Hello. I'm having some serious problems trying to make sound work properly for a Qt c++ game I'm making for Nokia devices... The use case is the following:

    Play any sound file (.wav, .mp3, .m4a) usind either qmedia, qsound or phonon. The sound freezes the app for a little time when starting and at the end of the sound.

    -Steps to reproduce the problem
    Play any sound file (.wav, .mp3, .m4a) usind either qmedia, qsound or phonon.

    -Short code snippet
    soundPlayer = new QMediaPlayer();
    soundPlayer->setMedia(QMediaContent(QUrl::fromLocalFile(QCoreApplication::applicationDirPath()+"/file.m4a")));
    soundPlayer->play();

    My working environment:
    -Version of Qt Creator (e.g. 4.6.3, 4.7 tech preview): Qt Creator 2.2.1 for Qt 4.7.3
    -Version of Qt Mobility API (1.0, 1.1): 1.1.3
    -Target device model (N8, C7): N8, 5230

    Is there a way for have sound files to play instantly and without interfering with a c++ qt game?
    I searched first here and couldn't found any solution to this...
    Thanks in advance.

  2. #2
    Regular Contributor
    Join Date
    Oct 2008
    Location
    Oslo, Norway
    Posts
    329

    Re: Game sound and music poor preformance for qt c++ app

    Hi,

    You may want to take a look at Qt Game Enabler, it implements a (relatively) low-latency audio engine. In practice, you need to use uncompressed audio (PCM) if you want to achieve low latency for game audio effects.

Similar Threads

  1. Recording Game Music
    By Samira11 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2008-08-12, 07:49
  2. Replies: 1
    Last Post: 2005-05-14, 05:52
  3. Emulators and Real preformance (s60, s40)
    By shmulikm29 in forum Mobile Java General
    Replies: 2
    Last Post: 2003-12-24, 06:46
  4. Hw to make bg music for game?
    By maychua in forum Symbian
    Replies: 4
    Last Post: 2003-09-14, 04:53
  5. Replies: 0
    Last Post: 1970-01-01, 02:00

Posting Permissions

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