LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: Elliott Moreton Date: Fri Dec 27 09:01:59 2002 Subject: Sound Manager and "file reference numbers"
Hi all -- I'm running 5.6.1b3 on an iBook. I'm trying to get a MacPerl script to play AIFF files, using the SndStartFilePlay function: use Mac::Sound; $sounddir = "Macintosh HD:Moreton:exp14:SW:testsounds"; $infile = "$sounddir:000.aiff"; open (IN, $infile) || die "Couldn't open $infile"; $kBufferSize = 20000; $err = SndStartFilePlay (0, IN, 0, $kBufferSize, 0, 0, 0, 0); print "Error: $err\n"; When I run this, I get the message: #Usage: Mac::Sound::SndStartFilePlay(chan, fRefNum, resNum, bufferSize, theSelection, theCompletion=0, async==false). File 'Dev:Pseudo'; Line 10 There isn't any MacPerl documentation on SndStartFilePlay (not even in Sound.pm), but Inside Macintosh documents it for C (Sound Reference, Chapter 1, pp. 37f), and the only thing I can see that I might be doing wrong is that SndStartFilePlay might want the file to be identified with a "file reference number" rather than the filehandle I'm using right now. What is a "file reference number", and how do I set one up? Many thanks, Elliott Moreton
| Navigate in group perl.macperl.toolbox at sever nntp.perl.org | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by PHP Developer
Powered By PHP Consultants |