    Contents  Index  Topic Contents
    Previous Topic: Static Fields Relevant to Point3Bvr Objects
    Next Topic: Static Fields Relevant to SoundBvr Objects

> ## Static Methods Relevant to SoundBvr Objects

> ###

> importSound

> Statics Class

> Creates a sound behavior by synchronously importing the given .WAV or MIDI file. The soundLength parameter receives the length of the sound. These downloads should be small and listed before asynchronous downloads. Use asynchronous downloads for more complex images and sounds. See below for a description of the asynchronous import method.

> public static SoundBvr importSound(
> URL url,
> NumberBvr[] soundLength
> )

> ##### Parameters

> url
> soundLength
>   A NumberBvr array that receives the length of the sound in seconds. An array is used because this is an output parameter, and the system writes into the first element of the array. In Java, this is the simplest way to pass information back to the caller if you are already using the return value, which, in this case, is the sound).

> ##### Return Values

> Returns the SoundBvr object.

> ###

> importSound

> Statics Class

> Creates a SoundBvr by asynchronously importing the given .WAV or .MIDI file. Asynchronous downloads should be listed after synchronous ones and used for more complex sounds and images. For a description of the synchronous import method, see above.

> public static SoundBvr importSound(
> URL url,
> NumberBvr[] soundLength,
> SoundBvr sndStandIn,
> DXMEvent[] ev,
> NumberBvr[] progress,
> NumberBvr[] size
> );

> ##### Parameters

> url
>   The fully qualified pathname of the file. It is of type java.net.URL.
> soundLength
>   The length, in seconds, of the sound.
> sndStandIn
>   The sound to use while the contents at url are still being downloaded. This argument cannot be null, however, the sound can be silence.
> ev
>   The event to trigger once the download is complete. This argument can be null. Using this event is probably the best way to determine when the download is complete. (Otherwise, the Java constant Double.POSITIVE_INFINITY must be extracted.
> progress
>   A NumberBvr that goes from 0 to 1, tracking the progress of the download. For files downloaded via http, progress is reported as the percentage of the file that has been downloaded. Other protocols, the value may simply start at 0 and change to 1 once the download is complete. This argument can be null.
> size
>   A NumberBvr that is the size of the sound, in bytes. The value begins at -1 and will change to the true size if it is available. This argument can be null.

> ##### Return Values

> Returns the SoundBvr object.

> ###

> mix

> Statics Class

> Creates a sound behavior that is equivalent to sound1 + sound2.

> public static SoundBvr mix(
> SoundBvr sound1,
> SoundBvr sound2
> );

> ##### Parameters

> sound1 and sound2
>   The SoundBvr objects.

> ##### Return Values

> Returns the SoundBvr object.

> ###

> mixArray

> Statics Class

> Creates a sound behavior that is equivalent to sound1 + sound2 + soundn.

> public static SoundBvr mixArray(
> SoundBvr[] sounds
> );

> ##### Parameters

> sounds
>   The SoundBvr objects in the array.

> ##### Return Values

> Returns the SoundBvr object.

> © 1998 Microsoft Corporation. All rights reserved. Terms of Use.

> Top of Page