Unknown
From BASS WMA
BASS_WMA_EncodeOpenFile
Initializes WMA encoding to a file.
HWMENCODE BASS_WMA_EncodeOpenFile(
DWORD freq,
DWORD chans,
DWORD flags,
DWORD bitrate,
char *file
);
Parameters
| freq | The sample rate, or a BASS channel handle if the BASS_WMA_ENCODE_SOURCE flag is specified. | ||||||||||||||||||||
| chans | The number of channels. More than stereo requires WMA Pro or PCM. | ||||||||||||||||||||
| flags | A combination of these flags.
| ||||||||||||||||||||
| bitrate | The encoding bitrate, or VBR quality (100 or less). | ||||||||||||||||||||
| file | The filename to write. |
Return value
If successful, the new encoder's handle is returned, else FALSE is returned. Use BASS_ErrorGetCode to get the error code.Error codes
| BASS_ERROR_WMA | The Windows Media modules (v9 or above) are not installed. |
| BASS_ERROR_NOTAVAIL | No codec could be found to support the requested sample format and bitrate. |
| BASS_ERROR_CREATE | Could not create the file to write the WMA stream. |
| BASS_ERROR_UNKNOWN | Some other mystery problem! |
Remarks
The WMA codec expects 16-bit or 24-bit sample data depending on the BASS_WMA_ENCODE_24BIT flag, but BASSWMA will accept 8-bit, 16-bit or floating-point data, and convert it to the appropriate format. Use BASS_WMA_EncodeGetRates to retrieve a list of the encoding bitrates available for a specific sample format.Use BASS_WMA_EncodeSetTag to set tags, BASS_WMA_EncodeWrite to encode sample data, and BASS_WMA_EncodeClose to finish encoding and close the file.
Example
Initialize encoding 44100hz 16-bit stereo sample data at 128kb/s to a file called "blah.wma".HWMENCODE encoder=BASS_WMA_EncodeOpenFile(44100, 2, 0, 128000, "blah.wma");