Functions | |
| HPI_ERR | HPI_InStreamOpen (HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex, HW16 wInStreamIndex, HPI_HISTREAM *phInStream) |
| Open and initializes an input stream. | |
| HPI_ERR | HPI_InStreamClose (HPI_HSUBSYS *phSubSys, HPI_HISTREAM hInStream) |
| Closes an input stream. | |
| HPI_ERR | HPI_InStreamQueryFormat (HPI_HSUBSYS *phSubSys, HPI_HISTREAM hInStream, HPI_FORMAT *pFormat) |
| Queries an input stream to see whether it supports a certain audio format, described in pFormat. | |
| HPI_ERR | HPI_InStreamSetFormat (HPI_HSUBSYS *phSubSys, HPI_HISTREAM hInStream, HPI_FORMAT *pFormat) |
| Sets the recording format for an input stream. | |
| HPI_ERR | HPI_InStreamReadBuf (HPI_HSUBSYS *phSubSys, HPI_HISTREAM hInStream, HW8 *pbData, HW32 dwBytesToRead) |
| Read data from an InStream into a buffer Reads dwBytesToRead bytes of audio data from the specified InStream into a memory buffer pointed to by pbData. | |
| HPI_ERR | HPI_InStreamRead (HPI_HSUBSYS *phSubSys, HPI_HISTREAM hInStream, HPI_DATA *pData) |
| Reads a block of audio data from the specified InStream. | |
| HPI_ERR | HPI_InStreamStart (HPI_HSUBSYS *phSubSys, HPI_HISTREAM hInStream) |
| Starts an input stream recording audio data. | |
| HPI_ERR | HPI_InStreamStop (HPI_HSUBSYS *phSubSys, HPI_HISTREAM hInStream) |
| Stops an input stream recording audio data. | |
| HPI_ERR | HPI_InStreamReset (HPI_HSUBSYS *phSubSys, HPI_HISTREAM hInStream) |
| Clears the audio data buffer of an input stream. | |
| HPI_ERR | HPI_InStreamGetInfo (HPI_HSUBSYS *phSubSys, HPI_HOSTREAM hInStream, HW16 *pwState, HW32 *pdwBufferSize, HW32 *pdwDataRecorded) |
| HPI_ERR | HPI_InStreamGetInfoEx (HPI_HSUBSYS *phSubSys, HPI_HISTREAM hInStream, HW16 *pwState, HW32 *pdwBufferSize, HW32 *pdwDataRecorded, HW32 *pdwSamplesRecorded, HW32 *pdwAuxiliaryDataRecorded) |
| Returns extended information about the input stream. | |
| HPI_ERR | HPI_InStreamAncillaryReset (HPI_HSUBSYS *phSubSys, HPI_HISTREAM hInStream, HW16 wBytesPerFrame, HW16 wMode, HW16 wAlignment, HW16 wIdleBit) |
| Initializes the MPEG Layer II / III Ancillary data channel. | |
| HPI_ERR | HPI_InStreamAncillaryGetInfo (HPI_HSUBSYS *phSubSys, HPI_HISTREAM hInStream, HW32 *pdwFrameSpace) |
| Returns information about the ancillary data stream. | |
| HPI_ERR | HPI_InStreamAncillaryWrite (HPI_HSUBSYS *phSubSys, HPI_HISTREAM hInStream, HPI_ANC_FRAME *pAncFrameBuffer, HW32 dwAncFrameBufferSizeInBytes, HW32 dwNumberOfAncillaryFramesToWrite) |
| Writes frames to the stream's ancillary data buffer. | |
| HPI_ERR | HPI_InStreamHostBufferAllocate (HPI_HSUBSYS *phSubSys, HPI_HISTREAM hInStream, HW32 dwSizeInBytes) |
| Allocates a buffer on the host PC for bus mastering transfers. | |
| HPI_ERR | HPI_InStreamHostBufferFree (HPI_HSUBSYS *phSubSys, HPI_HISTREAM hInStream) |
| Free any buffers allocated by HPI_InStreamHostBufferAllocate. | |
| HPI_ERR | HPI_InStreamGroupAdd (HPI_HSUBSYS *phSubSys, HPI_HISTREAM hInStream, HPI_HSTREAM hStream) |
| This function adds a stream to a group of streams. | |
| HPI_ERR | HPI_InStreamGroupGetMap (HPI_HSUBSYS *phSubSys, HPI_HISTREAM hInStream, HW32 *pdwOutStreamMap, HW32 *pdwInStreamMap) |
| This function returns information about the streams that form a group. | |
| HPI_ERR | HPI_InStreamGroupReset (HPI_HSUBSYS *phSubSys, HPI_HISTREAM hInStream) |
| Resets stream grouping information for a given InStream. | |
|
||||||||||||||||||||
|
Open and initializes an input stream. An Adapter index and InStream index are passed in and an InStream handle is passed back. The handle is used for all future calls to that InStream. A particular input stream may only be open by one application at a time.
|
|
||||||||||||
|
Closes an input stream. Deallocates allocated host buffer.
|
|
||||||||||||||||
|
Queries an input stream to see whether it supports a certain audio format, described in pFormat.
|
|
||||||||||||||||
|
Sets the recording format for an input stream. The format to set is described by pFormat.
wHE = HPI_FormatCreate( &hpiFormat, 2, // stereo channel HPI_FORMAT_MPEG_L2,// compression format 44100, // sample rate 256000, // bits/sec (only used for MPEG) 0 // currently no attributes ); wHE = HPI_InStreamSetFormat( phSubSys, hInStream, &hpiFormat ); MP3 Variable Bitrate On adapters that support MP3 encoding, a quality factor between 0 and 100 controls variable bitrate encoding. The quality factor replaces the bitrate in the dwBitrate parameter of HPI_FormatCreate(). Setting the "bitrate" to 100 or less automatically activates variable bitrate encoding. wHE = HPI_FormatCreate( &hpiFormat, 2, // stereo channel HPI_FORMAT_MPEG_L2, // compression format 44100, // sample rate 75, // VBR quality setting 0 // currently no attributes ); InStream interaction with Bitstream Where an instream HPI_DESTNODE_ISTREAM is connected to a bitstream input HPI_SOURCENODE_RAW_BITSTREAM, the bitstream input provides an unformatted stream of data bits. How this data is treated is affected by the format chosen when HPI_InStreamSetFormat() is called. There are two valid choices: (1) HPI_FORMAT_RAW_BITSTREAM The raw bits are copied into the stream without synchronization. The value returned by HPI_InStreamGetInfoEx() into *pdwSamplesRecorded is the number of 32 bit words of data recorded. (2) HPI_FORMAT_MPEG_L2 After the InStream has been reset the incoming bitstream is scanned for the MPEG2 Layer 2 sync pattern (0xFFFE or 0xFFFC), and input (recording) of the bitstream data is inhibited until this pattern is found. The first word of recorded or monitored data will be this sync pattern, and following data will be word-aligned to it. This synchronization process only takes place once after stream reset. There is a small chance that the sync pattern appears elsewhere in the data and the mpeg sync in recorded data won't be byte aligned. The value returned by HPI_InStreamGetInfoEx() into *pdwSamplesRecorded is calculated from the number of bits recorded using the values for dwBitRate and dwSampleRate set by HPI_InStreamSetFormat(). samples = bits recorded * dwSampleRate / dwBitRate
|
|
||||||||||||||||||||
|
Read data from an InStream into a buffer Reads dwBytesToRead bytes of audio data from the specified InStream into a memory buffer pointed to by pbData. The amount of data requested may be any size up to the amount of data available in the hardware buffer specified by dwDataAvailable returned by HPI_InStreamGetInfoEx().
|
|
||||||||||||||||
|
Reads a block of audio data from the specified InStream. The memory data buffer to read into is specified by pData. The HPI will copy the data in the InStream hardware buffer to memory buffer pointed to by pData->pbData. The size of the data block that may be read may be any size up to the amount of data available in the hardware buffer (specified by dwDataAvailable returned by HPI_InStreamGetInfoEx()).
|
|
||||||||||||
|
Starts an input stream recording audio data. Audio data is written into the adapters hardware buffer using the currently selected audio format (channels, sample rate, compression format etc.). Data is then read from the buffer using HPI_InStreamRead().
|
|
||||||||||||
|
Stops an input stream recording audio data. The audio data buffers is not cleared, so a subsequent InStreamStart will resume recording at the position in the buffer where the record had been stopped.
|
|
||||||||||||
|
Clears the audio data buffer of an input stream. If the stream was recording at the time, it will be stopped.
|
|
||||||||||||||||||||||||
|
This includes the size of the streams hardware buffer returned in pdwBufferSize. Also includes whether the stream is currently recording (the state) and the amount of audio data currently contained in the buffer.
|
|
||||||||||||||||||||||||||||||||
|
Returns extended information about the input stream.
|
|
||||||||||||||||||||||||||||
|
Initializes the MPEG Layer II / III Ancillary data channel. Initializes the MPEG Layer II / III Ancillary data channel to support the embedding of wBytesPerFrame bytes into the MPEG bitstream.
See the below table for the relationship between wBytesPerFrame and the datarate on the ancillary data channel. For stereo recording, ancillary data is organized as follows:
Ancillary data is embedded at the end of each MPEG frame as follows: Key: e = ancillary energy bits (correct number of bits not shown) d = ancillary data bits a = audio bits f = fill bits x = don't care bits\n HPI_MPEG_ANC_ALIGN_LEFT (fill is at end for "raw" case) wMode = HPI_MPEG_ANC_RAW a,a,a,d,d,d,d,d,d,f,f,f <eof> wMode = HPI_MPEG_ANC_HASENERGY a,a,a,d,d,d,d,..,f,f,f,e,e,e,e <eof> HPI_MPEG_ANC_ALIGN_RIGHT (fill is at front) wMode = HPI_MPEG_ANC_RAW a,a,a,f,f,f,d,d,d,d,d,d<eof> wMode = HPI_MPEG_ANC_HASENERGY a,a,a,f,f,f,d,d,d,d,..,e,e,e,e <eof> HPI_MPEG_ANC_ALIGN_FILL (all available ancillary data spots are used) wMode = HPI_MPEG_ANC_RAW a,a,a,d,d,d,d,d,d,d,d,d<eof> wMode = HPI_MPEG_ANC_HASENERGY a,a,a,d,d,d,d,d,d,d,..,e,e,e,e <eof>
Note1 (Calling order): |
|
||||||||||||||||
|
Returns information about the ancillary data stream.
|
|
||||||||||||||||||||||||
|
Writes frames to the stream's ancillary data buffer. Writes dwNumberOfAncDataFramesToWrite frames from pAncFrameBuffer to the streams ancillary data buffer. The first bit of ancillary information that follows the valid audio data is bit 7 of bData[0]. The first 8 bits of ancillary information following valid audio data are from bData[0]. In the case where there are 6 bytes total of ancillary information (48 bits) the last byte inserted in the frame is bData[5].
|
|
||||||||||||||||
|
Allocates a buffer on the host PC for bus mastering transfers. Assuming no error: Allocates a buffer on the host PC for bus mastering transfers. Once the buffer is allocated, InStream data will be transferred to it in the background. (rather than the application having to wait for the transfer) This function is provided so that the application can match the size of its transfers to the size of the buffer. From now on, HPI_InStreamGetInfoEx() will return the size and data available in host buffer rather than the buffers on the adapter. However, if the host buffer is allowed to fill up, the adapter buffers will then begin to fill up. In other words you still have the benefit of the larger adapter buffers
|
|
||||||||||||
|
Free any buffers allocated by HPI_InStreamHostBufferAllocate.
|
|
||||||||||||||||
|
This function adds a stream to a group of streams. Stream groups are used to synchronise starting and stopping of multiple streams at once. The application of this is to support recording (or playing) multiple streams at once, enabling multi-channel recording and playback. When using the "Group" functions all streams that are to be grouped together should be opened. One of the streams should be selected to be the master stream and the other streams should be added to it's group. Both in streams and out streams can be added to the same group. Once a group has been formed, HPI_InStreamStart() called on the master will cause all streams to start at once.
|
|
||||||||||||||||||||
|
This function returns information about the streams that form a group. Given an out stream handle, it returns a bit mapped representation of which streams belong to the group.
|
|
||||||||||||
|
Resets stream grouping information for a given InStream.
|
1.4.6-NO