Copyright © 2006-2023 MultiMedia Soft

BassModuleGet method

Previous pageReturn to chapter overviewNext page

Remarks

 

Obtains the handle of the instance of one of the BASS related modules loaded in memory. This method should be called only after having initialized the component through the InitRecordingSystem method.

 

This component already initializes and exploits the most important decoding and playback features implemented by the BASS module; in some case you could have the need to drive BASS directly in order to perform some particular task not available from the component itself; for achieving this possibility you would have to load and eventually free BASS or its plugins through the LoadLibrary or LoadLibraryEx and the FreeLibrary Windows API functions.

 

Through this method you have the possibility to access instances already loaded in memory by the multimedia engine AdjMmsEng.dll: indeed, by knowing the HMODULE of BASS.DLL or of some of its plugins, you could get the pointer to all of the functions exported by the various BASS modules through the GetProcAddress Windows API.

 

IMPORTANT NOTE: Calls to the BASS_Init and BASS_Free functions of BASS.DLL are already managed internally by multimedia engine AdjMmsEng.dll so it's recommended avoiding their usage in order to avoid compatibility issues.

 

In case you should need to have direct access to the handle (HSTREAM) of a recording or playback stream created through BASS after starting a recording or playback session, please, refer to the BassStreamGet method.

 

For further details about accessing BASS and its plugins directly from your code you can refer to the tutorial How to access BASS library functionalities directly.

 

 

Syntax

 

[Visual Basic]

Public Function BassModuleGet (

nModule as enumBassModules,

ByRef hModule as Int32

) as enumErrorCodes


 

[C#]

public enumErrorCodes BassModuleGet (

enumBassModules nModule,

ref Int32 hModule

);


 

[C++]

public: enumErrorCodes BassModuleGet (

enumBassModules nModule,

Int32 __gc *hModule

);


 

 

Parameter

Description

 

 

nModule

Number representing the instance of the BASS module whose handle is needed.

Supported values are the following:

Mnemonic constant

Value

Meaning

MODULE_BASS

0

Main BASS module BASS.DLL

MODULE_BASS_FX

1

BASS_FX.DLL plugin

MODULE_BASS_CD

2

BASSCD.DLL plugin

MODULE_BASS_ENC

3

BASSENC.DLL plugin

MODULE_BASS_MIX

4

BASSMIX.DLL plugin

MODULE_BASS_WMA

5

BASSWMA.DLL plugin

MODULE_BASS_MIDI

6

BASSMIDI.DLL plugin

MODULE_BASS_VST

7

BASS_VST.DLL plugin

MODULE_BASS_FLAC

8

BASSFLAC.DLL plugin

MODULE_BASS_AAC

9

BASS_AAC.DLL plugin

MODULE_BASS_AC3

10

BASS_AC3.DLL plugin

MODULE_BASS_WAVPACK

11

BASSWV.DLL plugin

MODULE_BASS_ALAC

12

BASS_ALAC.DLL plugin

MODULE_BASS_APE

13

BASS_APE.DLL plugin

MODULE_BASS_MPC

14

BASS_MPC.DLL plugin

MODULE_BASS_SPX

15

BASS_SPX.DLL plugin

MODULE_BASS_WASAPI

17

BASSWASAPI.DLL plugin

MODULE_BASS_OPUS

18

BASSOPUS.DLL plugin

hModule

Reference that, on return from the method call, will contain the handle to the BASS module (HMODULE) as returned by the LoadLibraryEx Windows API function called internally by the multimedia engine AdjMmsEng.dll of the component.

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred (see the LastError property for further error details)

enumErrorCodes.ERR_NOERROR (0

The method call was successful.