MuseScore  3.4
Music composition and notation
Public Member Functions | Private Types | Private Attributes | List of all members
AudioFile Class Reference

#include <audiofile.h>

Public Member Functions

 AudioFile ()
 
 ~AudioFile ()
 
bool open (const QByteArray &)
 
const char * error () const
 
sf_count_t readData (short *data, sf_count_t frames)
 
int channels () const
 
sf_count_t frames () const
 
int samplerate () const
 
sf_count_t getFileLen () const
 
sf_count_t tell () const
 
sf_count_t read (void *ptr, sf_count_t count)
 
sf_count_t write (const void *ptr, sf_count_t count)
 
sf_count_t seek (sf_count_t offset, int whence)
 
unsigned int loopStart (int v=0)
 
unsigned int loopEnd (int v=0)
 
int loopMode (int v=0)
 

Private Types

enum  FormatType { s16p, fltp }
 

Private Attributes

SF_INFO info
 
SNDFILE * sf
 
SF_INSTRUMENT inst
 
bool hasInstrument
 
QByteArray buf
 
int idx
 
FormatType _type
 

Member Enumeration Documentation

◆ FormatType

enum AudioFile::FormatType
private
Enumerator
s16p 
fltp 

Constructor & Destructor Documentation

◆ AudioFile()

AudioFile::AudioFile ( )

◆ ~AudioFile()

AudioFile::~AudioFile ( )

Member Function Documentation

◆ channels()

int AudioFile::channels ( ) const
inline

◆ error()

const char* AudioFile::error ( ) const
inline

◆ frames()

sf_count_t AudioFile::frames ( ) const
inline

◆ getFileLen()

sf_count_t AudioFile::getFileLen ( ) const
inline

◆ loopEnd()

unsigned int AudioFile::loopEnd ( int  v = 0)
inline

◆ loopMode()

int AudioFile::loopMode ( int  v = 0)
inline

◆ loopStart()

unsigned int AudioFile::loopStart ( int  v = 0)
inline

◆ open()

bool AudioFile::open ( const QByteArray &  b)

◆ read()

sf_count_t AudioFile::read ( void *  ptr,
sf_count_t  count 
)

◆ readData()

sf_count_t AudioFile::readData ( short *  data,
sf_count_t  frames 
)

◆ samplerate()

int AudioFile::samplerate ( ) const
inline

◆ seek()

sf_count_t AudioFile::seek ( sf_count_t  offset,
int  whence 
)

◆ tell()

sf_count_t AudioFile::tell ( ) const
inline

◆ write()

sf_count_t AudioFile::write ( const void *  ptr,
sf_count_t  count 
)

Member Data Documentation

◆ _type

FormatType AudioFile::_type
private

◆ buf

QByteArray AudioFile::buf
private

◆ hasInstrument

bool AudioFile::hasInstrument
private

◆ idx

int AudioFile::idx
private

◆ info

SF_INFO AudioFile::info
private

◆ inst

SF_INSTRUMENT AudioFile::inst
private

◆ sf

SNDFILE* AudioFile::sf
private

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