Presents the user with a list of available ACM (Audio Compression Manager) codec output formats to choose from.
This overload returns the generic codec format ACMFORMAT in the codec and handles all the rest already for you.
Namespace: Un4seen.Bass.AddOn.Enc
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
public static bool BASS_Encode_GetACMFormat( int handle, ref ACMFORMAT codec, string title, BASSACMFormat flags )
Parameters
- handle
- Type: SystemInt32
The channel handle... a HSTREAM, HMUSIC, or HRECORD. - codec
- Type: Un4seen.Bass.AddOn.EncACMFORMAT
The ACMFORMAT to preselect. Will return the newly selected codec. - title
- Type: SystemString
Window title for the selector... = "Choose the output format". - flags
- Type: Un4seen.Bass.AddOn.EncBASSACMFormat
A combination of these flags BASSACMFormat:The HighWord - use MakeLong(Int16, Int16)(flags,format) - can be used to restrict the choice to a particular format tag (eg. WAVE_FORMAT_ADPCM). This is required with BASS_ACM_SUGGEST, and is optional otherwise. See WAVEFormatTag for a list of typical formats being used.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 Suggest a format without letting the user choose. The wanted format tag (eg. WAVE_FORMAT_ADPCM) should be specified in the HIWORD.
Return Value
Type: BooleanIf successful, is returned and codec will contain the selected ACM format codec - 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.
To not let the user choose a codec, but automatically suggest a codec you might also use the BASS_Encode_GetACMFormatSuggest(Int32, BASSACMFormat, WAVEFormatTag) method.
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! |
See Also