Retrieves the value of a channel's attribute.
Namespace: Un4seen.Bass
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
[DllImportAttribute("bass", EntryPoint = "BASS_ChannelGetAttributeEx")] public static int BASS_ChannelGetAttribute( int handle, BASSAttribute attrib, IntPtr value, int size )
Parameters
- handle
- Type: SystemInt32
The channel handle... a HCHANNEL, HMUSIC, HSTREAM or HRECORD. - attrib
- Type: Un4seen.BassBASSAttribute
The attribute to get the value of (one of the following, see BASSAttribute):Other attributes may be supported by add-ons, see the documentationBASS_ATTRIB_SCANINFO Scanned info. (HSTREAM only). BASS_ATTRIB_USER User-defined info. (HMUSIC/HSTREAM/HRECORD). - value
- Type: SystemIntPtr
Pointer to a buffer to receive the attribute data. - size
- Type: SystemInt32
The size of the attribute data... 0 = get the size of the attribute without getting the data.
Return Value
Type: Int32If successful, the size of the attribute data is returned, else 0 is returned. Use BASS_ErrorGetCode to get the error code.
Remarks
ERROR CODE | Description |
---|---|
BASS_ERROR_HANDLE | handle is not a valid channel. |
BASS_ERROR_NOTAVAIL | The attrib is not available. |
BASS_ERROR_ILLTYPE | attrib is not valid. |
BASS_ERROR_ILLPARAM | The value content or size is not valid. |
Examples
// get the size int size = Bass.BASS_ChannelGetAttribute(stream1, BASSAttribute.BASS_ATTRIB_SCANINFO, IntPtr.Zero, 0); IntPtr hglobal = Marshal.AllocHGlobal(size); // get the data Bass.BASS_ChannelGetAttribute(stream1, BASSAttribute.BASS_ATTRIB_SCANINFO, scaninfo, size); // apply it to the other stream Bass.BASS_ChannelSetAttribute(stream2, BASSAttribute.BASS_ATTRIB_SCANINFO, scaninfo, size); Marshal.FreeHGlobal(hglobal);
See Also