RAPP Platform API
 All Classes Namespaces Files Functions Variables Typedefs
rapp::object::audio Class Reference

class which wraps around raw bytes of an audiofile More...

#include <audio.hpp>

Inheritance diagram for rapp::object::audio:

Public Member Functions

 audio (const std::string filepath)
 Construct from a file on disk. More...
 
 audio (std::ifstream &bytestream)
 Construct using an open file stream. More...
 
 audio (std::vector< rapp::types::byte > bytearray)
 construct using an existing byte-array More...
 
 audio (const audio &)=default
 Copy constructor. More...
 
virtual std::string audio_source () const
 
std::vector< rapp::types::bytebytearray () const
 Get audio as array of bytes. More...
 
virtual std::string extension () const
 
audiooperator= (const audio &)=default
 Assignment operator. More...
 
bool operator== (const audio &rhs) const
 Are audios same ? More...
 
bool save (const std::string filepath)
 Save audio to filepath. More...
 

Private Member Functions

 audio ()=delete
 
void read_bytes (std::ifstream &bytestream)
 

Private Attributes

std::vector< rapp::types::bytebytearray_
 

Detailed Description

class which wraps around raw bytes of an audiofile

Version
2
Date
January-2016
Author
Alex Gkiokas a.gki.nosp@m.okas.nosp@m.@orte.nosp@m.lio..nosp@m.co.uk

Definition at line 13 of file audio.hpp.

Constructor & Destructor Documentation

rapp::object::audio::audio ( const std::string  filepath)

Construct from a file on disk.

Definition at line 17 of file audio.hpp.

rapp::object::audio::audio ( std::ifstream &  bytestream)

Construct using an open file stream.

Parameters
bytestreamwill be consumed by the object

Definition at line 33 of file audio.hpp.

rapp::object::audio::audio ( std::vector< rapp::types::byte bytearray)

construct using an existing byte-array

Parameters
bytearrayshould contain the audio data

Definition at line 40 of file audio.hpp.

rapp::object::audio::audio ( const audio )
default

Copy constructor.

rapp::object::audio::audio ( )
privatedelete

Member Function Documentation

virtual std::string rapp::object::audio::audio_source ( ) const
virtual
std::vector<rapp::types::byte> rapp::object::audio::bytearray ( ) const

Get audio as array of bytes.

Definition at line 48 of file audio.hpp.

virtual std::string rapp::object::audio::extension ( ) const
virtual
audio& rapp::object::audio::operator= ( const audio )
default

Assignment operator.

bool rapp::object::audio::operator== ( const audio rhs) const

Are audios same ?

Definition at line 54 of file audio.hpp.

void rapp::object::audio::read_bytes ( std::ifstream &  bytestream)
private

Definition at line 90 of file audio.hpp.

bool rapp::object::audio::save ( const std::string  filepath)

Save audio to filepath.

Definition at line 64 of file audio.hpp.

Member Data Documentation

std::vector<rapp::types::byte> rapp::object::audio::bytearray_
private

Definition at line 100 of file audio.hpp.


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