Page 1 of 1

Recording Audio Issue: Error -231 Starting Recording

Posted: Wed Jun 29, 2016 6:06 pm
by starfirescully
Hello all,

I am trying to record audio files for an experiment that I am creating. Here is the code I am using:

Code: Select all

 global gSubjectID
global recordcount
on mouseUp
   set the recordFormat to "wave"  -- or "wave" or "ulaw" 
   set the recordCompression to "raw "
   put 1 into recordcount
   set the itemDelimiter to "/"
   get the effective fileName of this stack
   set the defaultFolder to item 1 to -2 of it
   if not (the hilite of me) then
      
      if recordcount is 1 then
         put gSubjectID & space & "Question 1.wav" into fld "recordFileName"
         put fld "recordFileName" into sndName
         
         # make sure there's a name
         if sndName is empty then 
            exit mouseUp
         end if
         
         set the hilite of me to true
         record sound file sndName
         add 1 to recordcount
      end if
   end if 
end mouseUp
Everything seems to work, the microphone turns on and then turns off when I stop the recording with a different button

Code: Select all

on mouseUp
  stop recording
  set the hilite of btn "record" to false
end mouseUp
However, when I go into the folder (default folder) that I specified the file should be put in, it is not there. In fact I checked my whole computer and the file does not exist. Any idea why this may be happening/ what I can do to be sure the file is recorded?

I am using Livecode 7.01
Quicktime is installed

Thanks!

Re: Recording Audio Issue

Posted: Wed Jun 29, 2016 6:11 pm
by Klaus
Hu Scully,

add this line and see if that sheds some light on this mistery:
...
record sound file sndName
put the result
## Will be empty on success and may show a hint otherwise!
...


Best

Klaus

Re: Recording Audio Issue

Posted: Wed Jun 29, 2016 6:21 pm
by starfirescully
Klaus wrote:Hu Scully,

add this line and see if that sheds some light on this mistery:
...
record sound file sndName
put the result
## Will be empty on success and may show a hint otherwise!
...


Best

Klaus
Klaus,

The message box returns nothing

-Starfirescully

Re: Recording Audio Issue

Posted: Wed Jun 29, 2016 6:55 pm
by Klaus
Hm, sorry, no brilliant idea in the moment...

Re: Recording Audio Issue

Posted: Wed Jun 29, 2016 7:08 pm
by starfirescully
Klaus wrote:Hm, sorry, no brilliant idea in the moment...

Klaus,

I tried a few things and got this in the message box:

Code: Select all

error -231 starting recording

Re: Recording Audio Issue

Posted: Wed Jun 29, 2016 7:31 pm
by Klaus
This is even stranger, since all LC error codes are POSITIVE integers!? :shock:

Re: Recording Audio Issue

Posted: Wed Jun 29, 2016 7:38 pm
by starfirescully
I only found one other instance of this problem and it is unsolved :(

http://forums.livecode.com/viewtopic.php?t=9450