Generating a sound
-
wrote on 12 Aug 2011, 00:41 last edited by
Hey, is there a tone generator in qt, where you could generate a sound? (the beep kind of sound.. - single frequency tone)
-
wrote on 12 Aug 2011, 01:35 last edited by
For generating arbitrary tones? No. There is a "beep":http://doc.qt.nokia.com/4.7/qapplication.html#beep function in QApplication that will play your system beep. But not a tone generator in the "play simple tunes" sense.
There are various multimedia APIs in Qt, but primarily are concerned with playback of media files and that sort of thing.
-
wrote on 12 Aug 2011, 14:35 last edited by
ok, thanks anyway.
-
wrote on 12 Aug 2011, 14:50 last edited by
if you have a sound file you can play it with QSound::play
-
wrote on 12 Aug 2011, 23:14 last edited by
No, haven't got any file.
I've found this "tutorial":http://doc.qt.nokia.com/4.7-snapshot/multimedia-audiooutput.html , it seems to be generating a sound, I'll try to understand the code.
-
wrote on 11 Jun 2013, 12:37 last edited by
Hello,
I know this post was from a few years ago. Is there still no way to generate a tone if I were to pass volume and frequency?
Edit: Found that I could just use Windows.h's Beep(..). All I needed was a basic tone of which I could set the frequency. How pretty it sounded didn't matter. Planning on making an abstraction layer so that when I change to another platform, I would only have to change this system specific file.