Subject: [stella] makewav patches (for UNIX mostly) From: A Braunsdorf <ab@xxxxxxxxxxxxxx> Date: Thu, 23 Nov 2000 14:52:43 -0500 |
There's a bug in makewav that'll make it fail some places. There are a few places that say something like: strcpy(filename,strtok(argv[0],"+")); That's not quite kosher because if strtok returns a null pointer (which it will at the end of the list), strcpy() might (and in the spec I believe does) try to dereference it. That'll work on machines that let you do that, but you can't count on it for portability. In fact, gcc under UNIX generally won't let you get away with it. I also added a little code to makewav.c that makes WAVFILE optional. If you don't give it, it sets create_mode to (the new) DSP_MODE and writes the output to /dev/dsp instead of a file. So it comes straight out as sound instead of making a file. If you give WAVFILE it works same as ever. The ioctl()s are for the dsp device under FreeBSD, but the one under Linux is similar if not the same. It'd work on a NeXT or Sun too with minor tweaking. (Yeah, you ought to use SoundKit on the NeXT, especially if you want to port it to MacOS X.) I'll send the patches back to the author after I check them out a little more. This is really handy for me and I figured it might be for any other UNIX (or anywhere else devices look like files) people out there. ab -- Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [stella] Star Fire Homepage, Clay Halliwell | Thread | [stella] Supercharger and the 7800?, A Braunsdorf |
Re: [stella] Star Fire Homepage, Manuel Polik | Date | [stella] Supercharger and the 7800?, A Braunsdorf |
Month |