Hollywood's sound library offers two basic object types: Samples and music objects. Samples are typically short sounds like game or feedback effects whereas music objects are used for longer sounds playing in the background. The biggest difference between samples and music objects is that samples are loaded entirely into memory whereas music objects are streamed from disk. Thus, you should only use samples for short sounds because loading a 4 minute music track as a sample will easily occupy about 40 megabytes of memory. Samples are optimized for immediate playback which is why they are often uploaded to audio hardware memory when they are loaded so that they can be played with very low latency. Music streams, however, might need a little bit longer to start playing.
Samples can be loaded via the @SAMPLE and LoadSample() commands. You can also create your own samples using the CreateSample() command. To play a sample, use the PlaySample() command.
Music objects can be loaded via the @MUSIC and OpenMusic() commands. You can also create your own music objects using the CreateMusic() command. To play a music object, use the PlayMusic() command.
By default, Hollywood's sound library allocates 8 audio channels for sound playback. This means that Hollywood will run out of channels in case you try to play more than 8 different samples, music objects, or video streams at a time. If your script needs more than 8 channels for some particular reasons, you need to increase the number of channels using the -numchannels console argument.