Which module/library to play a wav file at varying frequencies?



  • Hello!
    I've been playing with Qt for a month or so, converting a few programs I've written in various older programming languages. Mostly it's been fairly simple, but I've gotten stuck and am just going in circles on this.

    Basically, I have some .wav file samples of an old sound chip, that need to play at varying frequencies.
    While I've found it's simple enough to play a .wav file as-is with either QSound, or using Audio from QtMultimedia; adjusting the frequency is another matter.
    I've tried a couple different things with no success:

    • I thought I might be able to use QtAudioEngine with Sound and PlayVariation, but using "import QtAudioEngine 1.0" gives me a wavy red line with: "QML module not installed".
      Attempting to build the project gives the error: module "QtAudioEngine" is not installed
      Thinking it might be an installation/update/version problem ( I was on 5.2.0 at the time ), I tried uninstalling Qt and downloaded the Qt 5.2.1 for Windows 32-bit (VS 2010, OpenGL, 517 MB) from the downloads page, and tried to reinstall, but I'm still getting the same errors. Do I need to download it from somewhere else, or maybe I'm missing a dependency? I've seen no other errors during the installs, and every other module I've used seems to be working.

    • Stuck at that point, I figured I'd try Phonon, since it looked like that would do what I wanted. However, with the recent removal from Qt itself, documentation on how to build/install/use the new phonon4qt5 is pretty much non-existent, everything I could find pointing to old or deleted pages. I downloaded the phonon source, as well as cmake; and eventually seemed to get it to run, and compile with MSVC2010, but it did not install into the Qt directory structure, and I have no idea what files need to be where, or even if it was built properly. The KDE site doesn't really help, since it's mostly under construction and there's very little about using Phonon with windows.

    • I guess since it's in wav file format I could convert it to raw data, resample, and use it with QAudioOutput, but I'd rather use an existing solution and not re-invent the wheel unless I really need to.

    Anyway, any help on the above, or suggestions/links to any other library/module that would work would be greatly appreciated. Thanks!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.