Microphone inputs for Windows.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 20
- Joined: Tue Aug 28, 2007 9:23 pm
Microphone inputs for Windows.
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.
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.
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
I believe the sound recording API relies on QuickTime. Do you have QT installed on that system?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Posts: 20
- Joined: Tue Aug 28, 2007 9:23 pm
-
- Posts: 20
- Joined: Tue Aug 28, 2007 9:23 pm
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
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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- Posts: 20
- Joined: Tue Aug 28, 2007 9:23 pm
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.
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.
Dear Drachen Jager,
OK, all clear now. This doesn't work:
But this works:
and in a button:
Best,
Mark
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
Code: Select all
on recordSound theFile
record sound file theFIle
end recordSound
Code: Select all
on mouseUp
stop recording
end mouseUp
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- Posts: 20
- Joined: Tue Aug 28, 2007 9:23 pm
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.
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.
-
- Posts: 20
- Joined: Tue Aug 28, 2007 9:23 pm
Re: Microphone inputs for Windows.
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.
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
Walt
- Attachments
-
- SoundRecordingTest.zip
- (781 Bytes) Downloaded 406 times
Walt Brown
Omnis traductor traditor
Omnis traductor traditor