|
From: Tim R. <row...@us...> - 2003-01-14 01:03:35
|
Update of /cvsroot/squeak/squeak/platforms/RiscOS/plugins/SoundPlugin In directory sc8-pr-cvs1:/tmp/cvs-serv17688 Added Files: sqRPCSound.c Log Message: Initial addition of thenull sound plugin code for Acorn. Fill it out oneday --- NEW FILE: sqRPCSound.c --- /**************************************************************************/ /* A Squeak VM for Acorn RiscOS machines by Tim Rowledge */ /* ti...@su... & http://sumeru.stanford.edu/tim */ /* Known to work on RiscOS 3.7 for StrongARM RPCs, other machines */ /* not yet tested. */ /* sqRPCSound.c */ /* sound output */ /**************************************************************************/ #include "sq.h" #include "SoundPlugin.h" extern struct VirtualMachine * interpreterProxy; /* module initialization/shutdown */ int soundInit(void) { // anything to do ? } int soundShutdown(void) { // anything to do? } /****************/ /* sound output */ /****************/ int snd_AvailableSpace(void) { /* Returns the number of bytes of available sound output buffer space. This should be (frames*4) if the device is in stereo mode, or (frames*2) otherwise */ } int snd_InsertSamplesFromLeadTime(int frameCount, int srcBufPtr, int samplesOfLeadTime) { /* Insert a buffer's worth of sound samples into the currently playing buffer. Used to make a sound start playing as quickly as possible. The new sound is mixed with the previously buffered sampled. */ /* Details: Unlike primitiveSoundPlaySamples, this primitive always starts with the first sample the given sample buffer. Its third argument specifies the number of samples past the estimated sound output buffer position the inserted sound should start. If successful, it returns the number of samples inserted. */ } int snd_PlaySamplesFromAtLength(int frameCount, int arrayIndex, int startIndex) { /* Output a buffer's worth of sound samples. */ } int snd_PlaySilence(void) { /* Output a buffer's worth of silence. Returns the number of sample frames played. */ } int snd_Start(int frameCount, int samplesPerSec, int stereo, int semaIndex) { /* Start the double-buffered sound output with the given buffer size, sample rate, and stereo flag. */ } int snd_Stop(void) { /* Stop double-buffered sound output. */ } /***************/ /* sound input */ /***************/ int snd_SetRecordLevel(int level) { interpreterProxy->primitiveFail(); return null; } int snd_StartRecording(int desiredSamplesPerSec, int stereo, int semaIndex) { interpreterProxy->primitiveFail(); return null; } int snd_StopRecording(void) { interpreterProxy->primitiveFail(); return null; } double snd_GetRecordingSampleRate(void) { interpreterProxy->primitiveFail(); return (double)1.0; } int snd_RecordSamplesIntoAtLength(int buf, int startSliceIndex, int bufferSizeInBytes) { interpreterProxy->primitiveFail(); return null; } void snd_Volume(double *left, double *right) { // used to GET the volume settings } void snd_SetVolume(double left, double right) { // used to SET the volume settings interpreterProxy->primitiveFail(); } |