Recording Audio Issue: Error -231 Starting Recording

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
starfirescully
Posts: 23
Joined: Wed Jul 09, 2014 2:35 pm

Recording Audio Issue: Error -231 Starting Recording

Post by starfirescully » Wed Jun 29, 2016 6:06 pm

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!
Last edited by starfirescully on Wed Jun 29, 2016 8:04 pm, edited 1 time in total.

Klaus
Posts: 14187
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Recording Audio Issue

Post by Klaus » Wed Jun 29, 2016 6:11 pm

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

starfirescully
Posts: 23
Joined: Wed Jul 09, 2014 2:35 pm

Re: Recording Audio Issue

Post by starfirescully » Wed Jun 29, 2016 6:21 pm

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

Klaus
Posts: 14187
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Recording Audio Issue

Post by Klaus » Wed Jun 29, 2016 6:55 pm

Hm, sorry, no brilliant idea in the moment...

starfirescully
Posts: 23
Joined: Wed Jul 09, 2014 2:35 pm

Re: Recording Audio Issue

Post by starfirescully » Wed Jun 29, 2016 7:08 pm

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

Klaus
Posts: 14187
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Recording Audio Issue

Post by Klaus » Wed Jun 29, 2016 7:31 pm

This is even stranger, since all LC error codes are POSITIVE integers!? :shock:

starfirescully
Posts: 23
Joined: Wed Jul 09, 2014 2:35 pm

Re: Recording Audio Issue

Post by starfirescully » Wed Jun 29, 2016 7:38 pm

I only found one other instance of this problem and it is unsolved :(

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

Post Reply