JustAudio/aud_file.h
Maurice O'Neal 7af2528bfd - Made some major changes to the JustAudio project.
- The majority of user interaction is now in the system tray icon.
There's no longer a traditional user interface window.
- Added a proper application version number, GPL and source code
comments.
- The application will now allow only one instance and will play the
file requested in the arguments in the currently running instance.
- Added mute control.
- Settings are now saved in csv file format instead of idm.
- Several bug fixes.
- Seeker removed for now. (might but it back in the future)
2017-05-06 16:33:23 -04:00

62 lines
1.4 KiB
C++

#ifndef AUD_FILE_H
#define AUD_FILE_H
// This file is part of JustAudio.
// JustAudio 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 3 of the License, or
// (at your option) any later version.
// JustAudio is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with BashWire under the GPL.txt file. If not, see
// <http://www.gnu.org/licenses/>.
#include <QFile>
#include <QObject>
#include <QString>
#include <QTimer>
#include <QStringList>
#include <QMediaPlayer>
class AudFile : public QFile
{
Q_OBJECT
private:
QTimer *timer;
qint64 bytesRead;
qint64 offset;
bool activeInterupt;
int v1TagSize;
public:
AudFile(QObject *parent = 0);
bool openFile(const QString &path);
bool seek(qint64 off);
qint64 getOffset();
qint64 audSize();
~AudFile();
public slots:
void userInterupt();
void userResume();
signals:
void bytePos(qint64 off);
void endOfPlayback();
};
#endif // AUD_FILE_H