Logo Search packages:      
Sourcecode: ecasound2.2 version File versions

WAVEFILE Class Reference

#include <audioio-wave.h>

Inheritance diagram for WAVEFILE:

AUDIO_IO_BUFFERED AUDIO_IO DYNAMIC_OBJECT< string > ECA_AUDIO_FORMAT ECA_AUDIO_POSITION DYNAMIC_PARAMETERS< string > ECA_OBJECT ECA_SAMPLERATE_AWARE ECA_SAMPLERATE_AWARE

List of all members.


Detailed Description

Represents a RIFF WAVE -file (wav).

This class currently supports only a limited set of features:

Format 1 sample data: Pulse Code Modulation (PCM) Format

Format 3 sample data: IEEE754 floats, range [-1, +1)

Definition at line 29 of file audioio-wave.h.


Reimplemented functions from ECA_AUDIO_FORMAT



virtual void set_channels (SAMPLE_SPECS::channel_t v)
virtual void set_sample_format (Sample_format v) throw (ECA_ERROR&)
unsigned char * get_iobuf (void) const
size_t get_iobuf_size (void) const
void reserve_buffer_space (long int bytes)

Public Types

typedef string parameter_t
Public type definitions and constants


enum  Io_mode { io_read = 1, io_write = 2, io_readwrite = 4 }
Public type definitions and constants


enum  Sample_coding { sc_signed, sc_unsigned, sc_float }
enum  Sample_endianess { se_native, se_big, se_little }
enum  Sample_format {
  sfmt_none, sfmt_u8, sfmt_s8, sfmt_s16,
  sfmt_s16_le, sfmt_s16_be, sfmt_s24, sfmt_s24_le,
  sfmt_s24_be, sfmt_s32, sfmt_s32_le, sfmt_s32_be,
  sfmt_f32, sfmt_f32_le, sfmt_f32_be, sfmt_f64,
  sfmt_f64_le, sfmt_f64_be
}

Public Member Functions

virtual long int buffersize (void) const
virtual WAVEFILEclone (void) const
virtual void close (void)
virtual std::string description (void) const
virtual bool finished (void) const
virtual std::string get_parameter (int param) const
std::string get_parameter_name (int id) const
virtual bool locked_audio_format (void) const
virtual std::string name (void) const
virtual WAVEFILEnew_expr (void) const
int number_of_params (void) const
virtual void open (void) throw (AUDIO_IO::SETUP_ERROR &)
virtual std::string parameter_names (void) const
virtual void read_buffer (SAMPLE_BUFFER *sbuf)
virtual long int read_samples (void *target_buffer, long int samples)
virtual void seek_position (void)
virtual void set_buffersize (long int samples)
virtual void set_parameter (int param, std::string value)
 WAVEFILE (const std::string &name="")
virtual void write_buffer (SAMPLE_BUFFER *sbuf)
virtual void write_samples (void *target_buffer, long int samples)
Public functions for getting audio format information


ECA_AUDIO_FORMAT audio_format (void) const
int bits (void) const
long int bytes_per_second (void) const
SAMPLE_SPECS::channel_t channels (void) const
std::string format_string (void) const
int frame_size (void) const
bool interleaved_channels (void) const
Sample_coding sample_coding (void) const
Sample_endianess sample_endianess (void) const
Sample_format sample_format (void) const
int sample_size (void) const
Public functions for handling object managers


virtual AUDIO_IO_MANAGERcreate_object_manager (void) const
Attribute functions


virtual bool finite_length_stream (void) const
virtual int supported_io_modes (void) const
virtual bool supports_nonblocking_mode (void) const
virtual bool supports_seeking (void) const
Configuration
For setting and getting configuration parameters.

string format_info (void) const
int io_mode (void) const
const string & label (void) const
void set_io_mode (int mode)
void set_label (const string &id_label)
virtual void set_parameter (int param, string value)
void toggle_nonblocking_mode (bool value)
Runtime information


bool is_open (void) const
ECA_AUDIO_TIME length (void) const
virtual bool nonblocking_mode (void) const
virtual int poll_descriptor (void) const
ECA_AUDIO_TIME position (void) const
virtual bool readable (void) const
virtual long int samples_available (void) const
virtual string status (void) const
virtual bool writable (void) const
Public functions for getting length information


SAMPLE_SPECS::sample_pos_t length_in_samples (void) const
int length_in_seconds (void) const
double length_in_seconds_exact (void) const
bool length_set (void) const
Public utility functions


bool out_position (void) const
Public functions for getting position information


SAMPLE_SPECS::sample_pos_t position_in_samples (void) const
int position_in_seconds (void) const
double position_in_seconds_exact (void) const
Functions overridden and reimplemented from
SAMPLE_SPECS::sample_rate_t samples_per_second (void) const
virtual void set_audio_format (const ECA_AUDIO_FORMAT &f_str)
virtual void set_samples_per_second (SAMPLE_SPECS::sample_rate_t v)
Public functions for setting position (with action)


void seek_first (void)
void seek_last (void)
void seek_position_in_samples (SAMPLE_SPECS::sample_pos_t pos_in_samples)
void seek_position_in_samples_advance (SAMPLE_SPECS::sample_pos_t pos_in_samples)
void seek_position_in_seconds (double pos_in_seconds)
Public functions for setting audio format information


void set_sample_coding (Sample_coding v)
void set_sample_endianess (Sample_endianess v)
void set_sample_format_string (const std::string &f_str) throw (ECA_ERROR&)
Public virtual functions for setting audio format information


virtual void toggle_interleaved_channels (bool v)

Protected Member Functions

Protected functions for setting position (without action)


void change_position_in_samples (SAMPLE_SPECS::sample_pos_t pos)
void change_position_in_seconds (double pos_in_seconds)
void set_position_in_samples (SAMPLE_SPECS::sample_pos_t pos)
void set_position_in_seconds (double pos_in_seconds)
void set_position_in_seconds (int pos_in_seconds)
Protected functions for setting length


void extend_position (void)
void set_length_in_samples (SAMPLE_SPECS::sample_pos_t pos)
void set_length_in_seconds (double pos_in_seconds)
void set_length_in_seconds (int pos_in_seconds)
Functions provided for subclasses.


void length (const ECA_AUDIO_TIME &v)
void position (const ECA_AUDIO_TIME &v)

Private Types

enum  Format_tags {
  unknown = (0x0000), pcm = (0x0001), adpcm = (0x0002), ieee_float = (0x0003),
  alaw = (0x0006), mulaw = (0x0007), oki_adpcm = (0x0010), ima_adpcm = (0x0011),
  digistd = (0x0015), digifix = (0x0016), dolby_ac2 = (0x0030), gsm610 = (0x0031),
  rockwell_adpcm = (0x003b), rockwell_digitalk = (0x003c), g721_adpcm = (0x0040), g728_celp = (0x0041),
  mpeg = (0x0050), mpeglayer3 = (0x0055), g726_adpcm = (0x0064), g722_adpcm = (0x0065)
}

Private Member Functions

bool find_block (const char *fblock)
void find_riff_datablock (void) throw (AUDIO_IO::SETUP_ERROR&)
void format_query (void) throw (AUDIO_IO::SETUP_ERROR&)
bool next_riff_block (RB *t, off_t *offtmp)
WAVEFILEoperator= (const WAVEFILE &x)
void read_riff_fmt (void) throw (AUDIO_IO::SETUP_ERROR&)
void read_riff_header (void) throw (AUDIO_IO::SETUP_ERROR&)
void set_length_in_bytes (void)
void update (void)
void update_riff_datablock (void)
 WAVEFILE (const WAVEFILE &x)
void write_riff_datablock (void)
void write_riff_fmt (void)
void write_riff_header (void) throw (AUDIO_IO::SETUP_ERROR&)

Private Attributes

long int data_start_position_rep
ECA_FILE_IOfio_repp
std::string mmaptoggle_rep
RF riff_format_rep
RH riff_header_rep

Classes

struct  RB
struct  RF
struct  RH

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index