BASS.NET API for the Un4seen BASS Audio Library

BASSFlag Enumeration

BASS.NET API for the Un4seen BASS Audio Library

Namespace:  Un4seen.Bass
Assembly:  Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax

public enum BASSFlag
Members

  Member nameValueDescription
BASS_DEFAULT0 0 = default create stream: 16 Bit, stereo, no Float, hardware mixing, no Loop, no 3D, no speaker assignments...
BASS_SAMPLE_8BITS1 Use 8-bit resolution. If neither this or the BASS_SAMPLE_FLOAT flags are specified, then the stream is 16-bit.
BASS_SAMPLE_MONO2 Decode/play the stream (MP3/MP2/MP1 only) in mono, reducing the CPU usage (if it was originally stereo).

This flag is automatically applied if BASS_DEVICE_MONO was specified when calling BASS_Init(Int32, Int32, BASSInit, IntPtr, IntPtr).

BASS_SAMCHAN_NEW1 BASS_SampleGetChannel: Get a new playback channel
BASS_SAMCHAN_STREAM2 BASS_SampleGetChannel: Create a stream
BASS_SAMPLE_LOOP4 Loop the file. This flag can be toggled at any time using BASS_ChannelFlags(Int32, BASSFlag, BASSFlag).
BASS_SAMPLE_3D8 Use 3D functionality. This is ignored if BASS_DEVICE_3D wasn't specified when calling BASS_Init(Int32, Int32, BASSInit, IntPtr, IntPtr).

3D streams must be mono (chans=1). The SPEAKER flags can not be used together with this flag.

BASS_SAMPLE_SOFTWARE16 Force the stream to not use hardware mixing.
BASS_SAMPLE_MUTEMAX32 Sample: muted at max distance (3D only)
BASS_SAMPLE_VAM64 Sample: uses the DX7 voice allocation & management
BASS_SAMPLE_FX128 Enable the old implementation of DirectX 8 effects. See the DX8 effect implementations section for details.

Use BASS_ChannelSetFX(Int32, BASSFXType, Int32) to add effects to the stream. Requires DirectX 8 or above.

BASS_SAMPLE_FLOAT256 Use 32-bit floating-point sample data (see Floating-Point Channels for details). WDM drivers or the BASS_STREAM_DECODE flag are required to use this flag.
BASS_RECORD_PAUSE32768 Recording: Start the recording paused. Use BASS_ChannelPlay(Int32, Boolean) to start it.
BASS_RECORD_ECHOCANCEL8192 Recording: enable echo cancellation (only available on certain devices, like iOS).
BASS_RECORD_AGC16384 Recording: enabled automatic gain control (only available on certain devices, like iOS).
BASS_STREAM_PRESCAN131072 Enable pin-point accurate seeking (to the exact byte) on the MP3/MP2/MP1 stream.

This also increases the time taken to create the stream, due to the entire file being pre-scanned for the seek points. Note: BASS_STREAM_PRESCAN is ONLY needed for files with a VBR, files with a CBR are always accurate.

BASS_STREAM_AUTOFREE262144 Automatically free the stream's resources when it has reached the end, or when BASS_ChannelStop(Int32) (or BASS_Stop) is called.
BASS_STREAM_RESTRATE524288 Restrict the download rate of the file to the rate required to sustain playback.

If this flag is not used, then the file will be downloaded as quickly as possible. This flag has no effect on "unbuffered" streams (buffer=).

BASS_STREAM_BLOCK1048576 Download and play the file in smaller chunks.

Uses a lot less memory than otherwise, but it's not possible to seek or loop the stream - once it's ended, the file must be opened again to play it again. This flag will automatically be applied when the file length is unknown. This flag also has the effect of resticting the download rate. This flag has no effect on "unbuffered" streams (buffer=).

BASS_STREAM_DECODE2097152 Decode the sample data, without outputting it. Use BASS_ChannelGetData(Int32, IntPtr, Int32) to retrieve decoded sample data.

BASS_SAMPLE_SOFTWARE/3D/FX/AUTOFREE are all ignored when using this flag, as are the SPEAKER flags.

BASS_STREAM_STATUS8388608 Pass status info (HTTP/ICY tags) from the server to the DOWNLOADPROC callback during connection.

This can be useful to determine the reason for a failure.

BASS_SPEAKER_FRONT16777216 Front speakers (channel 1/2)
BASS_SPEAKER_REAR33554432 Rear/Side speakers (channel 3/4)
BASS_SPEAKER_CENLFE50331648 Center & LFE speakers (5.1, channel 5/6)
BASS_SPEAKER_REAR267108864 Rear Center speakers (7.1, channel 7/8; same as SIDE)
BASS_SPEAKER_SIDE67108864 Side Center speakers (7.1, channel 7/8)
BASS_SPEAKER_LEFT268435456 Speaker Modifier: left channel only
BASS_SPEAKER_RIGHT536870912 Speaker Modifier: right channel only
BASS_SPEAKER_FRONTLEFT285212672 Front Left speaker only (channel 1)
BASS_SPEAKER_FRONTRIGHT553648128 Front Right speaker only (channel 2)
BASS_SPEAKER_REARLEFT301989888 Rear/Side Left speaker only (channel 3)
BASS_SPEAKER_REARRIGHT570425344 Rear/Side Right speaker only (channel 4)
BASS_SPEAKER_CENTER318767104 Center speaker only (5.1, channel 5)
BASS_SPEAKER_LFE587202560 LFE speaker only (5.1, channel 6)
BASS_SPEAKER_SIDELEFT335544320 Side Center Left speaker only (7.1, channel 7)
BASS_SPEAKER_SIDERIGHT603979776 Side Center Right speaker only (7.1, channel 8)
BASS_SPEAKER_REAR2LEFT335544320 Rear Center Left speaker only (7.1, channel 7; same as SIDELEFT)
BASS_SPEAKER_REAR2RIGHT603979776 Rear Center Right speaker only (7.1, channel 8; same as SIDERIGHT)
BASS_SPEAKER_PAIR116777216 speakers Pair 1
BASS_SPEAKER_PAIR233554432 speakers Pair 2
BASS_SPEAKER_PAIR350331648 speakers Pair 3
BASS_SPEAKER_PAIR467108864 speakers Pair 4
BASS_SPEAKER_PAIR583886080 speakers Pair 5
BASS_SPEAKER_PAIR6100663296 Speakers Pair 6
BASS_SPEAKER_PAIR7117440512 Speakers Pair 7
BASS_SPEAKER_PAIR8134217728 Speakers Pair 8
BASS_SPEAKER_PAIR9150994944 Speakers Pair 9
BASS_SPEAKER_PAIR10167772160 Speakers Pair 10
BASS_SPEAKER_PAIR11184549376 Speakers Pair 11
BASS_SPEAKER_PAIR12201326592 Speakers Pair 12
BASS_SPEAKER_PAIR13218103808 Speakers Pair 13
BASS_SPEAKER_PAIR14234881024 Speakers Pair 14
BASS_SPEAKER_PAIR15251658240 Speakers Pair 15
BASS_ASYNCFILE1073741824 Use an async look-ahead cache.
BASS_UNICODE-2147483648 File is a Unicode (16-bit characters) filename
BASS_SAMPLE_OVER_VOL65536 Sample: override lowest volume
BASS_SAMPLE_OVER_POS131072 Sample: override longest playing
BASS_SAMPLE_OVER_DIST196608 Sample: override furthest from listener (3D only)
BASS_WV_STEREO4194304 BASSWV add-on: limit to stereo
BASS_AC3_DOWNMIX_2512 BASS_AC3 add-on: downmix to stereo
BASS_AC3_DOWNMIX_41024 BASS_AC3 add-on: downmix to quad
BASS_DSD_RAW512 BASSdsd add-on: Produce raw DSD data instead of PCM. The DSD data is in blocks of 8 bits (1 byte) per-channel with the MSB being first/oldest. DSD data is not playable by BASS, so the BASS_STREAM_DECODE flag is required.
BASS_DSD_DOP1024 BASSdsd add-on: Produce DSD-over-PCM data (with 0x05/0xFA markers). DSD-over-PCM data is 24-bit, so the BASS_SAMPLE_FLOAT flag is required.
BASS_DSD_DOP_AA2048 BASSdsd add-on: Produce DSD-over-PCM data with 0xAA markers. DSD-over-PCM data is 24-bit, so the BASS_SAMPLE_FLOAT flag is required.
BASS_AC3_DOWNMIX_DOLBY1536 BASS_AC3 add-on: downmix to dolby
BASS_AC3_DYNAMIC_RANGE2048 BASS_AC3 add-on: enable dynamic range compression
BASS_AAC_FRAME9604096 BASS_AAC add-on: use 960 samples per frame
BASS_AAC_STEREO4194304 BASS_AAC add-on: downmatrix to stereo
BASS_MIXER_END65536 BASSmix add-on: end the stream when there are no sources
BASS_MIXER_CHAN_PAUSE131072 BASSmix add-on: don't process the source
BASS_MIXER_NONSTOP131072 BASSmix add-on: don't stall when there are no sources
BASS_MIXER_RESUME4096 BASSmix add-on: resume a stalled mixer immediately upon new/unpaused source
BASS_MIXER_CHAN_ABSOLUTE4096 BASSmix add-on: start is an absolute position
BASS_MIXER_POSEX8192 BASSmix add-on: enable BASS_Mixer_ChannelGetPositionEx(Int32, BASSMode, Int32) support.
BASS_MIXER_NOSPEAKER16384 BASSmix add-on: ignore speaker arrangement
BASS_MIXER_CHAN_LIMIT16384 BASSmix add-on: Limit mixer processing to the amount available from this source
BASS_MIXER_LIMIT16384 BASSmix add-on: Limit mixer processing to the amount available from this source
BASS_MIXER_QUEUE32768 BASSmix add-on: queue sources
BASS_MIXER_CHAN_MATRIX65536 BASSmix add-on: Matrix mixing
BASS_MIXER_MATRIX65536 BASSmix add-on: Matrix mixing
BASS_MIXER_CHAN_DOWNMIX4194304 BASSmix add-on: downmix to stereo (or mono if mixer is mono)
BASS_MIXER_CHAN_NORAMPIN8388608 BASSmix add-on: don't ramp-in the start
BASS_MIXER_NORAMPIN8388608 BASSmix add-on: don't ramp-in the start
BASS_SPLIT_SLAVE4096 BASSmix add-on: only read buffered data
BASS_MIXER_CHAN_BUFFER8192 BASSmix add-on: buffer source data for BASS_Mixer_ChannelGetData(Int32, IntPtr, Int32) and BASS_Mixer_ChannelGetLevel(Int32).
BASS_MIXER_BUFFER8192 BASSmix add-on: buffer source data for BASS_Mixer_ChannelGetData(Int32, IntPtr, Int32) and BASS_Mixer_ChannelGetLevel(Int32).
BASS_SPLIT_POS8192 BASSmix add-on: The splitter's length and position is based on the splitter's (rather than the source's) channel count.
BASS_CD_SUBCHANNEL512 BASSCD add-on: Read sub-channel data. 96 bytes of de-interleaved sub-channel data will be returned after each 2352 bytes of audio. This flag can not be used with the BASS_SAMPLE_FLOAT flag, and is ignored if the BASS_STREAM_DECODE flag is not used.
BASS_CD_SUBCHANNEL_NOHW1024 BASSCD add-on: Read sub-channel data, without using any hardware de-interleaving. This is identical to the BASS_CD_SUBCHANNEL flag, except that the de-interleaving is always performed by BASSCD even if the drive is apparently capable of de-interleaving itself.
BASS_CD_C2ERRORS2048 BASSCD add-on: Include C2 error info. 296 bytes of C2 error info is returned after each 2352 bytes of audio (and optionally 96 bytes of sub-channel data). This flag cannot be used with the BASS_SAMPLE_FLOAT flag, and is ignored if the BASS_STREAM_DECODE flag is not used.

The first 294 bytes contain the C2 error bits (one bit for each byte of audio), followed by a byte containing the logical OR of all 294 bytes, which can be used to quickly check if there were any C2 errors. The final byte is just padding.

Note that if you request both sub-channel data and C2 error info, the C2 info will come before the sub-channel data!

BASS_MIDI_NODRUMPARAM1024 BASSMIDI add-on: Do not apply default per-drum reverb and chorus levels and instead set them all to full. The default is to set different levels for different types of drum, eg. lower levels on kick drums. The levels can subsequently be changed via the MIDI_EVENT_DRUM_REVERB and MIDI_EVENT_DRUM_CHORUS events. This flag can be toggled at any time using BASS_ChannelFlags(Int32, BASSFlag, BASSFlag), but will only take effect upon a program change or system reset.
BASS_MIDI_NOSYSRESET2048 BASSMIDI add-on: Ignore system reset events (MIDI_EVENT_SYSTEM) when the system mode is unchanged. This flag can be toggled at any time using BASS_ChannelFlags(Int32, BASSFlag, BASSFlag).
BASS_MIDI_DECAYEND4096 BASSMIDI add-on: Let the sound decay naturally (including reverb) instead of stopping it abruptly at the end of the file. This flag can be toggled at any time using BASS_ChannelFlags(Int32, BASSFlag, BASSFlag).
BASS_MIDI_NOFX8192 BASSMIDI add-on: Disable the MIDI reverb/chorus processing. This flag can be toggled at any time using BASS_ChannelFlags(Int32, BASSFlag, BASSFlag).
BASS_MIDI_DECAYSEEK16384 BASSMIDI add-on: Let the old sound decay naturally (including reverb) when changing the position, including looping. This flag can be toggled at any time using BASS_ChannelFlags(Int32, BASSFlag, BASSFlag), and can also be used in BASS_ChannelSetPosition(Int32, Int64, BASSMode) calls to have it apply to particular position changes.
BASS_MIDI_NOCROP32768 BASSMIDI add-on: Do not remove empty space (containing no events) from the end of the file.
BASS_MIDI_NOTEOFF165536 BASSMIDI add-on: Only release the oldest instance upon a note off event (MIDI_EVENT_NOTE with velocity=0) when there are overlapping instances of the note. Otherwise all instances are released. This flag can be toggled at any time using BASS_ChannelFlags(Int32, BASSFlag, BASSFlag).
BASS_MIDI_ASYNC4194304 BASSMIDI add-on: Process events asynchronously in BASS_MIDI_StreamEvent(Int32, Int32, BASSMIDIEvent, Int32) and BASS_MIDI_StreamEvents(Int32, BASSMIDIEventMode, BASS_MIDI_EVENT, Int32) calls. This flag can be toggled at any time using BASS_ChannelFlags(Int32, BASSFlag, BASSFlag).
BASS_MIDI_SINCINTER8388608 BASSMIDI add-on: Use sinc interpolated sample mixing. This increases the sound quality, but also requires more CPU. Otherwise linear interpolation is used.
BASS_MIDI_FONT_MEM65536 BASSMIDI add-on:
BASS_MIDI_FONT_MMAP131072 BASSMIDI add-on: Map the file into memory. This flag is ignored if the soundfont is packed as the sample data cannot be played directly from a mapping; it needs to be decoded. This flag is also ignored if the file is too large to be mapped into memory.
BASS_MIDI_FONT_XGDRUMS262144 BASSMIDI add-on: Use bank 127 in the soundfont for XG drum kits.

When an XG drum kit is needed, bank 127 in soundfonts that have this flag set will be checked first, before falling back to bank 128 (the standard SF2 drum kit bank) if it is not available there.

BASS_MIDI_FONT_NOFX524288 BASSMIDI add-on: Ignore the soundfont's reverb and chorus settings.

If you would like to ignore the soundfont's reverb/chorus on only some presets/banks, then you can load 2 instances of it (one with BASS_MIDI_FONT_NOFX flag and one without), and then assign them as wanted in a BASS_MIDI_StreamSetFonts call. The 2 instances will share resources, so they won't really use any more memory than 1 instance.

BASS_MIDI_FONT_LINATTMOD1048576 BASSMIDI add-on: Use a linear attack phase in SF2 modulation (pitch/filter) envelopes. Otherwise a convex curve is used. The attack phase is always linear in SFZ envelopes.
BASS_MIDI_FONT_LINDECVOL2097152 BASSMIDI add-on: Use linear decay and release phases in volume envelopes. Otherwise a concave curve is used. The attack phase is always linear.
BASS_MIDI_FONT_NORAMPIN4194304 BASSMIDI add-on: Never ramp-in the start of a sample in the soundfont. Otherwise a sample will be ramped-in if its data does not begin with a 0 (further away results in a longer ramp). This is only relevant when the volume envelope has no attack phase.
BASS_MIDI_FONT_NOLIMITS8388608 BASSMIDI add-on: Do not limit SF2 generator values to emulate Creative/SoundBlaster hardware.
BASS_MIDI_FONT_MINFX16777216 BASSMIDI add-on: Treat the reverb/chorus levels in the soundfont as minimums. The higher of them and the MIDI levels (CC91/93) will be used instead of the sum of both.
BASS_MIDI_PACK_NOHEAD1 BASSMIDI add-on: Don't send a WAVE header to the encoder. If this flag is used then the sample format (mono 16-bit) must be passed to the encoder some other way, eg. via the command-line.
BASS_MIDI_PACK_16BIT2 BASSMIDI add-on: Reduce 24-bit sample data to 16-bit before encoding.
BASS_MIDI_PACK_48KHZ4 BASSMIDI add-on: Set encoding rate to 48000 Hz (else 44100 Hz).
BASS_FX_FREESOURCE65536 BASS_FX add-on: Free the source handle as well?
BASS_FX_BPM_BKGRND1 BASS_FX add-on: If in use, then you can do other stuff while detection's in process.
BASS_FX_BPM_MULT22 BASS_FX add-on: If in use, then will auto multiply bpm by 2 (if BPM < MinBPM*2)
BASS_FX_TEMPO_ALGO_LINEAR512 BASS_FX add-on (AddOn.Fx.BassFx.BASS_FX_TempoCreate): Uses a linear interpolation mode (simple).
BASS_FX_TEMPO_ALGO_CUBIC1024 BASS_FX add-on (AddOn.Fx.BassFx.BASS_FX_TempoCreate): Uses a cubic interpolation mode (recommended, default).
BASS_FX_TEMPO_ALGO_SHANNON2048 BASS_FX add-on (AddOn.Fx.BassFx.BASS_FX_TempoCreate): Uses a 8-tap band-limited Shannon interpolation (complex, but not much better than cubic).
BASS_MUSIC_FLOAT256 Music: Use 32-bit floating-point sample data (see Floating-Point Channels for details). WDM drivers or the BASS_STREAM_DECODE flag are required to use this flag.
BASS_MUSIC_MONO2 Music: Decode/play the mod music in mono, reducing the CPU usage (if it was originally stereo). This flag is automatically applied if BASS_DEVICE_MONO was specified when calling BASS_Init(Int32, Int32, BASSInit, IntPtr, IntPtr).
BASS_MUSIC_LOOP4 Music: Loop the music. This flag can be toggled at any time using BASS_ChannelFlags(Int32, BASSFlag, BASSFlag).
BASS_MUSIC_3D8 Music: Use 3D functionality. This is ignored if BASS_DEVICE_3D wasn't specified when calling BASS_Init(Int32, Int32, BASSInit, IntPtr, IntPtr).

3D streams must be mono (chans=1). The SPEAKER flags can not be used together with this flag.

BASS_MUSIC_FX128 Music: Enable the old implementation of DirectX 8 effects. See the DX8 effect implementations section for details.

Use BASS_ChannelSetFX(Int32, BASSFXType, Int32) to add effects to the stream. Requires DirectX 8 or above.

BASS_MUSIC_AUTOFREE262144 Music: Automatically free the music when it ends. This allows you to play a music and forget about it, as BASS will automatically free the music's resources when it has reached the end or when BASS_ChannelStop(Int32) (or BASS_Stop) is called.

Note that some musics never actually end on their own (ie. without you stopping them).

BASS_MUSIC_DECODE2097152 Music: Decode the music into sample data, without outputting it.

Use BASS_ChannelGetData(Int32, IntPtr, Int32) to retrieve decoded sample data. BASS_SAMPLE_SOFTWARE/3D/FX/AUTOFREE are ignored when using this flag, as are the SPEAKER flags.

BASS_MUSIC_PRESCAN131072 Music: Calculate the playback length of the music, and enable seeking in bytes. This slightly increases the time taken to load the music, depending on how long it is.

In the case of musics that loop, the length until the loop occurs is calculated. Use BASS_ChannelGetLength(Int32, BASSMode) to retrieve the length.

BASS_MUSIC_RAMP512 Music: Use "normal" ramping (as used in FastTracker 2).
BASS_MUSIC_RAMPS1024 Music: Use "sensitive" ramping.
BASS_MUSIC_SURROUND2048 Music: Apply XMPlay's surround sound to the music (ignored in mono).
BASS_MUSIC_SURROUND24096 Music: Apply XMPlay's surround sound mode 2 to the music (ignored in mono).
BASS_MUSIC_FT2PAN8192 Music: Apply FastTracker 2 panning to XM files.
BASS_MUSIC_FT2MOD8192 Music: Play .MOD file as FastTracker 2 would.
BASS_MUSIC_PT1MOD16384 Music: Play .MOD file as ProTracker 1 would.
BASS_MUSIC_NONINTER65536 Music: Use non-interpolated mixing. This generally reduces the sound quality, but can be good for chip-tunes.
BASS_MUSIC_SINCINTER8388608 Music: Sinc interpolated sample mixing. This increases the sound quality, but also requires quite a bit more processing. If neither this or the BASS_MUSIC_NONINTER flag is specified, linear interpolation is used.
BASS_MUSIC_POSRESET32768 Music: Stop all notes when seeking (using BASS_ChannelSetPosition(Int32, Int64, BASSMode)).
BASS_MUSIC_POSRESETEX4194304 Music: Stop all notes and reset bpm/etc when seeking.
BASS_MUSIC_STOPBACK524288 Music: Stop the music when a backward jump effect is played. This stops musics that never reach the end from going into endless loops.

Some MOD musics are designed to jump all over the place, so this flag would cause those to be stopped prematurely. If this flag is used together with the BASS_SAMPLE_LOOP flag, then the music would not be stopped but any BASS_SYNC_END sync would be triggered.

BASS_MUSIC_NOSAMPLE1048576 Music: Don't load the samples. This reduces the time taken to load the music, notably with MO3 files, which is useful if you just want to get the name and length of the music without playing it.
See Also

Reference