1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
/*************************************************************************
RepairVirtualAudioFile.h - emulation of a repaired sane audio file
-------------------
begin : Sun May 12 2002
copyright : (C) 2002 by Thomas Eschenbacher
email : Thomas.Eschenbacher@gmx.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef REPAIR_VIRTUAL_AUDIO_FILE_H
#define REPAIR_VIRTUAL_AUDIO_FILE_H
#include "config.h"
#include "libkwave/VirtualAudioFile.h"
#include <QList>
class QIODevice;
namespace Kwave
{
class RecoverySource;
class RepairVirtualAudioFile: public Kwave::VirtualAudioFile
{
public:
/**
* Constructor
* @param device QIODevice used as source
* @param repair_list list of RecoverySource objects for
* building the new file
*/
RepairVirtualAudioFile(QIODevice &device,
QList<Kwave::RecoverySource *> *repair_list);
/** Destructor */
~RepairVirtualAudioFile() override;
/** reads a block of data */
qint64 read(char *data, unsigned int nbytes) override;
/** returns the length of the file */
qint64 length() override;
/** writes a block of data */
virtual qint64 write(const char *data, unsigned int nbytes)
override;
/** seek to a file position */
qint64 seek(qint64 offset, bool is_relative) override;
/** returns the file position */
qint64 tell() override;
private:
/** position within the virtual file */
qint64 m_position;
/** list of sources for the recovered files */
QList<Kwave::RecoverySource *> *m_repair_list;
};
}
#endif /* REPAIR_VIRTUAL_AUDIO_FILE_H */
//***************************************************************************
//***************************************************************************
|