Inheritance diagram for NULLFILE:
Public Member Functions | |
virtual std::string | name (void) const |
Object name used to identify the object type. | |
virtual void | open (void) throw (AUDIO_IO::SETUP_ERROR &) |
Opens the audio object (possibly in exclusive mode). | |
virtual void | close (void) |
Closes audio object. | |
virtual long int | read_samples (void *target_buffer, long int samples) |
Low-level routine for reading samples. | |
virtual void | write_samples (void *target_buffer, long int samples) |
Low-level routine for writing samples. | |
virtual bool | finished (void) const |
Whether all data has been processed? If opened in mode 'io_read', this means that end of stream has been reached. | |
virtual bool | supports_seeking (void) const |
Whether device supports non-blocking I/O mode. | |
virtual void | seek_position (void) |
NULLFILE (const std::string &name="null") | |
NULLFILE * | clone (void) const |
Virtual method that clones the current object and returns a pointer to it. | |
NULLFILE * | new_expr (void) const |
Virtual method that creates a new object of current type. |
And is incredibly fast. :)
|
Virtual method that clones the current object and returns a pointer to it. This must be implemented by all subclasses! Implements AUDIO_IO. |
|
Closes audio object. After calling this routine, all resources (for instance files and devices) must be freed so that they can be used by other processes.
Reimplemented from AUDIO_IO. |
|
Whether all data has been processed? If opened in mode 'io_read', this means that end of stream has been reached. If opened in 'io_write' or 'io_readwrite' modes, finished status usually means that an error has occured (no space left, etc). After finished() has returned 'true', further calls to read_buffer() and/or write_buffer() won't process any data. For output for which 'finite_length_stream()' is true, when 'finished()' returns true, that means an error has occured. Otherwise 'finished()' just tells that further attempts to do i/o will fail. Implements AUDIO_IO. |
|
Object name used to identify the object type. In most cases, object name is same for all class instances. Must be implemented in all subclasses. Implements ECA_OBJECT. |
|
Virtual method that creates a new object of current type. This must be implemented by all subclasses! Implements AUDIO_IO. |
|
Opens the audio object (possibly in exclusive mode). This routine is used for initializing external connections (opening files or devices, loading shared libraries, opening IPC connections). As it's impossible to know in advance what might happen, open() may throw an exception. This way it becomes possible to provide more verbose information about the problem that caused open() to fail. At this point the various audio parameters are used for the first time. Unless locked_audio_format() is 'true', object tries to use the audio format parameters set prior to this call. If object doesn't support the given parameter combination, it can either try adjust them to closest matching, or in the worst case, throw an SETUP_ERROR exception (see above).
Reimplemented from AUDIO_IO. |
|
Low-level routine for reading samples. Number of read sample frames is returned. This must be implemented by all subclasses. Implements AUDIO_IO_BUFFERED. |
|
Whether device supports non-blocking I/O mode. By default, seeking is supported. Reimplemented from AUDIO_IO. |
|
Low-level routine for writing samples. This must be implemented by all subclasses. Implements AUDIO_IO_BUFFERED. |