Unknown
From BASSenc
BASS_Encode_StartCAFile
Sets up an encoder on a channel, using a CoreAudio codec and sending the output to a file.
HENCODE BASS_Encode_StartCAFile(
DWORD handle,
DWORD ftype,
DWORD atype,
DWORD flags,
DWORD bitrate,
char *file
);
Parameters
| handle | The channel handle... a HSTREAM, HMUSIC, or HRECORD. | ||||||||||||
| ftype | File format identifier. | ||||||||||||
| atype | Audio data format identifier. | ||||||||||||
| flags | A combination of these flags.
| ||||||||||||
| bitrate | The bitrate in bits per second... 0 = the codec's default bitrate. | ||||||||||||
| file | The filename to write. |
Return value
The encoder handle is returned if the encoder is successfully started, else 0 is returned. Use BASS_ErrorGetCode to get the error code.Error codes
| BASS_ERROR_HANDLE | handle is not valid. |
| BASS_ERROR_FILEFORM | ftype is not valid. |
| BASS_ERROR_CODEC | atype is not valid or supported with ftype. |
| BASS_ERROR_NOTAVAIL | bitrate is not supported by the codec. |
| BASS_ERROR_FORMAT | The channel's sample format is not supported by the codec. |
| BASS_ERROR_CREATE | The file could not be created. |
| BASS_ERROR_UNKNOWN | Some other mystery problem! |
Remarks
This function is identical to BASS_Encode_StartCA, except that it writes the encoded data to a file instead of a callback function.Platform-specific
This function is only available on OSX and iOS.Example
Start encoding a channel to an ALAC file (output.m4a).BASS_Encode_StartCAFile(channel, 'm4af', 'alac', 0, 0, "output.m4a"); BASS_ChannelPlay(channel, 0); // start the channel playing & encoding
Start encoding a channel to a 128 kb/s AAC MP4 file (output.mp4).
BASS_Encode_StartCAFile(channel, 'mp4f', 'aac ', 0, 128000, "output.mp4"); BASS_ChannelPlay(channel, 0); // start the channel playing & encoding
See also
BASS_Encode_GetACMFormat, BASS_Encode_IsActive, BASS_Encode_SetPaused, BASS_Encode_Start, BASS_Encode_StartCA, BASS_Encode_Stop, BASS_Encode_Write, BASS_CONFIG_ENCODE_PRIORITY