Audio formats definition. More...
Go to the source code of this file.
Macros | |
#define | FBSDK_DLL K_DLLIMPORT |
Be sure that FBSDK_DLL is defined only once... More... | |
Typedefs | |
typedef int | FBAudioFmt |
Enumerations | |
enum | FBAudioChannelMode { kFBAudioChannelModeMono , kFBAudioChannelModeStereo , kFBAudioChannelMode_4 , kFBAudioChannelMode_8 } |
Enum FBAudioChannelMode. More... | |
enum | FBAudioBitDepthMode { kFBAudioBitDepthMode_8 , kFBAudioBitDepthMode_16 , kFBAudioBitDepthMode_24 , kFBAudioBitDepthMode_FP } |
Enum FBAudioBitDepthMode. More... | |
enum | FBAudioRateMode { kFBAudioRateMode_8000 , kFBRAudioateMode_11025 , kFBAudioRateMode_12000 , kFBAudioRateMode_12500 , kFBAudioRateMode_16000 , kFBAudioRateMode_22050 , kFBAudioRateMode_24000 , kFBAudioRateMode_25000 , kFBAudioRateMode_32000 , kFBAudioRateMode_44100 , kFBAudioRateMode_48000 , kFBAudioRateMode_50000 , kFBAudioRateMode_64000 , kFBAudioRateMode_88200 , kFBAudioRateMode_96000 , kFBAudioRateMode_100000 } |
Enum FBAudioRateMode. More... | |
Functions | |
K_DLLIMPORT FBAudioFmt | FBAudioFmt_GetDefaultFormat () |
Get default audio format. More... | |
K_DLLIMPORT FBAudioFmt | FBAudioFmt_AppendFormat (FBAudioFmt pFormat, int pChannels, int pBits, int pRate) |
Append the rendering audio format using the specified settings. More... | |
K_DLLIMPORT FBAudioFmt | FBAudioFmt_AppendFormat (FBAudioFmt pFormat, const FBAudioFmt pSrcFormat) |
Append the rendering audio format with another audio format. More... | |
K_DLLIMPORT FBAudioFmt | FBAudioFmt_RemoveFormat (FBAudioFmt pFormat, int pChannels, int pBits, int pRate) |
Remove channels, bit depth, or rate from the specified audio format object. More... | |
K_DLLIMPORT FBAudioFmt | FBAudioFmt_RemoveFormat (FBAudioFmt pFormat, const FBAudioFmt pSrcFormat) |
Remove audio format from another audio format object. More... | |
K_DLLIMPORT int | FBAudioFmt_GetChannelValue (FBAudioFmt pFormat) |
Get the channel value of the Audio format object. More... | |
K_DLLIMPORT int | FBAudioFmt_GetBitsValue (FBAudioFmt pFormat) |
Get the bit depth value of the Audio format object. More... | |
K_DLLIMPORT int | FBAudioFmt_GetBytesValue (FBAudioFmt pFormat) |
Get the bytes value of the Audio format object. More... | |
K_DLLIMPORT int | FBAudioFmt_GetRateValue (FBAudioFmt pFormat) |
Get the rate value of the Audio format object. More... | |
K_DLLIMPORT bool | FBAudioFmt_TestFormat (const FBAudioFmt pSrcFormat, int pChannels, int pBits, int pRate) |
Test if the given audio format object contains the channel, bit depth, and rate. More... | |
K_DLLIMPORT FBAudioFmt | FBAudioFmt_ConvertChannelMode (FBAudioChannelMode pChannelMode) |
Converts an FBAudioChannelMode enum value to its FBAudioFmt object equivalent. More... | |
K_DLLIMPORT FBAudioFmt | FBAudioFmt_ConvertBitDepthMode (FBAudioBitDepthMode pBitDepthMode) |
Converts an FBAudioBitDepthMode enum value to its FBAudioFmt object equivalent. More... | |
K_DLLIMPORT FBAudioFmt | FBAudioFmt_ConvertRateMode (FBAudioRateMode pRateMode) |
Converts an FBAudioRateMode enum value to its FBAudioFmt object equivalent. More... | |
Audio formats definition.
Definition in file fbaudiofmt.h.
#define FBSDK_DLL K_DLLIMPORT |
Be sure that FBSDK_DLL is defined only once...
Definition at line 48 of file fbaudiofmt.h.
A type definition for FBAudioFmt.
Definition at line 56 of file fbaudiofmt.h.
enum FBAudioBitDepthMode |
Enum FBAudioBitDepthMode.
Definition at line 70 of file fbaudiofmt.h.
enum FBAudioChannelMode |
Enum FBAudioChannelMode.
Definition at line 63 of file fbaudiofmt.h.
enum FBAudioRateMode |
Enum FBAudioRateMode.
Definition at line 77 of file fbaudiofmt.h.
K_DLLIMPORT FBAudioFmt FBAudioFmt_AppendFormat | ( | FBAudioFmt | pFormat, |
const FBAudioFmt | pSrcFormat | ||
) |
Append the rendering audio format with another audio format.
pFormat | Audio format to use. |
pSrcFormat | Audio format to be appended. |
K_DLLIMPORT FBAudioFmt FBAudioFmt_AppendFormat | ( | FBAudioFmt | pFormat, |
int | pChannels, | ||
int | pBits, | ||
int | pRate | ||
) |
Append the rendering audio format using the specified settings.
For example, to set audio format to 2 channels, 16 bit, 44100 rate, use the following function: AudioFormat = FBAudioFmt_AppendFormat(0, 2, 16, 44100)
pFormat | Audio format to use. Set this to 0 if there is no audio format to be appended. |
pChannels | Number of channels. Valid values are 0, 1, 2, 4, 8. |
pBits | Bit depth. Valid values are 0, 8, 16, 24, 32. |
pRate | Audio rate. Valid values are 0, 8000, 11025, 12000, 12500, 16000, 22050, 24000, 25000, 32000, 44100, 48000, 50000, 64000, 88200, 96000, 100000. |
Python sample code:
K_DLLIMPORT FBAudioFmt FBAudioFmt_ConvertBitDepthMode | ( | FBAudioBitDepthMode | pBitDepthMode | ) |
Converts an FBAudioBitDepthMode enum value to its FBAudioFmt object equivalent.
pBitDepthMode | The bit depth mode enum value. |
K_DLLIMPORT FBAudioFmt FBAudioFmt_ConvertChannelMode | ( | FBAudioChannelMode | pChannelMode | ) |
Converts an FBAudioChannelMode enum value to its FBAudioFmt object equivalent.
pChannelMode | The channel mode enum value. |
K_DLLIMPORT FBAudioFmt FBAudioFmt_ConvertRateMode | ( | FBAudioRateMode | pRateMode | ) |
Converts an FBAudioRateMode enum value to its FBAudioFmt object equivalent.
pRateMode | The rate mode enum value. |
K_DLLIMPORT int FBAudioFmt_GetBitsValue | ( | FBAudioFmt | pFormat | ) |
Get the bit depth value of the Audio format object.
pFormat | Audio format to use. |
K_DLLIMPORT int FBAudioFmt_GetBytesValue | ( | FBAudioFmt | pFormat | ) |
Get the bytes value of the Audio format object.
pFormat | Audio format to use. |
K_DLLIMPORT int FBAudioFmt_GetChannelValue | ( | FBAudioFmt | pFormat | ) |
Get the channel value of the Audio format object.
pFormat | Audio format to use. |
K_DLLIMPORT FBAudioFmt FBAudioFmt_GetDefaultFormat | ( | ) |
Get default audio format.
K_DLLIMPORT int FBAudioFmt_GetRateValue | ( | FBAudioFmt | pFormat | ) |
Get the rate value of the Audio format object.
pFormat | Audio format to use. |
K_DLLIMPORT FBAudioFmt FBAudioFmt_RemoveFormat | ( | FBAudioFmt | pFormat, |
const FBAudioFmt | pSrcFormat | ||
) |
Remove audio format from another audio format object.
pFormat | Audio format to use. |
pSrcFormat | Audio format to remove. |
K_DLLIMPORT FBAudioFmt FBAudioFmt_RemoveFormat | ( | FBAudioFmt | pFormat, |
int | pChannels, | ||
int | pBits, | ||
int | pRate | ||
) |
Remove channels, bit depth, or rate from the specified audio format object.
Please refer to python example in FBAudioFmt_AppendFormat.
pFormat | Audio format to use. |
pChannels | Number of channels to remove. Set this to 0 if you don't want to remove the channel. |
pBits | Bit depth to remove. Set this to 0 if you don't want to remove bit depth. |
pRate | Audio rate to remove. Set this to 0 if you don't want to remove audio rate. |
K_DLLIMPORT bool FBAudioFmt_TestFormat | ( | const FBAudioFmt | pSrcFormat, |
int | pChannels, | ||
int | pBits, | ||
int | pRate | ||
) |
Test if the given audio format object contains the channel, bit depth, and rate.
pFormat | Audio format to test. |
pChannels | Number of channels to test. |
pBits | Bit depth to test. |
pRate | Audio rate to test. |