Parasol Framework
  • Gallery
  • API
  • Wiki
  • GitHub
    •  Overview
    • MixContinue()
    • MixEndSequence()
    • MixFrequency()
    • MixMute()
    • MixPan()
    • MixPlay()
    • MixRate()
    • MixSample()
    • MixStartSequence()
    • MixStop()
    • MixStopLoop()
    • MixVolume()
    • Audio
    • Core
    • Display
    • Fluid
    • Font
    • Network
    • Vector
      • Audio
      • Sound
      • File
      • MetaClass
      • Module
      • StorageDevice
      • Task
      • Thread
      • Time
      • Compression
      • Config
      • Script
      • XML
      • Controller
      • BlurFX
      • ColourFX
      • CompositeFX
      • ConvolveFX
      • DisplacementFX
      • FilterEffect
      • FloodFX
      • ImageFX
      • LightingFX
      • MergeFX
      • MorphologyFX
      • OffsetFX
      • RemapFX
      • SourceFX
      • TurbulenceFX
      • WaveFunctionFX
      • Scintilla
      • ScintillaSearch
      • Bitmap
      • Clipboard
      • Display
      • Document
      • Font
      • Picture
      • Pointer
      • Surface
      • SVG
      • ClientSocket
      • HTTP
      • NetSocket
      • Proxy
      • Vector
      • VectorClip
      • VectorColour
      • VectorEllipse
      • VectorFilter
      • VectorGradient
      • VectorGroup
      • VectorImage
      • VectorPath
      • VectorPattern
      • VectorPolygon
      • VectorRectangle
      • VectorScene
      • VectorShape
      • VectorSpiral
      • VectorText
      • VectorTransition
      • VectorViewport
      • VectorWave
      • Linux Builds
      • Windows Builds
      • Customising Your Build
      • Parasol Objects
      • Parasol In Depth
      • Fluid Reference Manual
      • Common API
      • FileSearch API
      • GUI API
      • JSON API
      • VFX API
      • Widgets
      • RIPL Reference Manual
      • Parasol Cmd Tool
      • Flute / Unit Testing
      • Embedded Document Format
      • FDL Reference Manual
      • FDL Tools
      • Action Reference Manual
      • System Error Codes

Audio Module

Functions

MixContinue | MixEndSequence | MixFrequency | MixMute | MixPan | MixPlay | MixRate | MixSample | MixStartSequence | MixStop | MixStopLoop | MixVolume

Structures

AudioLoop

Classes

Audio | Sound

Constants

ADF | CHF | CHS | LOOP | LTYPE | NOTE | SDF | SFM | STREAM | SVF | VCF

MixContinue()

Continue playing a stopped channel.

ERR snd::MixContinue(objAudio * Audio, INT Handle)
ParameterDescription
AudioThe target Audio object.
HandleThe target channel.

This function will continue playback on a channel that has previously been stopped.

Error Codes

OkayOperation successful.
NullArgsFunction call missing argument value(s)
Audio module documentation © Paul Manias © 2002-2025

MixEndSequence()

Ends the buffering of mix commands.

ERR snd::MixEndSequence(objAudio * Audio, INT Handle)
ParameterDescription
AudioThe target Audio object.
HandleThe target channel.

Use this function to end a buffered command sequence that was started by MixStartSequence().

Error Codes

OkayOperation successful.
NullArgsFunction call missing argument value(s)
Audio module documentation © Paul Manias © 2002-2025

MixFrequency()

Sets a channel's playback rate.

ERR snd::MixFrequency(objAudio * Audio, INT Handle, INT Frequency)
ParameterDescription
AudioThe target Audio object.
HandleThe target channel.
FrequencyThe desired frequency.

Use this function to set the playback rate of a mixer channel.

Error Codes

OkayOperation successful.
NullArgsFunction call missing argument value(s)
Audio module documentation © Paul Manias © 2002-2025

MixMute()

Mutes the audio of a channel.

ERR snd::MixMute(objAudio * Audio, INT Handle, INT Mute)
ParameterDescription
AudioThe target Audio object.
HandleThe target channel.
MuteSet to true to mute the channel. A value of 0 will undo the mute setting.

Use this function to mute the audio of a mixer channel.

Error Codes

OkayOperation successful.
NullArgsFunction call missing argument value(s)
Audio module documentation © Paul Manias © 2002-2025

MixPan()

Sets a channel's panning value.

ERR snd::MixPan(objAudio * Audio, INT Handle, DOUBLE Pan)
ParameterDescription
AudioThe target Audio object.
HandleThe target channel.
PanThe desired pan value between -1.0 and 1.0.

Use this function to set a mixer channel's panning value. Accepted values are between -1.0 (left) and 1.0 (right).

Error Codes

OkayOperation successful.
NullArgsFunction call missing argument value(s)
Audio module documentation © Paul Manias © 2002-2025

MixPlay()

Commences channel playback at a set frequency..

ERR snd::MixPlay(objAudio * Audio, INT Handle, INT Position)
ParameterDescription
AudioThe target Audio object.
HandleThe target channel.
PositionThe new playing position, measured in bytes.

This function will start playback of the sound sample associated with the target mixer channel. If the channel is already in playback mode, it will be stopped to facilitate the new playback request.

Error Codes

OkayOperation successful.
NullArgsFunction call missing argument value(s)
Audio module documentation © Paul Manias © 2002-2025

MixRate()

Sets a new update rate for a channel.

ERR snd::MixRate(objAudio * Audio, INT Handle, INT Rate)
ParameterDescription
AudioThe target Audio object.
HandleThe channel set allocated from OpenChannels().
RateThe new update rate in milliseconds.

This function will set a new update rate for all channels, measured in milliseconds. The default update rate is 125, which is equivalent to 5000Hz.

Error Codes

OkayOperation successful.
NullArgsFunction call missing argument value(s)
Audio module documentation © Paul Manias © 2002-2025

MixSample()

Associate a sound sample with a mixer channel.

ERR snd::MixSample(objAudio * Audio, INT Handle, INT Sample)
ParameterDescription
AudioThe target Audio object.
HandleThe target channel.
SampleA sample handle allocated from Audio.AddSample() or Audio.AddStream().

This function will associate a sound sample with the channel identified by Handle. The client should follow this by setting configuration details (e.g. volume and pan values).

The referenced Sample must have been added to the audio server via the Audio.AddSample() or Audio.AddStream() methods.

Error Codes

OkayOperation successful.
NullArgsFunction call missing argument value(s)
Audio module documentation © Paul Manias © 2002-2025

MixStartSequence()

Initiates buffering of mix commands.

ERR snd::MixStartSequence(objAudio * Audio, INT Handle)
ParameterDescription
AudioThe target Audio object.
HandleThe target channel.

Use this function to initiate the buffering of mix commands, up until a call to MixEndSequence() is made. The buffering of mix commands makes it possible to create batches of commands that are executed at timed intervals as determined by MixRate().

This feature can be used to implement complex sound mixes and digital music players.

Error Codes

OkayOperation successful.
NullArgsFunction call missing argument value(s)
Audio module documentation © Paul Manias © 2002-2025

MixStop()

Stops all playback on a channel.

ERR snd::MixStop(objAudio * Audio, INT Handle)
ParameterDescription
AudioThe target Audio object.
HandleThe target channel.

This function will stop a channel that is currently playing.

Error Codes

OkayOperation successful.
NullArgsFunction call missing argument value(s)
Audio module documentation © Paul Manias © 2002-2025

MixStopLoop()

Cancels any playback loop configured for a channel.

ERR snd::MixStopLoop(objAudio * Audio, INT Handle)
ParameterDescription
AudioThe target Audio object.
HandleThe target channel.

This function will cancel the loop that is associated with the channel identified by Handle if in playback mode. The existing loop configuration will remain intact if playback is restarted.

Error Codes

OkayOperation successful.
NullArgsFunction call missing argument value(s)
Audio module documentation © Paul Manias © 2002-2025

MixVolume()

Changes the volume of a channel.

ERR snd::MixVolume(objAudio * Audio, INT Handle, DOUBLE Volume)
ParameterDescription
AudioThe target Audio object.
HandleThe target channel.
VolumeThe new volume for the channel.

This function will change the volume of the mixer channel identified by Handle. Valid values are from 0 (silent) to 1.0 (maximum).

Error Codes

OkayOperation successful.
NullArgsFunction call missing argument value(s)
Audio module documentation © Paul Manias © 2002-2025

ADF Type

Optional flags for the Audio object.

NameDescription
ADF::AUTO_SAVESave configuration information on exit.
ADF::FILTER_HIGHEnable a high level of output filtering to minimise distortion.
ADF::FILTER_LOWEnable a low level of output filtering to minimise distortion.
ADF::OVER_SAMPLINGEnables oversampling for higher quality audio at the cost of slower mixing.
ADF::STEREOEnable stereo output (set by default if the platform supports stereo). If not set, output is in mono.
ADF::SYSTEM_WIDEMixer changes should be applied system-wide.
ADF::VOL_RAMPINGEnable volume ramping for softer playback when a sample is played multiple times (enabled by default).
Audio module documentation © Paul Manias © 2002-2025

CHF Type

Optional flags for the AudioChannel structure.

NameDescription
CHF::BACKWARDPlay channel backwards.
CHF::CHANGEDSample change
CHF::MUTEChannel is muted.
CHF::VOL_RAMPVolume ramping is enabled.
Audio module documentation © Paul Manias © 2002-2025

CHS Type

Channel status types for the AudioChannel structure.

NameDescription
CHS::FADE_OUTPlayback is fading out.
CHS::FINISHEDPlayback concluded by reaching the sample end.
CHS::PLAYINGSample playing and not released.
CHS::RELEASEDSample playing and note has been released.
CHS::STOPPEDPlaying was stopped by the client.
Audio module documentation © Paul Manias © 2002-2025

LOOP Type

Loop modes for the AudioLoop structure.

NameDescription
LOOP::AMIGASingle loop: Amiga style.
LOOP::AMIGA_NONEAmiga loop: Do nothing.
LOOP::DOUBLEDouble loop: When the note is released, playing shifts to the second loop.
LOOP::SINGLESingle loop: Releasing will end the note.
LOOP::SINGLE_RELEASESingle loop: Sample data after the loop will be played when the note is released.
Audio module documentation © Paul Manias © 2002-2025

LTYPE Type

Loop types for the AudioLoop structure.

NameDescription
LTYPE::BIDIRECTIONALThe sample will play in reverse whenever it hits the end marker, then forwards when it hits the start marker.
LTYPE::UNIDIRECTIONALThe sample playback position returns to the byte position specified in the Loop1Start field.
Audio module documentation © Paul Manias © 2002-2025

NOTE Type

Definitions for the Note field. An 'S' indicates a sharp note.

NameDescription
NOTE::A
NOTE::AS
NOTE::B
NOTE::C
NOTE::CS
NOTE::D
NOTE::DS
NOTE::E
NOTE::F
NOTE::FS
NOTE::G
NOTE::GS
NOTE::OCTAVE
Audio module documentation © Paul Manias © 2002-2025

SDF Type

Sound flags

NameDescription
SDF::LOOPEnables sample looping. The LoopStart and LoopEnd fields determine where the looping area lies within the sample data.
SDF::NEWCreate the sample from scratch (e.g. for audio recording purposes).
SDF::RESTRICT_PLAYRestricts playback so that the sound can never play on more than one channel at any given time.
SDF::STEREOIndicates that the sound has multiple audio channels.
SDF::STREAMRead-Only. Indicates that streaming is enabled.
Audio module documentation © Paul Manias © 2002-2025

SFM Type

These audio bit formats are supported by AddSample and AddStream.

NameDescription
SFM::F_BIG_ENDIANCombine this flag with any audio format to declare it as big endian.
SFM::S16_BIT_MONO16-bit mono signed sample.
SFM::S16_BIT_STEREO16-bit stereo signed sample.
SFM::U8_BIT_MONO8-bit mono unsigned sample.
SFM::U8_BIT_STEREO8-bit stereo unsigned sample.
Audio module documentation © Paul Manias © 2002-2025

STREAM Type

Streaming options

NameDescription
STREAM::ALWAYSStream if the sample length exceeds 64k.
STREAM::NEVERNo streaming - load all data into memory.
STREAM::SMARTSmart streaming is the default. If the sample appears to be relatively small with respect to available system RAM, it will be loaded into memory. Otherwise it will be streamed.
Audio module documentation © Paul Manias © 2002-2025

SVF Type

Flags for the SetVolume() method.

NameDescription
SVF::CAPTURESet input, not output.
SVF::MUTEMute the audio for this channel.
SVF::UNMUTEUnmute the audio for this channel.
Audio module documentation © Paul Manias © 2002-2025

VCF Type

Volume control flags

NameDescription
VCF::CAPTUREThe mixer supports audio input.
VCF::JOINEDThe mixer channels are joined (e.g. left and right speakers cannot be adjusted separately).
VCF::MONOThe mixer is restricted to mono input/output.
VCF::MUTEThe mixer is muted.
VCF::PLAYBACKThe mixer supports audio output.
VCF::SYNCThe mixer is synchronised.
Audio module documentation © Paul Manias © 2002-2025

AudioLoop Structure

Loop settings for the AddSample() method.

FieldTypeDescription
LoopModeLOOPLoop mode (single, double)
Loop1TypeLTYPEFirst loop type (unidirectional, bidirectional)
Loop2TypeLTYPESecond loop type (unidirectional, bidirectional)
Loop1StartINTStart of the first loop
Loop1EndINTEnd of the first loop
Loop2StartINTStart of the second loop
Loop2EndINTEnd of the second loop
Audio module documentation © Paul Manias © 2002-2025