bass.h
来自「Ion Team Lord Of The Rings Demo 模拟指环王的3」· C头文件 代码 · 共 1,189 行 · 第 1/4 页
H
1,189 行
BOOL BASSDEF(BASS_StreamPreBuf)(HSTREAM handle);
/* Pre-buffer initial sample data ready for playback.
handle : Handle of stream */
BOOL BASSDEF(BASS_StreamPlay)(HSTREAM handle, BOOL flush, DWORD flags);
/* Play a sample stream, optionally flushing the buffer first.
handle : Handle of stream to play
flush : Flush buffer contents. If you stop a stream and then want to
continue it from where it stopped, don't flush it. Flushing
a file stream causes it to restart from the beginning.
flags : BASS_SAMPLE_LOOP flag (only affects file streams) */
DWORD BASSDEF(BASS_StreamGetFilePosition)(HSTREAM handle, DWORD mode);
/* Retrieves the file position of the decoding, the download (if streaming from
the internet), or the end (total length). Obviously only works with file streams.
handle : Stream handle
mode : The position to retrieve (0=decoding, 1=download, 2=end)
RETURN : The position (0xffffffff=error) */
BOOL BASSDEF(BASS_CDInit)(char *drive, DWORD flags);
/* Initialize the CD functions, must be called before any other CD
functions. The volume is initially set to 100 (the maximum), use
BASS_ChannelSetAttributes() to adjust it.
drive : The CD drive, for example: "d:" (NULL=use default drive)
flags : BASS_DEVICE_LEAVEVOL = leave the volume as it is */
void BASSDEF(BASS_CDFree)();
/* Free resources used by the CD. */
BOOL BASSDEF(BASS_CDInDrive)();
/* Check if there is a CD in the drive. */
char *BASSDEF(BASS_CDGetID)(DWORD id);
/* Retrieves identification info from the CD in the drive.
id : One of the BASS_CDID_xxx flags
RETURN : ID string (NULL=error) */
DWORD BASSDEF(BASS_CDGetTracks)();
/* Retrieves the number of tracks on the CD
RETURN : The number of tracks (0xffffffff=error) */
BOOL BASSDEF(BASS_CDPlay)(DWORD track, BOOL loop, BOOL wait);
/* Play a CD track.
track : Track number to play (1=first)
loop : TRUE = Loop the track
wait : TRUE = don't return until playback has started (some drives
will always wait anyway) */
DWORD BASSDEF(BASS_CDGetTrackLength)(DWORD track);
/* Retrieves the playback length (in milliseconds) of a cd track.
track : The CD track (1=first)
RETURN : The length (0xffffffff=error) */
char *BASSDEF(BASS_RecordGetDeviceDescription)(DWORD devnum);
/* Get the text description of a recording device. This function can be
used to enumerate the available devices.
devnum : The device (0=first)
RETURN : The text description of the device (NULL=error) */
BOOL BASSDEF(BASS_RecordInit)(int device);
/* Initialize a recording device.
device : Device to use (0=first, -1=default) */
void BASSDEF(BASS_RecordFree)();
/* Free all resources used by the recording device. */
void BASSDEF(BASS_RecordGetInfo)(BASS_RECORDINFO *info);
/* Retrieve some information on the recording device being used.
info : Pointer to store info at */
BOOL BASSDEF(BASS_RecordStart)(DWORD freq, DWORD flags, RECORDPROC *proc, DWORD user);
/* Start recording. Use BASS_ChannelStop to stop recording.
freq : Sampling rate
flags : BASS_SAMPLE_xxx flags (only the 8BITS/MONO flags are used)
proc : User defined function to receive the recorded data
user : The 'user' value passed to the callback function */
/* A "channel" can be a playing sample (HCHANNEL), a MOD music (HMUSIC), a
sample stream (HSTREAM), the CD (CDCHANNEL), or recording (RECORDCHAN). The
following functions can be used with one or more of these channel types. */
float BASSDEF(BASS_ChannelBytes2Seconds)(DWORD handle, DWORD pos);
/* Translate a byte position into time (seconds)
handle : Handle of channel (HCHANNEL/HMUSIC/HSTREAM, also HSAMPLE)
pos : The position to translate
RETURN : The millisecond position (<0=error) */
DWORD BASSDEF(BASS_ChannelSeconds2Bytes)(DWORD handle, float pos);
/* Translate a time (seconds) position into bytes
handle : Handle of channel (HCHANNEL/HMUSIC/HSTREAM, also HSAMPLE)
pos : The position to translate
RETURN : The byte position (0xffffffff=error) */
int BASSDEF(BASS_ChannelIsActive)(DWORD handle);
/* Check if a channel is active (playing) or stalled.
handle : Channel handle (HCHANNEL/HMUSIC/HSTREAM, or CDCHANNEL/RECORDCHAN)
RETURN : 0=not playing, 1=playing, 2=stalled(internet) */
DWORD BASSDEF(BASS_ChannelGetFlags)(DWORD handle);
/* Get some info about a channel.
handle : Channel handle (HCHANNEL/HMUSIC/HSTREAM)
RETURN : BASS_SAMPLE_xxx flags (0xffffffff=error) */
BOOL BASSDEF(BASS_ChannelStop)(DWORD handle);
/* Stop a channel.
handle : Channel handle (HCHANNEL/HMUSIC/HSTREAM, or CDCHANNEL/RECORDCHAN) */
BOOL BASSDEF(BASS_ChannelPause)(DWORD handle);
/* Pause a channel.
handle : Channel handle (HCHANNEL/HMUSIC/HSTREAM, or CDCHANNEL/RECORDCHAN) */
BOOL BASSDEF(BASS_ChannelResume)(DWORD handle);
/* Resume a paused channel.
handle : Channel handle (HCHANNEL/HMUSIC/HSTREAM, or CDCHANNEL/RECORDCHAN) */
BOOL BASSDEF(BASS_ChannelSetAttributes)(DWORD handle, int freq, int volume, int pan);
/* Update a channel's attributes. The actual setting may not be exactly
as specified, depending on the accuracy of the device and drivers.
NOTE: Only the volume can be adjusted for the CD "channel", but not all
soundcards allow controlling of the CD volume level.
handle : Channel handle (HCHANNEL/HMUSIC/HSTREAM, or CDCHANNEL)
freq : Playback rate (100-100000, 0=original, -1=leave current)
volume : Volume (-1=leave current, 0=silent, 100=max)
pan : Pan position (-101=current, -100=left, 0=middle, 100=right)
panning has no effect on 3D channels */
BOOL BASSDEF(BASS_ChannelGetAttributes)(DWORD handle, DWORD *freq, DWORD *volume, int *pan);
/* Retrieve a channel's attributes. Only the volume is available for
the CD "channel" (if allowed by the soundcard/drivers).
handle : Channel handle (HCHANNEL/HMUSIC/HSTREAM, or CDCHANNEL)
freq : Pointer to store playback rate (NULL=don't retrieve it)
volume : Pointer to store volume (NULL=don't retrieve it)
pan : Pointer to store pan position (NULL=don't retrieve it) */
BOOL BASSDEF(BASS_ChannelSet3DAttributes)(DWORD handle, int mode, float min, float max, int iangle, int oangle, int outvol);
/* Set a channel's 3D attributes.
handle : Channel handle (HCHANNEL/HSTREAM/HMUSIC)
mode : BASS_3DMODE_xxx mode (-1=leave current setting)
min : minimum distance, volume stops increasing within this distance (<0.0=leave current)
max : maximum distance, volume stops decreasing past this distance (<0.0=leave current)
iangle : angle of inside projection cone in degrees (360=omnidirectional, -1=leave current)
oangle : angle of outside projection cone in degrees (-1=leave current)
NOTE: iangle & oangle must both be set in a single call
outvol : delta-volume outside the projection cone (0=silent, 100=same as inside)
The iangle/oangle angles decide how wide the sound is projected around the
orientation angle. Within the inside angle the volume level is the channel
level as set with BASS_ChannelSetAttributes, from the inside to the outside
angles the volume gradually changes by the "outvol" setting. */
BOOL BASSDEF(BASS_ChannelGet3DAttributes)(DWORD handle, DWORD *mode, float *min, float *max, DWORD *iangle, DWORD *oangle, DWORD *outvol);
/* Retrieve a channel's 3D attributes.
handle : Channel handle (HCHANNEL/HSTREAM/HMUSIC)
mode : BASS_3DMODE_xxx mode (NULL=don't retrieve it)
min : minumum distance (NULL=don't retrieve it)
max : maximum distance (NULL=don't retrieve it)
iangle : angle of inside projection cone (NULL=don't retrieve it)
oangle : angle of outside projection cone (NULL=don't retrieve it)
NOTE: iangle & oangle must both be retrieved in a single call
outvol : delta-volume outside the projection cone (NULL=don't retrieve it) */
BOOL BASSDEF(BASS_ChannelSet3DPosition)(DWORD handle, BASS_3DVECTOR *pos, BASS_3DVECTOR *orient, BASS_3DVECTOR *vel);
/* Update a channel's 3D position, orientation and velocity. The velocity
is only used to calculate the doppler effect.
handle : Channel handle (HCHANNEL/HSTREAM/HMUSIC)
pos : position of the sound (NULL=leave current)
orient : orientation of the sound, this is irrelevant if it's an
omnidirectional sound source (NULL=leave current)
vel : velocity of the sound (NULL=leave current) */
BOOL BASSDEF(BASS_ChannelGet3DPosition)(DWORD handle, BASS_3DVECTOR *pos, BASS_3DVECTOR *orient, BASS_3DVECTOR *vel);
/* Retrieve a channel's current 3D position, orientation and velocity.
handle : Channel handle (HCHANNEL/HSTREAM/HMUSIC)
pos : position of the sound (NULL=don't retrieve it)
orient : orientation of the sound, this is irrelevant if it's an
omnidirectional sound source (NULL=don't retrieve it)
vel : velocity of the sound (NULL=don't retrieve it) */
BOOL BASSDEF(BASS_ChannelSetPosition)(DWORD handle, DWORD pos);
/* Set the current playback position of a channel.
handle : Channel handle (HCHANNEL/HMUSIC/HSTREAM, or CDCHANNEL)
pos : the position
if HCHANNEL: position in bytes
if HMUSIC: LOWORD=order HIWORD=row ... use MAKELONG(order,row)
if HSTREAM: position in bytes, file streams only
if CDCHANNEL: position in milliseconds from start of track */
DWORD BASSDEF(BASS_ChannelGetPosition)(DWORD handle);
/* Get the current playback position of a channel.
handle : Channel handle (HCHANNEL/HMUSIC/HSTREAM, or CDCHANNEL)
RETURN : the position (0xffffffff=error)
if HCHANNEL: position in bytes
if HMUSIC: LOWORD=order HIWORD=row (see BASS_MusicSetPositionScaler)
if HSTREAM: total bytes played since the stream was last flushed
if CDCHANNEL: position in milliseconds from start of track */
DWORD BASSDEF(BASS_ChannelGetLevel)(DWORD handle);
/* Calculate a channel's current output level.
handle : Channel handle (HMUSIC/HSTREAM, or RECORDCHAN)
RETURN : LOWORD=left level (0-128) HIWORD=right level (0-128) (0xffffffff=error) */
DWORD BASSDEF(BASS_ChannelGetData)(DWORD handle, void *buffer, DWORD length);
/* Retrieves upto "length" bytes of the channel's current sample data. This is
useful if you wish to "visualize" the sound.
handle : Channel handle (HMUSIC/HSTREAM, or RECORDCHAN)
buffer : Location to write the data
length : Number of bytes of wanted, or a BASS_DATA_xxx flag
RETURN : Number of bytes actually written to the buffer (0xffffffff=error) */
HSYNC BASSDEF(BASS_ChannelSetSync)(DWORD handle, DWORD type, DWORD param, SYNCPROC *proc, DWORD user);
/* Setup a sync on a channel. Multiple syncs may be used per channel.
handle : Channel handle
type : Sync type (BASS_SYNC_xxx type & flags)
param : Sync parameters (see the BASS_SYNC_xxx type description)
proc : User defined callback function (window message if using BASS_SYNC_MESSAGE flag)
user : The 'user' value passed to the callback function
RETURN : Sync handle (NULL=error) */
BOOL BASSDEF(BASS_ChannelRemoveSync)(DWORD handle, HSYNC sync);
/* Remove a sync from a channel
handle : Channel handle
sync : Handle of sync to remove */
HDSP BASSDEF(BASS_ChannelSetDSP)(DWORD handle, DSPPROC *proc, DWORD user);
/* Setup a user DSP function on a channel. When multiple DSP functions
are used on a channel, they are called in the order that they were added.
handle : Channel handle (HMUSIC/HSTREAM)
proc : User defined callback function
user : The 'user' value passed to the callback function
RETURN : DSP handle (NULL=error) */
BOOL BASSDEF(BASS_ChannelRemoveDSP)(DWORD handle, HDSP dsp);
/* Remove a DSP function from a channel
handle : Channel handle (HMUSIC/HSTREAM)
dsp : Handle of DSP to remove */
HFX BASSDEF(BASS_ChannelSetFX)(DWORD handle, DWORD type);
/* Setup a DX8 effect on a channel. Can only be used when the channel
is not playing. Use BASS_FXSetParameters to set the effect parameters.
Obviously requires DX8.
handle : Channel handle (HMUSIC/HSTREAM)
type : Type of effect to setup (BASS_FX_xxx)
RETURN : FX handle (NULL=error) */
BOOL BASSDEF(BASS_ChannelRemoveFX)(DWORD handle, HFX fx);
/* Remove a DX8 effect from a channel. Can only be used when the
channel is not playing.
handle : Channel handle (HMUSIC/HSTREAM)
fx : Handle of FX to remove */
BOOL BASSDEF(BASS_ChannelSetEAXMix)(DWORD handle, float mix);
/* Set the wet(reverb)/dry(no reverb) mix ratio on the channel. By default
the distance of the sound from the listener is used to calculate the mix.
NOTE: The channel must have 3D functionality enabled for the EAX environment
to have any affect on it.
handle : Channel handle (HCHANNEL/HSTREAM/HMUSIC)
mix : The ratio (0.0=reverb off, 1.0=max reverb, -1.0=let EAX calculate
the reverb mix based on the distance) */
BOOL BASSDEF(BASS_ChannelGetEAXMix)(DWORD handle, float *mix);
/* Get the wet(reverb)/dry(no reverb) mix ratio on the channel.
handle : Channel handle (HCHANNEL/HSTREAM/HMUSIC)
mix : Pointer to store the ratio at */
BOOL BASSDEF(BASS_ChannelSetLink)(DWORD handle, DWORD chan);
/* Set a link between 2 channels. When the 1st is played/stopped/paused/resumed
the 2nd channel is also played/stopped/paused/resumed.
handle : Handle of channel to link "chan" to (HMUSIC/HSTREAM)
chan : Handle of channel to link to "handle" (HMUSIC/HSTREAM) */
BOOL BASSDEF(BASS_ChannelRemoveLink)(DWORD handle, DWORD chan);
/* Remove a link from a channel.
handle : Handle of channel to unlink with "chan" (HMUSIC/HSTREAM)
chan : Handle of channel to unlink from "handle" (HMUSIC/HSTREAM) */
BOOL BASSDEF(BASS_FXSetParameters)(HFX handle, void *par);
/* Set the parameters of a DX8 effect.
handle : FX handle
par : Pointer to the parameter structure */
BOOL BASSDEF(BASS_FXGetParameters)(HFX handle, void *par);
/* Retrieve the parameters of a DX8 effect.
handle : FX handle
par : Pointer to the parameter structure */
#ifdef __cplusplus
}
#endif
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?