openMSX
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
openmsx::WavWriter Class Reference

Base class for writing WAV files. More...

#include <WavWriter.hh>

Inheritance diagram for openmsx::WavWriter:
Inheritance graph
[legend]
Collaboration diagram for openmsx::WavWriter:
Collaboration graph
[legend]

Public Member Functions

bool isEmpty () const
 Returns false if there has been data written to the wav image. More...
 
void flush ()
 Flush data to file and update header. More...
 

Protected Member Functions

 WavWriter (const Filename &filename, unsigned channels, unsigned bits, unsigned frequency)
 
 ~WavWriter ()
 

Protected Attributes

File file
 
unsigned bytes
 

Detailed Description

Base class for writing WAV files.

Definition at line 14 of file WavWriter.hh.

Constructor & Destructor Documentation

◆ WavWriter()

openmsx::WavWriter::WavWriter ( const Filename filename,
unsigned  channels,
unsigned  bits,
unsigned  frequency 
)
protected

Definition at line 11 of file WavWriter.cc.

References file, openmsx::DiskImageUtils::format(), and openmsx::File::write().

◆ ~WavWriter()

openmsx::WavWriter::~WavWriter ( )
protected

Definition at line 50 of file WavWriter.cc.

References bytes, file, flush(), and openmsx::File::write().

Member Function Documentation

◆ flush()

void openmsx::WavWriter::flush ( )

Flush data to file and update header.

Try to make (possibly) incomplete file already usable for external programs.

Definition at line 65 of file WavWriter.cc.

References bytes, file, openmsx::File::flush(), openmsx::File::getSize(), openmsx::File::seek(), and openmsx::File::write().

Referenced by ~WavWriter().

◆ isEmpty()

bool openmsx::WavWriter::isEmpty ( ) const
inline

Returns false if there has been data written to the wav image.

Definition at line 19 of file WavWriter.hh.

References bytes.

Member Data Documentation

◆ bytes

unsigned openmsx::WavWriter::bytes
protected

Definition at line 32 of file WavWriter.hh.

Referenced by flush(), isEmpty(), openmsx::Wav16Writer::write(), and ~WavWriter().

◆ file

File openmsx::WavWriter::file
protected

Definition at line 31 of file WavWriter.hh.

Referenced by flush(), WavWriter(), openmsx::Wav16Writer::write(), and ~WavWriter().


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