#include <audio2.h>
Inheritance diagram for ost::AudioStream:

Public Member Functions | |
| AudioStream () | |
| Create a new audiostream object. | |
| AudioStream (const char *name, Mode mode=modeRead, timeout_t framing=0) | |
| Create an audio stream object and open an existing audio file. | |
| AudioStream (const char *name, Info *info, bool exclusive=false, timeout_t framing=0) | |
| Create an audio stream object and a new audio file. | |
| virtual | ~AudioStream () |
| void | open (const char *name, Mode mode=modeRead, timeout_t framing=0) |
| Open existing audio file for streaming. | |
| void | create (const char *name, Info *info, bool exclusive=false, timeout_t framing=0) |
| Create a new audio file for streaming. | |
| void | close (void) |
| Close the currently open audio file for streaming. | |
| void | flush (void) |
| flush any unsaved buffered data to disk. | |
| bool | isStreamable (void) |
| Check if the audio file may be streamed. | |
| unsigned | getCount (void) |
| Get the number of samples expected in a frame. | |
| unsigned | getEncoded (AudioCodec *codec, Encoded address, unsigned frames=1) |
| Stream audio data from the file and convert into an alternate encoding based on the codec supplied. | |
| unsigned | putEncoded (AudioCodec *codec, Encoded address, unsigned frames=1) |
| Stream audio data in an alternate codec into the currently opened file. | |
| unsigned | getEncoded (Encoded address, unsigned frames=1) |
| Get data from the streamed file in it's native encoding. | |
| unsigned | putEncoded (Encoded address, unsigned frames=1) |
| Put data encoded in the native format of the stream file. | |
| unsigned | getMono (Linear buffer, unsigned frames=1) |
| Get and automatically convert audio file data into mono linear audio samples. | |
| unsigned | getStereo (Linear buffer, unsigned frames=1) |
| Get and automatically convert audio file data into stereo (two channel) linear audio samples. | |
| unsigned | putMono (Linear buffer, unsigned frames=1) |
| Automatically convert and put mono linear audio data into the audio file. | |
| unsigned | putStereo (Linear buffer, unsigned frames=1) |
| Automatically convert and put stereo linear audio data into the audio file. | |
| unsigned | bufMono (Linear buffer, unsigned count) |
| Automatically convert and put arbitrary linear mono data into the audio file. | |
| unsigned | bufStereo (Linear buffer, unsigned count) |
| Automatically convert and put arbitrary linear stereo data into the audio file. | |
| AudioCodec * | getCodec (void) |
| Return the codec being used if there is one. | |
Protected Member Functions | |
| unsigned | bufAudio (Linear samples, unsigned count, unsigned size) |
Protected Attributes | |
| AudioCodec * | codec |
| Encoded | framebuf |
| bool | streamable |
| Linear | bufferFrame |
| unsigned | bufferPosition |
| unsigned | bufferChannels |
| Linear | encBuffer |
| Linear | decBuffer |
| unsigned | encSize |
| unsigned | decSize |
If a codec must be assigned to perform conversion to/from linear data, AudioStream will handle conversion automatically. AudioStream will also convert between mono and stereo audio content. AudioStream uses linear samples in the native machine endian format and perform endian byte swapping as needed.
|
|
Create a new audiostream object.
|
|
||||||||||||||||
|
Create an audio stream object and open an existing audio file.
|
|
||||||||||||||||||||
|
Create an audio stream object and a new audio file.
|
|
|
|
|
||||||||||||||||
|
|
|
||||||||||||
|
Automatically convert and put arbitrary linear mono data into the audio file. Convert to stereo and buffer incomplete frames as needed by the streaming file.
|
|
||||||||||||
|
Automatically convert and put arbitrary linear stereo data into the audio file. Convert to mono and buffer incomplete frames as needed by the streaming file.
|
|
|
Close the currently open audio file for streaming.
Reimplemented from ost::AudioFile. |
|
||||||||||||||||||||
|
Create a new audio file for streaming.
Reimplemented from ost::AudioFile. |
|
|
flush any unsaved buffered data to disk.
|
|
|
Return the codec being used if there is one.
Reimplemented from ost::AudioFile. Reimplemented in ost::BayonneAudio. |
|
|
Get the number of samples expected in a frame.
|
|
||||||||||||
|
Get data from the streamed file in it's native encoding.
|
|
||||||||||||||||
|
Stream audio data from the file and convert into an alternate encoding based on the codec supplied.
|
|
||||||||||||
|
Get and automatically convert audio file data into mono linear audio samples.
|
|
||||||||||||
|
Get and automatically convert audio file data into stereo (two channel) linear audio samples.
|
|
|
Check if the audio file may be streamed. Files can be streamed if a codec is available or if they are linear.
|
|
||||||||||||||||
|
Open existing audio file for streaming.
Reimplemented from ost::AudioFile. |
|
||||||||||||
|
Put data encoded in the native format of the stream file.
|
|
||||||||||||||||
|
Stream audio data in an alternate codec into the currently opened file.
|
|
||||||||||||
|
Automatically convert and put mono linear audio data into the audio file. Convert to stereo as needed by file format.
|
|
||||||||||||
|
Automatically convert and put stereo linear audio data into the audio file. Convert to mono as needed by file format.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.4.6