Page 1 of 1
Microphone inputs for Windows.
Posted: Wed Aug 29, 2007 6:34 pm
by Drachen Jager
I want to create a program where the user can speak into a microphone and the sound is played back for him. Simple right?
I have the basic thing working, I hit my record button and then play and I hear the "pop" of the playback starting but no audio, I've tried saving it to a file and the file saves fine but it's an empty audio file.
So, I figured I have my microphone input wrong, I tried every input in Revolution imic, emic, cd, (with 2 spaces after and the computer's cd player running) irca, tvfm, idav, mbay, modm and zvpc. EVERY one of them fails to record anything (no pop, no file recorded). I made a program to tell me what the sound input is before I meddled and it said "dflt" which I presume is the computer default device, I set my microphone up as the default device and still just a click and an empty file.
I am trying to use a USB mic but would settle for just about anything that worked. OS is Win XP 64 but I want to create a program that will work on all recent Windows platforms.
Any help would be greatly appreciated.
Posted: Wed Aug 29, 2007 7:21 pm
by FourthWorld
I believe the sound recording API relies on QuickTime. Do you have QT installed on that system?
Posted: Wed Aug 29, 2007 8:50 pm
by Drachen Jager
Yes, latest QT, it works fine for playback, and like I said it seems to record OK, it just isn't recording from the right input.
Posted: Tue Sep 04, 2007 8:01 pm
by Drachen Jager
I did some poking around and, correct me if I'm wrong but don't newer versions of QT only allow sound recording in QT Pro?
I cannot expect my customers to have Pro so are there any workarounds? Can someone point me in the right direction for a windows soundrecorder plugin for Revolution?
Posted: Tue Sep 04, 2007 9:44 pm
by Mark
Hi Drachen Jager,
Installing QT is sufficient to enable recording in Revolution. There is no need for QT Pro. Is it possible that your USB mic or the driver or some other software is the culprit? Or could the problem be that you are using Revolution on a 64 bit machine (Rev bug)? Have you tried a different microphone, quitting or even uninstalling any software that might hijack sound input, and recording with the same microphone on a different machine? What else have you tried exactly?
Best,
Mark
Posted: Tue Sep 04, 2007 9:48 pm
by Drachen Jager
I just figured it out, I copied and pasted and paraphrased this string from the video player tutorial.
repeat while recordaudio is true
-- give processor time
revAudioGrabIdle
-- allow other processes the chance to run
-- needed to allow the user to click "stop preview"
-- which will set the recordVideo handler to false
-- and thus exit this repeat loop
wait for 1 millisecond with messages
end repeat
Apparently something else was blocking QT's access to the processor? Do I have that right? And this line forces RR to allocate free run time to recording audio.
Posted: Tue Sep 04, 2007 10:33 pm
by Mark
Dear Drachen Jager,
OK, all clear now. This doesn't work:
Code: Select all
on recordSound theFile
record sound file theFile
wait 100 -- or a repeat loop or anything that keeps running this script
stop recording
end recordSound
But this works:
Code: Select all
on recordSound theFile
record sound file theFIle
end recordSound
and in a button:
Code: Select all
on mouseUp
stop recording
end mouseUp
Best,
Mark
Posted: Tue Feb 19, 2008 12:17 am
by Drachen Jager
Ok, it WAS working, I've been programming other areas and was just recently doing some alpha testing, now sound recording doesn't work again!
I tested older versions of my program where audio recording worked and it fails there too so it's something external which has changed.
Either it's because I'm running a newer version of Quicktime now or some other update on my machine as far as I can determine.
Posted: Thu Apr 24, 2008 10:57 pm
by Drachen Jager
Works properly in 2.9
(now if I could just get the player to switch files properly in 2.9!)
Re: Microphone inputs for Windows.
Posted: Fri Oct 22, 2010 11:16 pm
by edelen
I am trying to make a program that record my sound on Windows 7. I could not make it create a file? Does any one has any idea?
Re: Microphone inputs for Windows.
Posted: Sat Oct 23, 2010 5:08 am
by WaltBrown
I made this up when I read this thread. I am running Vista x64, and do NOT have QT installed. Note that I have playStarted and playStopped handlers and only the playStopped message triggers.
Walt