Dear moderators,
In order to be able to record live audio with R on my Macs, I
installed the package "audio (0.1-3)" from a local CRAN mirror, and
tried to use the "record() " function in the ways indicated in the
package help pages.
I work with G3 through G5 machines (iMac, iBook G4 and Power Mac G5),
running Tiger (10.4.11).
I use R version 2.9.1 with the concomittant R.app 1.28.
Script used:
require(audio)
setWavPlayer("/Library/Frameworks/R.framework/Versions/2.9/Resources/
bin/play")
x=numeric(22050)
audioSample(x,rate=44100,bits=16)
record(x,44100,1)
play(x)
In fact, this works (and so the hardware works), but for some reason
only the first call to "record(..)" after starting R.app works.
At all subsequent calls to record(), I get the following error message:
Error in record(x, 44100, 1) :
unable to register recording callback (6e6f7065)
Clearing the work space doesn't help. Only after quitting and
restarting R.app it works again (once).
Do you know what can be the cause? Should I issue some kind of reset
of the audio driver (what does R.app do to make it work the first
time?). Have more people the same problem? I couldn't find any
discussion about it (but the audio package is rather new if I'm right).
Thanking you in advance for help, I remain,
Sincerely Yours,
Franklin Bretschneider
Anth. Matthaeuslaan 33
3515 AN Utrecht
[email protected]
[[alternative HTML version deleted]]
_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac