word SoundPlayToMusicStream( /* Returns a SOUND_ERROR_... value */
MemHandle mh,
const word * song,
word size);
This routine plays a music buffer to a stream. Specify which stream to play to by means of the token returned by
SoundAllocMusicStream()
. To play music to the buffer, pass the size of the buffer you are playing and a pointer to the start of the piece. This piece of buffer must be made up of whole events--it should not start or end in the middle of an event (e.g. you can't specify that you want to play a note but not give its frequency, even if you plan to play another buffer to the stream that might begin with a frequency).
If you don't know the size of the buffer, it may be all right--any data in the buffer after the GE_END_OF_SONG will be ignored.
word SoundPlayToMusicStreamNB( /* Returns a SOUND_ERROR_... value */
MemHandle mh,
const word * song,
word size,
word *bytesWritten);
This routine acts as
SoundPlayToMusicStream()
, except in the case where the routine would block. If the music stream fills up,
SoundPlayToMusicStream()
blocks, waiting until there is more room in the stream;
SoundPlayToMusicStreamNB()
will instead exit, returning the number of bytes successfully written to the stream.
word SoundPlayToSampleStream( /* Returns a SOUND_ERROR_... value */
MemHandle mh,
word _far * sample,
word size,
SampleFormatDescription * format);
This routine passes sampled sound data to a DAC player. You must pass a sample sound handle to this routine--to acquire such a handle, call
SoundAllocSampleStream()
. The sample sound handle must be associated with a DAC player--to so associate the handle, call
SoundEnableSampleStream()
. You must pass a pointer to the
sample
data, along with the
size
of the sample as measured in bytes. You may change the
format
information which will determine how the DAC player handles the data.
word SoundReallocMusic( /* Returns a SOUND_ERROR_... value */
MemHandle mh,
word _far * song);
This routine allows you to associate a new music buffer with an existing music handle. The new music buffer must not have more voices than was originally requested with
SoundAllocMusic()
. Do not call this routine with the handle of a sound that may be playing; call
SoundStopMusic()
on the handle if you are not sure.
word SoundReallocMusicNote( /* Returns a SOUND_ERROR_... value */
MemHandle mh,
word freq,
word vol,
SoundStreamDeltaTimeType timer,
word durat,
word instrum,
word instTable);
This routine allows you to associate new note values with an existing note handle. Do not call this routine with the handle of a note that may be playing; call
SoundStopMusicNote()
on the handle if you are not sure.
void SoundReleaseExclusive(void);
This routine releases the sound library exclusive semaphore. You will not need to call this routine unless your code calls
SoundGetExclusive()
or
SoundGetExclusiveNB()
. This routine allows other threads to play sounds. If another thread called
SoundGetExclusive()
while your thread had the exclusive, it will now grab the exclusive.
void SoundSampleDriverInfo(
word _far *voices,
SoundDriverCapability _far *capability);
This routine determines the machine's ability to play recorded sounds.
word SoundStopMusic( /* Returns a SOUND_ERROR_... value */
MemHandle mh); /* Handle of music buffer */
This routine stops the playing of a simple music buffer. It returns true if the library was unavailable (i.e. some other thread has grabbed the exclusive).
word SoundStopMusicNote( /* Returns a SOUND_ERROR_... value */
MemHandle mh);
This routine stops a note that is playing. Pass the handle of the note, as was returned by
SoundAllocMusicNote()
. This routine returns true if the sound library was unavailable (i.e. some other thread has grabbed the exclusive).
word SoundStopMusicStream( /* Returns a SOUND_ERROR_... value */
MemHandle mh);
This routine stops any music being played to the stream. All sounds are flushed from the stream. It takes one argument, the token of the sound stream, as returned by
SoundAllocMusicStream()
.
void SoundSynthDriverInfo(
word _far *voices,
SupportedEnvelopeFormat _far *format,
SoundDriverCapability _far *capability)
This routine describes the machine's music playing ability.
GEOS SDK TechDocs
|
|
SoundFreeMusic() ...
|
SpeedDialGetNumber() ...