| Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 2 | |
Hello all, How can I capture input from microphone using Qt4? I can`t find this in documentation... Application had to work both MS Windows and POSIX-compatible system. Thanks! -- [ signature omitted ]
Kuznetsov Vjacheslav wrote: > Hello all, > > How can I capture input from microphone using Qt4? I can`t find this in > documentation... > Application had to work both MS Windows and POSIX-compatible system. > > Thanks! To my knowledge, Qt only has very basic support for sound output. You may want to look into OpenAL for cross-platform audio work. There may be some wrapper library that makes it easier to use OpenAL from a standard application, but the only ones that I have found so far are very big and aimed at game development... you may have better luck finding a thin wrapper (or just use it directly, it's not that hard to work with). Stuart -- [ signature omitted ]
Hi: I think you can do this (if you are in Linux, of course): 1- use QProcess to execute command "sox". Sox allow you to record microphone input in a temporary file. 2- kill this QProcess to stop recording. 3- you can play output file using QSound object. If it really works XD, please send me an example if you can. Thanks!!! On Jan 14, 2008 4:33 PM, Stuart Childs <childss@xxxxxxxxxxxxxxxx> wrote: > Kuznetsov Vjacheslav wrote: > > Hello all, > > > > How can I capture input from microphone using Qt4? I can`t find this in > > documentation... > > Application had to work both MS Windows and POSIX-compatible system. > > > > Thanks! > > To my knowledge, Qt only has very basic support for sound output. You > may want to look into OpenAL for cross-platform audio work. There may > be some wrapper library that makes it easier to use OpenAL from a > standard application, but the only ones that I have found so far are > very big and aimed at game development... you may have better luck > finding a thin wrapper (or just use it directly, it's not that hard to > work with). > > Stuart > > -- > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with > "unsubscribe" in the subject or the body. > List archive and information: http://lists.trolltech.com/qt-interest/ > > -- [ signature omitted ]
On 14.01.08 09:33:56, Stuart Childs wrote: > Kuznetsov Vjacheslav wrote: >> Hello all, >> >> How can I capture input from microphone using Qt4? I can`t find this in >> documentation... >> Application had to work both MS Windows and POSIX-compatible system. > > To my knowledge, Qt only has very basic support for sound output. In Qt4.4 Phonon will be introduced, a cross-platform multimedia layer. You can already find that in the snapshots. Andreas -- [ signature omitted ]
Andreas Pakulat wrote: > On 14.01.08 09:33:56, Stuart Childs wrote: >> Kuznetsov Vjacheslav wrote: >>> Hello all, >>> >>> How can I capture input from microphone using Qt4? I can`t find this in >>> documentation... >>> Application had to work both MS Windows and POSIX-compatible system. >> To my knowledge, Qt only has very basic support for sound output. > > In Qt4.4 Phonon will be introduced, a cross-platform multimedia layer. > You can already find that in the snapshots. > > Andreas > This is great news! I had not looked into Qt 4.4. I have actually been working on a Qt wrapper for OpenAL for another project, but maybe this will mean I can shelve that and just use Phonon. One can hope. :) Stuart
Attachment:
Attachment:
signature.asc
Attachment:
signature.asc
Description: OpenPGP digital signature
Message 6 in thread
Quoting Kuznetsov Vjacheslav <kuznetsovvv@xxxxxxxxx>:
> Hello all,
>
> How can I capture input from microphone using Qt4? I can`t find this in
> documentation...
> Application had to work both MS Windows and POSIX-compatible system.
Phonon comes to my mind:
http://api.kde.org/4.x-api/kdelibs-apidocs/phonon/html/group__Recording.html
It will be in Qt 4.4 but it's possible to use it with Qt 4.3 (KDE
4.0.0 is based on Qt 4.3)
--
[ signature omitted ]
Message 7 in thread
On mandag den 14. Januar 2008, Pau Garcia i Quiles wrote:
> Quoting Kuznetsov Vjacheslav <kuznetsovvv@xxxxxxxxx>:
> > Hello all,
> >
> > How can I capture input from microphone using Qt4? I can`t find this in
> > documentation...
> > Application had to work both MS Windows and POSIX-compatible system.
>
> Phonon comes to my mind:
> http://api.kde.org/4.x-api/kdelibs-apidocs/phonon/html/group__Recording.htm
>l
>
> It will be in Qt 4.4 but it's possible to use it with Qt 4.3 (KDE
> 4.0.0 is based on Qt 4.3)
KDE comes with it's own Phonon implementation.
Bo.
--
[ signature omitted ]
Message 8 in thread
On Tuesday 15 January 2008 10:01:00 Bo Thorsen wrote:
> > It will be in Qt 4.4 but it's possible to use it with Qt 4.3 (KDE
> > 4.0.0 is based on Qt 4.3)
>
> KDE comes with it's own Phonon implementation.
>
> Bo.
It's the same.
--
[ signature omitted ]
Description: This is a digitally signed message part.
Message 9 in thread
Hi:
///0. Inicializaciones
QString SRECORD_COMMAND = "/usr/bin/sox";
QString SRECORD_PARAMETERS ="-t ossdsp -d -s -r 44100 -c 1 /dev/audio -t
wav -";
QString filename = "/home/pedro/Desktop/pedro.wav";
///1. creamos un proceso para grabar con salida el fichero
QProcess srecord(this);
srecord.setStandardOutputFile(filename);
qDebug() << "Mandamos a ejecutar: " ;
srecord.start(SRECORD_COMMAND, SRECORD_PARAMETERS.split(" "));
///2. ejecutamos un dialogo de parada modal
SoundRecordingImpl sri(this);
sri.exec();
///3. matamos el proceso
srecord.kill();
enjoy it!!!
PS: i think you have to tune-up parameters to get a nice sound. I want this
parameters... XD
On Jan 15, 2008 10:26 AM, Thiago Macieira <thiago.macieira@xxxxxxxxxxxxx>
wrote:
> On Tuesday 15 January 2008 10:01:00 Bo Thorsen wrote:
> > > It will be in Qt 4.4 but it's possible to use it with Qt 4.3 (KDE
> > > 4.0.0 is based on Qt 4.3)
> >
> > KDE comes with it's own Phonon implementation.
> >
> > Bo.
>
> It's the same.
>
> --
> Thiago José Macieira - thiago.macieira AT trolltech.com
> Trolltech ASA - Sandakerveien 116, NO-0402 Oslo, Norway
>
--
[ signature omitted ]
Message 10 in thread
hi:
you can also use "arecord" (ALSA) instead "sox".
regards!!
On Jan 15, 2008 11:20 AM, | pedro mateo || <pedrolmn@xxxxxxxxx> wrote:
> Hi:
>
> ///0. Inicializaciones
> QString SRECORD_COMMAND = "/usr/bin/sox";
> QString SRECORD_PARAMETERS ="-t ossdsp -d -s -r 44100 -c 1 /dev/audio
> -t wav -";
> QString filename = "/home/pedro/Desktop/pedro.wav";
>
> ///1. creamos un proceso para grabar con salida el fichero
> QProcess srecord(this);
> srecord.setStandardOutputFile(filename);
> qDebug() << "Mandamos a ejecutar: " ;
> srecord.start (SRECORD_COMMAND, SRECORD_PARAMETERS.split(" "));
>
> ///2. ejecutamos un dialogo de parada modal
> SoundRecordingImpl sri(this);
> sri.exec();
>
> ///3. matamos el proceso
> srecord.kill ();
>
> enjoy it!!!
>
> PS: i think you have to tune-up parameters to get a nice sound. I want
> this parameters... XD
>
>
> On Jan 15, 2008 10:26 AM, Thiago Macieira < thiago.macieira@xxxxxxxxxxxxx>
> wrote:
>
> > On Tuesday 15 January 2008 10:01:00 Bo Thorsen wrote:
> > > > It will be in Qt 4.4 but it's possible to use it with Qt 4.3 (KDE
> > > > 4.0.0 is based on Qt 4.3)
> > >
> > > KDE comes with it's own Phonon implementation.
> > >
> > > Bo.
> >
> > It's the same.
> >
> > --
> > Thiago José Macieira - thiago.macieira AT trolltech.com
> > Trolltech ASA - Sandakerveien 116, NO-0402 Oslo, Norway
> >
>
>
>
> --
> Pedro Luis Mateo Navarro || pedrolmn@xxxxxxxxx _ pedromateo@xxxxxxxxx
> > _phone: (+34) 626 14 29 33 or (+34) 968 39 82 58
> > _web: www.pedromana.com
> > _msn: pedrolmn@xxxxxxxxxxx
>
--
[ signature omitted ]