|
ASX Version4.20.14
|
These functions support file recording. More...
Functions | |
| ASX32_API ASX_ERROR | ASX_Recorder_Open (ASX_HANDLE hRecorder, const char *pszFile, const enum asxFILE_FORMAT nFileType, const enum asxFILE_MODE nFileMode, const int nChannels, const enum asxAUDIO_FORMAT nFormat, const long lSampleRate, const long lBitrate, const enum asxRECORD_MODE nMode) |
| Opens the recorder using the specified format. | |
| ASX32_API ASX_ERROR | ASX_Recorder_Start (ASX_HANDLE hRecorder) |
| Starts the recording. | |
| ASX32_API ASX_ERROR | ASX_Recorder_Stop (ASX_HANDLE hRecorder) |
| Stops the recording. | |
| ASX32_API ASX_ERROR | ASX_Recorder_Pause (ASX_HANDLE hRecorder) |
| Pauses the recording. | |
| ASX32_API ASX_ERROR | ASX_Recorder_Close (ASX_HANDLE hRecorder) |
| Closes the recording file. | |
| ASX32_API ASX_ERROR | ASX_Recorder_GetPosition (ASX_HANDLE hRecorder, const enum asxTIMESCALE nType, unsigned long *plPosition) |
| Gets the current record position. | |
| ASX32_API ASX_ERROR | ASX_Recorder_GetState (ASX_HANDLE hRecorder, enum asxRECORDER_STATE *peState) |
| Get the current record state. | |
| ASX32_API ASX_ERROR | ASX_Recorder_GetFilename (ASX_HANDLE hRecorder, char *pszFilename, const int nStringLength, int *pnRequiredLength) |
| Get the current filename, if any. | |
| ASX32_API ASX_ERROR | ASX_Recorder_EnumerateFormat (ASX_HANDLE hRecorder, const int nIndex, enum asxAUDIO_FORMAT *peFormat, int *pnCount) |
| Enumerates supported recorder formats. | |
These functions support file recording.
Formats supported for recording in this version:
|
asxFILE_FORMAT |
_WAV |
_RAW |
|
Filename Extension |
.WAV |
any |
|
_PCM8 or _PCM16 |
supported |
write only |
|
_PCM24 or _PCM32 |
supported |
write only |
|
_PCM32_FLOAT |
supported |
write only |
|
_MPEG_L2 |
supported |
supported |
|
_MPEG_L3 |
supported |
supported |
|
_MPEG_AACPLUS |
not supported yet |
not supported yet |
|
_DOLBY_AC2 |
not supported yet |
not supported yet |
Note: A file recorded using _MPEG_L2 or _MPEG_L3 data format and the _RAW file format will comply with the standard for .MP3 files since the additional header information (i.e. ID3 header) is optional.
Recorder State Diagram

| ASX32_API ASX_ERROR ASX_Recorder_Close | ( | ASX_HANDLE | hRecorder | ) |
Closes the recording file.
| hRecorder | A handle to an ASX recorder object. |
| ASX32_API ASX_ERROR ASX_Recorder_EnumerateFormat | ( | ASX_HANDLE | hRecorder, |
| const int | nIndex, | ||
| enum asxAUDIO_FORMAT * | peFormat, | ||
| int * | pnCount | ||
| ) |
Enumerates supported recorder formats.
| hRecorder | A handle to an ASX recorder object. |
| nIndex | The format number. |
| peFormat | Returned enumerated format (See asxFORMAT). |
| pnCount | Returned total numebr of formats. |
| ASX32_API ASX_ERROR ASX_Recorder_GetFilename | ( | ASX_HANDLE | hRecorder, |
| char * | pszFilename, | ||
| const int | nStringLength, | ||
| int * | pnRequiredLength | ||
| ) |
Get the current filename, if any.
| hRecorder | A handle to an ASX recorder object. |
| pszFilename | The returned pointer to the filename. |
| nStringLength | The length in bytes of pszFilename. |
| pnRequiredLength | The required length in bytes of pszRevision. |
| ASX32_API ASX_ERROR ASX_Recorder_GetPosition | ( | ASX_HANDLE | hRecorder, |
| const enum asxTIMESCALE | nType, | ||
| unsigned long * | plPosition | ||
| ) |
Gets the current record position.
| hRecorder | A handle to an ASX recorder object. |
| nType | The units to return the position in (see asxTIMESCALE). |
| plPosition | The current record position. |
| ASX32_API ASX_ERROR ASX_Recorder_GetState | ( | ASX_HANDLE | hRecorder, |
| enum asxRECORDER_STATE * | peState | ||
| ) |
Get the current record state.
| hRecorder | A handle to an ASX recorder object. |
| peState | The current recorder state. See asxRECORDER_STATE. |
| ASX32_API ASX_ERROR ASX_Recorder_Open | ( | ASX_HANDLE | hRecorder, |
| const char * | pszFile, | ||
| const enum asxFILE_FORMAT | nFileType, | ||
| const enum asxFILE_MODE | nFileMode, | ||
| const int | nChannels, | ||
| const enum asxAUDIO_FORMAT | nFormat, | ||
| const long | lSampleRate, | ||
| const long | lBitrate, | ||
| const enum asxRECORD_MODE | nMode | ||
| ) |
Opens the recorder using the specified format.
| hRecorder | A handle to an ASX recorder object. |
| pszFile | The name of the file to be opened. |
| nFileType | File format. This specifies the header information (if any) to be placed on the audio file. See asxFILE_FORMAT for the complete range of formats. |
| nFileMode | Sets the mode for opening an existing file for recording. See asxFILE_MODE |
| nChannels | The number of channels. Currently either 1 or 2 channels are supported. |
| nFormat | Audio format is used to specified the format of the recorded samples. See asxAUDIO_FORMAT for a complete list of formats. Note that not all formats are supported on all adapters, so it is important to check for errors after making this call. |
| lSampleRate | The sample rate should be set to 8000-192000 Hz. Note that some adapters do not support all sample rates, so it is important to check for errors after making this call. |
| lBitrate | Bitrate = 8000 to 384000 bps (MPEG only) |
| nMode | Recording mode applies to MPEG only. See asxRECORD_MODE. |
| ASX32_API ASX_ERROR ASX_Recorder_Pause | ( | ASX_HANDLE | hRecorder | ) |
Pauses the recording.
Use ASX_Recorder_Start to continue recording.
| hRecorder | A handle to an ASX recorder object. |
| ASX32_API ASX_ERROR ASX_Recorder_Start | ( | ASX_HANDLE | hRecorder | ) |
Starts the recording.
| hRecorder | A handle to an ASX recorder object. |
| ASX32_API ASX_ERROR ASX_Recorder_Stop | ( | ASX_HANDLE | hRecorder | ) |
Stops the recording.
| hRecorder | A handle to an ASX recorder object. |
1.7.3