Please enable JavaScript to view this site.

thinBasic Help Manual

* * HELP & MANUAL PREMIUM PACK 4 DEMO VERSION * *

This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.

This version is copyright and may only be used for local testing purposes. It may not be distributed.

Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.

 

Description

 

Initializes an output device.

 

Syntax

 

n = TBASS_Init (Device, Frequency, Flags, Win, clsID)

 

Returns

 

If the device was successfully initialized, %TBASS_TRUE is returned, else %TBASS_FALSE is returned. Use TBASS_ErrorGetCode to get the error code.

 

Parameters

 

Name

Type

Optional

Meaning

Device

Number

No

The device to use... -1 = default device, 0 = no sound, 1 = first real output device.

Frequency

Number

No

Output sample rate.

Flags

Number

No

Any combination of the following flags:

 

Flag

Meaning

%TBASS_DEVICE_8BITS

Use 8-bit resolution, else 16-bit.

%TBASS_DEVICE_MONO

Use mono, else stereo.

%TBASS_DEVICE_3D

Enable 3D functionality.

If this flag is not specified, then the %TBASS_SAMPLE_3D flag is ignored when loading/creating a sample/stream/music.

%TBASS_DEVICE_LATENCY

Calculates the latency of the device, that is the delay between requesting a sound to play and it actually being heard. A recommended minimum buffer length is also calculated. Both values are retrievable in the BASS_INFO structure (latency & minbuf members). These calculations can increase the time taken by this function by 1-3 seconds

%TBASS_DEVICE_SPEAKERS

Force the enabling of speaker assignment. With some devices/drivers, the number of speakers BASS detects may be 2, when the device in fact supports more than 2 speakers. This flag forces the enabling of assignment to 8 possible speakers. This flag has no effect with non-WDM drivers.

%TBASS_DEVICE_NOSPEAKER

Ignore speaker arrangement. This flag tells BASS not to make any special consideration for speaker arrangements when using the SPEAKER flags, eg. swapping the CENLFE and REAR speaker channels in 5/7.1 speaker output. This flag should be used with plain multi-channel (rather than 5/7.1) devices.

 

 

Win

Number

No

The application's main window... 0 = the current foreground window (use this for console applications).

clsID

Number

No

Class identifier of the object to create, that will be used to initialize DirectSound... NULL (0) = use default.

 

Remarks

 

Restrictions

 

See also

 

Examples

 

 

 

 

Created with Help+Manual 8 and styled with Premium Pack Version 4 © by EC Software