Returns a suggested ACM (Audio Compression Manager) codec output format without displaying a user dialog.
Namespace: Un4seen.Bass.AddOn.Enc
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
public static ACMFORMAT BASS_Encode_GetACMFormatSuggest( int handle, BASSACMFormat flags, WAVEFormatTag format )
Parameters
- handle
- Type: SystemInt32
The channel handle... a HSTREAM, HMUSIC, or HRECORD. - flags
- Type: Un4seen.Bass.AddOn.EncBASSACMFormat
A combination of these flags BASSACMFormat:BASS_ACM_DEFAULT Use the format buffer (form) contents as the default choice in the codec selector. BASS_ACM_RATE Only include formats with the same sample rate as the source. BASS_ACM_CHANS Only include formats with the same number of channels (mono/stereo) as the source. BASS_ACM_SUGGEST This flag will be added automatically. - format
- Type: Un4seen.BassWAVEFormatTag
The wanted codec format (use one of the WAVEFormatTag flags, or see the MMREG.H file for more).
Return Value
Type: ACMFORMATIf successful, an instance of the generic codec format ACMFORMAT is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Remarks
If writing the encoder output to a WAVE file, the codec format's WAVEFORMATEX contents would be the format chunk ("fmt") of the file.
ERROR CODE | Description |
---|---|
BASS_ERROR_HANDLE | handle is not valid. |
BASS_ERROR_NOTAVAIL | There are no codecs available that will accept the channel's format. |
BASS_ERROR_ACM_CANCEL | The user pressed the "cancel" button. |
BASS_ERROR_UNKNOWN | Some other mystery problem! |
Examples
ACMFORMAT codec = BassEnc.BASS_Encode_GetACMFormatSuggest(channel, BASSACMFormat.BASS_ACM_CHANS | BASSACMFormat.BASS_ACM_RATE, WAVEFormatTag.MPEGLAYER3); if ( codec != null ) { // begin encoding using the codec BassEnc.BASS_Encode_StartACMFile( channel, codec, BASSEncode.BASS_ENCODE_DEFAULT, "acm.mp3"); }
See Also